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_IDENTIFIER_H_
00028 #define CEYLAN_OBJECT_IDENTIFIER_H_
00029
00030
00031 #include "CeylanTextIdentifier.h"
00032 #include "CeylanProcess.h"
00033
00034 #include <string>
00035
00036
00037
00038 namespace Ceylan
00039 {
00040
00041
00042
00043
00044 class Object ;
00045
00046
00047
00048 namespace Log
00049 {
00050
00051
00052
00064 class CEYLAN_DLL ObjectIdentifier : public TextIdentifier
00065 {
00066
00067
00068 public:
00069
00070
00071
00081 explicit ObjectIdentifier( const Object & object ) ;
00082
00083
00084
00101 ObjectIdentifier( const std::string & hostname,
00102 Ceylan::System::Pid pid, const std::string & className,
00103 const void * address ) ;
00104
00105
00106
00108 virtual ~ObjectIdentifier() throw() ;
00109
00110
00111
00128 virtual bool differentButMatches(
00129 const ObjectIdentifier & otherID ) const ;
00130
00131
00132
00144 virtual const std::string toString(
00145 Ceylan::VerbosityLevels level = Ceylan::high ) const ;
00146
00147
00148
00149
00150
00151
00152
00170 static ObjectIdentifier & generateFromChannelName(
00171 const std::string & channelName ) ;
00172
00173
00175 static const char Separator ;
00176
00177
00179 static const std::string PIDTag ;
00180
00181
00183 static const std::string Pattern ;
00184
00185
00186
00187 protected:
00188
00189
00191 std::string _hostname ;
00192
00193
00195 System::Pid _pid ;
00196
00197
00199 std::string _className ;
00200
00201
00207 const void * _address ;
00208
00209
00210 } ;
00211
00212
00213 }
00214
00215
00216 }
00217
00218
00219
00220 #endif // CEYLAN_OBJECT_IDENTIFIER_H_
00221