Class Declaration Macros
The class declaration macros declare classes to be traceable, with the rw_user package as the super set. If you intend to trace any of a class’ functions (member or static member), you must use these macros. Friend functions can either be traced with these macros or traced as global functions.
If you have used the package declaration macros to define other packages, you need to create your own class declaration macros. See
Using Package-level Tracing.The macros take one parameter, className, to specify the name of the class to be traced. The className must be a valid C++ identifier. The DECLARE and DEFINE macros must be used in pairs, and the className of the DECLARE and DEFINE macros must match.
RW_USER_DECLARE_TRACEABLE_CLASS(className)
Declares a non-template class as traceable. This macro must be placed in the header file for a class before the class declaration. Otherwise, it generates an undefined symbols compile error.
RW_USER_DEFINE_TRACEABLE_CLASS(className)
Provides a definition for a static variable defined by the matching DECLARE macro (above). This macro must be placed in the implementation (.cpp) file for the class.
RW_USER_DECLARE_TRACEABLE_TEMPLATE_CLASS(className)
Declares a template class as traceable. Do not include the template parameters in the className. This macro must be placed in the header file for a class before the class declaration. Otherwise, it generates an undefined symbols compile error.
RW_USER_DEFINE_TRACEABLE_TEMPLATE_CLASS(className)
Provides a definition for a static variable defined by the matching DECLARE macro (above). Do not include the template parameters in the className. This macro must be placed in the implementation file (typically a .cc file) for the template class.