Go to the documentation of this file.
33 #ifndef INSTANCE_COUNTER_MACROS_H
34 #define INSTANCE_COUNTER_MACROS_H
48 #define ADD_INSTANCE_COUNTER \
50 static int s_numberOfInstances;\
51 static int s_totalNumberOfInstances;\
64 #define INIT_INSTANCE_COUNTER(className) \
65 int className::s_numberOfInstances = 0;\
66 int className::s_totalNumberOfInstances = 0;
78 #define INC_INSTANCE_COUNTER \
79 ++s_numberOfInstances;\
80 ++s_totalNumberOfInstances;
92 #define DEC_INSTANCE_COUNTER \
93 --s_numberOfInstances;
104 #define SHOW_INSTANCE_COUNTER(className) \
105 Log::debug(QString("%1 of %2 instances of class " #className " left").arg(className::s_numberOfInstances).arg(className::s_totalNumberOfInstances), "main");