|Records rhe number of instances. |
Public Member Functions
|Countable (bool verbose=true)|
|Constructs a Countable, increments the global reference count. |
|virtual||~Countable () throw ()|
|The virtual destructor decrements the reference count. |
Static Public Member Functions
|static const std::string||ToString (Ceylan::VerbosityLevels level=Ceylan::high)|
|Returns informations about the global reference count. |
|static InstanceCount||GetInstanceCount ()|
|Returns the current instance count. |
|static InstanceCount||GetMaximumInstanceCount ()|
|Returns the current maximum instance count ever reached in this run. |
Private Member Functions
|Countable (const Countable &source)|
|Copy constructor made private to ensure that it will never be called. |
|Countable &||operator= (const Countable &source)|
|Assignment operator made private to ensure that it will never be called. |
|Tells whether count changes should be recorded in LightLog. |
Static Private Attributes
|static InstanceCount||ReferenceCount = 0|
|The current reference count. |
|static InstanceCount||MaximumReferenceCount = 0|
|The maximum reference count that has been already reached. |
|static const std::string||LogPrefix = "[Instance count]"|
|The prefix used when instance counts are logged. |
Its main use is to check that every Countable is rightly deallocated when appropriate, i.e. each program should end up with a null instance count.
|Countable::Countable||(||bool|| verbose =
Constructs a Countable, increments the global reference count.
|verbose||tells whether LogLight should be used to publish changes of instances counts.|
|Countable::~Countable||(||)|| throw ()
|Ceylan::Countable::Countable||(||const Countable &||source||)||
Copy constructor made private to ensure that it will never be called.
The compiler should complain whenever this undefined constructor is called, implicitly or not.
Assignment operator made private to ensure that it will never be called.
The compiler should complain whenever this undefined operator is called, implicitly or not.
|const string Countable::ToString||(||Ceylan::VerbosityLevels|| level =
|const string Countable::LogPrefix = "[Instance count]"