#163620 - Izhido - Mon Oct 06, 2008 6:39 pm
Guys:
Do you know of any applications that can do the above on a group of C/C++ files?
I'm having a hard time trying to navigate my way into a project that seems to be conceived before templates existed (or were known by the team who built it).
You can see entire classes bulk-defined with macros like:
where FOR_EACH_CLASS is
where FOR_EACH_PACK_*(x) is
and where DECLARE_PROXY_CLASS(x) is
where DECLARE_PROXY_HEADER_FOR(x) is
and...
well, do you get the idea? No? Good, I didn't either.
However, since the project is already closed (abandonware?), *and* GPL, that means I can scourge through the sources as I please. And that means, first and foremost, that I really need to understand what the $%&$@ is going on under these $%&$@ macros.
So, a tool that can expand only certain carefully selected macros & then write back the files to disk would be really useful in this case.
To be honest, I have no idea how to google for such a thing, so I'm asking you, the crew who actually know about C/C++. Do you know if there's such a tool? And where to get it?
- Izhido
Do you know of any applications that can do the above on a group of C/C++ files?
I'm having a hard time trying to navigate my way into a project that seems to be conceived before templates existed (or were known by the team who built it).
You can see entire classes bulk-defined with macros like:
Code: |
FOR_EACH_CLASS(DECLARE_PROXY_CLASS) FOR_EACH_CLASS(DECLARE_ALIAS_CLASS) FOR_EACH_CLASS(DEFINE_PROXY_CLASS) FOR_EACH_CLASS(DEFINE_ALIAS_CLASS) |
where FOR_EACH_CLASS is
Code: |
#define FOR_EACH_CLASS(x) FOR_EACH_PACK_1(x) FOR_EACH_PACK_2(x) FOR_EACH_PACK_3(x) FOR_EACH_PACK_4(x) |
where FOR_EACH_PACK_*(x) is
Code: |
#define FOR_EACH_PACK_*(x) X(UInt8) X(UInt16) X(UInt32) X(Boolean) yada yada ... |
and where DECLARE_PROXY_CLASS(x) is
Code: |
#define DECLARE_PROXY_CLASS(x) DECLARE_PROXY_HEADER_FOR(x) DECLARE_PROXY_MEMBERS_FOR(x) DECLARE_PROXY_METHODS_FOR(x) |
where DECLARE_PROXY_HEADER_FOR(x) is
Code: |
#define DECLARE_PROXY_HEADER_FOR(x) \ class Proxy##x \ { \ public: |
and...
well, do you get the idea? No? Good, I didn't either.
However, since the project is already closed (abandonware?), *and* GPL, that means I can scourge through the sources as I please. And that means, first and foremost, that I really need to understand what the $%&$@ is going on under these $%&$@ macros.
So, a tool that can expand only certain carefully selected macros & then write back the files to disk would be really useful in this case.
To be honest, I have no idea how to google for such a thing, so I'm asking you, the crew who actually know about C/C++. Do you know if there's such a tool? And where to get it?
- Izhido