[英]C++ refactoring to add a namespace to all classes and functions?
I have a C++ project with hundreds of files, and I need to enclose all its classes and functions in an additional namespace.我有一个包含数百个文件的 C++ 项目,我需要将其所有类和函数包含在一个额外的命名空间中。 Is there a tool that can do that automatically?有没有可以自动执行此操作的工具?
(There was a similar question before, but it was about Eclipse specifically and it's a year old, so maybe there are some additional answers now?) (之前有一个类似的问题,但具体是关于 Eclipse 并且已经一年了,所以现在可能有一些额外的答案?)
You can use a shell script for this purpose;为此,您可以使用 shell 脚本; see an example here在这里看一个例子
And here are some common thoughts on the issue这里有一些关于这个问题的常见想法
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.