How to get a list of functions accessible to a class function using Boost Preprocessor?

134 Views Asked by At

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?)

2

There are 2 best solutions below

0
On

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)

0
On

You can try to use my code analysis toolkit. Similar analysis (list of overwritten methods across the hierarchy of classes) can be found at: http://cdsan.com/Samp_OverwrittenMethods.php

What you are asking for would be a tweak in the analysis above.