From: Marc W. <Mar...@si...> - 2004-10-14 14:25:25
|
In the documentation, there is written under "ChangeDefaultMetaclass" (page 22 of the PDF): "It should be called by Initialized() defined for a metaclass loaded loaded by the -S option at the beginning. Otherwise, that metaclass should be explicitely loaded by the metaclass declaration, after which the new metaclass is effective." This does not work! - I don't use the "-S" option - I don't use any "metaclass" declaration -> But the metaclass is still applied! Why?!? Problem: At first sight, one would think that everything is ok. if the metaclass is loaded and applied, but unfortunately it is also applied to all to all system libraries, where I don't want it. That's why I need the "metaclass declaration" to be able to tell the OpenC++ processor where to start applying the metaclass. How can I do this? (You can check the opencxx-problem.tar.gz file of my previous mail for my implementation, it requires my patch). What do I want to do: - Add a function trace to all my classes without changing a single line! How do I try to do it: - Automatically include file "fntrace.hxx" by passing option "-include fntrace.hxx" to the C preprocessor - Make my trace class the new default class, so it is applied to all classes. What's the problem with this approach: - All included system headers are also instrumented, means added a function trace - But the header fntrace.hxx is included later, so the symbols of that header are unknown before Possible solutions: - Find a way to include fntrace.hxx as very first file - Start OpenC++ metaclass instrumentation only after inclusion of fntrace.hxx (i.e. with a "metaclass declaration", by adding the line "metaclass IsTraceClass;" as last line in header fntrace.hxx) The latter is exactly what I tried and why I send this error report. Any other idea? Thank you Regards Marc |