template<typename T>
class capd::auxil::Counter< T >
Counter add to each object of given class unique id and also counts number of objects created and existing.
This class is for debugging purpose mainly. It reports each creation and destruction to capd::slog stream. You can turn on/off its output by
bool show
If this variable is set to true then everything that is written to this stream is also written to 'co...
Definition: OutputStream.h:63
extern ::capd::auxil::OutputStream slog
The output stream to which one can send messages for logging only. Those messages are not shown to th...
Definition: logger_deprecated.h:48
For example output: < + A [34][12] > means that there was created object (+) of class A with id=34 (we start with id=1) and that at this moment there exist 12 objects. Destruction is denoted by '-' and substitution by '='.
To add counter to your class A simply inherit from Counter i.e.:
...
};
Counter add to each object of given class unique id and also counts number of objects created and exi...
Definition: Counter.h:52