|
Frapper
1.0a
|
Header file containing instance counter debugging macros. More...
#include "Log.h"

Go to the source code of this file.
Macros | |
| #define | ADD_INSTANCE_COUNTER |
| Macro definition that adds static member variables to a class to keep track of the number of instances created from this class. | |
| #define | INIT_INSTANCE_COUNTER(className) |
| Macro definition that initializes the static member variables added to a class using the ADD_INSTANCE_COUNTER macro. | |
| #define | INC_INSTANCE_COUNTER |
| Macro definition that updates the static member variables added to a class using the ADD_INSTANCE_COUNTER macro. | |
| #define | DEC_INSTANCE_COUNTER --s_numberOfInstances; |
| Macro definition that updates the static member variables added to a class using the ADD_INSTANCE_COUNTER macro. | |
| #define | SHOW_INSTANCE_COUNTER(className) Log::debug(QString("%1 of %2 instances of class " #className " left").arg(className::s_numberOfInstances).arg(className::s_totalNumberOfInstances), "main"); |
| Macro definition that displays the statistics about the number of instances created from a class to which instance counter member variables have been added using the ADD_INSTANCE_COUNTER macro. | |
Header file containing instance counter debugging macros.
| #define ADD_INSTANCE_COUNTER |
Macro definition that adds static member variables to a class to keep track of the number of instances created from this class.
Variables added to a class using this macro will have to be initialized in the implementation file of the class using the INIT_INSTANCE_COUNTER macro.
| #define INIT_INSTANCE_COUNTER | ( | className | ) |
Macro definition that initializes the static member variables added to a class using the ADD_INSTANCE_COUNTER macro.
To be added in the implementation file of the class.
| className | The name of the class to which the static member variables have been added. |
| #define INC_INSTANCE_COUNTER |
Macro definition that updates the static member variables added to a class using the ADD_INSTANCE_COUNTER macro.
Should be called when an instance of this class is created (e.g. by adding it to constructors of the class).
| #define DEC_INSTANCE_COUNTER --s_numberOfInstances; |
Macro definition that updates the static member variables added to a class using the ADD_INSTANCE_COUNTER macro.
Should be called when an instance of this class is destroyed (e.g. by adding it to destructors of the class).
| #define SHOW_INSTANCE_COUNTER | ( | className | ) | Log::debug(QString("%1 of %2 instances of class " #className " left").arg(className::s_numberOfInstances).arg(className::s_totalNumberOfInstances), "main"); |
Macro definition that displays the statistics about the number of instances created from a class to which instance counter member variables have been added using the ADD_INSTANCE_COUNTER macro.
| className | The name of the class to which the static member variables have been added. |
1.8.2