00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef CEYLAN_COUNTABLE_H_
00028 #define CEYLAN_COUNTABLE_H_
00029
00030
00031
00032 #include "CeylanDisplayable.h"
00033 #include "CeylanTypes.h"
00034
00035
00036 #include <string>
00037
00038
00039
00040 namespace Ceylan
00041 {
00042
00043
00065 class CEYLAN_DLL Countable
00066 {
00067
00068
00069 public:
00070
00071
00072
00074 typedef Ceylan::Uint32 InstanceCount ;
00075
00076
00077
00088 explicit Countable( bool verbose = true ) ;
00089
00090
00091
00093 virtual ~Countable() throw() ;
00094
00095
00096
00104 static const std::string ToString(
00105 Ceylan::VerbosityLevels level = Ceylan::high ) ;
00106
00107
00108
00110 static InstanceCount GetInstanceCount() ;
00111
00112
00113
00119 static InstanceCount GetMaximumInstanceCount() ;
00120
00121
00122
00123 private:
00124
00125
00132 bool _verbose ;
00133
00134
00136 static InstanceCount ReferenceCount ;
00137
00138
00140 static InstanceCount MaximumReferenceCount ;
00141
00142
00144 static const std::string LogPrefix ;
00145
00146
00154 Countable( const Countable & source ) ;
00155
00156
00164 Countable & operator = ( const Countable & source ) ;
00165
00166 } ;
00167
00168
00169 }
00170
00171
00172 #endif // CEYLAN_COUNTABLE_H_
00173