0

Say I have a class that inherits from 25 difrent classes. I wonder how to gain a list of function signatures that can be called on parent classes (public) and public and private for a class I am looking at? (for example for automated RPC friend class creation) (Why I want to do this with defines: it will work on fly=) could we at least get a list of pub and priv functions of a class?)

4

2 回答 2

3

That cannot be done with the language itself (nor with the preprocessor). On the other hand, it should not be too complex to use clang/libclang to process your C++ code and extract that information, which can then be used to feed a code generator (or even write the code generator into the code processor)

于 2012-07-29T22:20:20.200 回答
0

你可以尝试使用我的代码分析工具包。可以在以下位置找到类似的分析(跨类层次结构的覆盖方法列表):http: //cdsan.com/Samp_OverwrittenMethods.php

您所要求的将是对上述分析的调整。

于 2012-07-29T22:24:46.953 回答