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_OBJECT_H_
00028 #define CEYLAN_OBJECT_H_
00029
00030
00031 #include "CeylanIdentifierOwner.h"
00032 #include "CeylanLoggable.h"
00033 #include "CeylanLog.h"
00034
00035
00036 #include <string>
00037
00038
00039
00040 namespace Ceylan
00041 {
00042
00043
00044
00058 class CEYLAN_DLL Object: public IdentifierOwner, public Log::Loggable
00059 {
00060
00061
00062 public:
00063
00064
00065
00101 explicit Object( bool trackInstance = true,
00102 bool dropIdentifierOnExit = true ) ;
00103
00104
00105
00111 virtual ~Object() throw() ;
00112
00113
00114
00132 virtual const std::string getClassName() const ;
00133
00134
00135
00146 virtual bool isOfSameType( const Object & other ) const ;
00147
00148
00149
00163 virtual void logState(
00164 Ceylan::VerbosityLevels level = Ceylan::high ) ;
00165
00166
00167
00198 virtual void send( const std::string & message,
00199 Log::LevelOfDetail levelOfDetail
00200 = Log::DefaultLevelOfDetailForMessage ) ;
00201
00202
00203
00213 virtual void forgeIdentifier() ;
00214
00215
00216
00229 virtual const std::string toString(
00230 Ceylan::VerbosityLevels level = Ceylan::high ) const ;
00231
00232
00233
00234 protected:
00235
00236
00246 void dropIdentifier() ;
00247
00248
00254 bool _trackInstance ;
00255
00256
00257
00258 private:
00259
00260
00269 Object( const Object & source ) ;
00270
00271
00280 Object & operator = ( const Object & source ) ;
00281
00282
00283 } ;
00284
00285
00286 }
00287
00288
00289 #endif // CEYLAN_OBJECT_H_
00290