This template defines virtual methods for calling the statically defined Debug methods within a hierarchy. More...
#include <adskDebugCRTP.h>
Public Member Functions | |
virtual bool | debug (RequestType &request) const |
Gather this object's counting information. More... | |
This template defines virtual methods for calling the statically defined Debug methods within a hierarchy.
A template was used since the patterns for the Debug calls are all the same.
To add a handler for a Debug message you would first derive the class to debug off of this template, once per message type that will be handled. e.g. for messages "MyRequest" and "YourRequest" the class definition would look like this:
Static debug methods are then defined and in the source file they will be implemented using this syntax:
After, you will need to include adskDebugCRTPImpl.h in the compilation unit when you are defining your class (eg MyClass.cpp), so that the templated code gets instantiated once.
|
virtual |
Gather this object's counting information.
[in] | request | Debug object accepting the count request |