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_LOG_CHANNEL_H_
00028 #define CEYLAN_LOG_CHANNEL_H_
00029
00030
00031 #include "CeylanTypes.h"
00032 #include "CeylanLog.h"
00033 #include "CeylanTextDisplayable.h"
00034
00035
00036 #include <string>
00037 #include <list>
00038
00039
00040
00041 namespace Ceylan
00042 {
00043
00044
00045 namespace Log
00046 {
00047
00048
00049
00050
00051
00052 class LogMessage ;
00053
00054
00055
00063 class CEYLAN_DLL LogChannel : public TextDisplayable
00064 {
00065
00066
00067
00072 friend class LogAggregator ;
00073
00074
00080 friend class LogAggregatorHTML ;
00081
00082
00084 typedef Ceylan::Uint32 MessageCount ;
00085
00086
00087
00088 public:
00089
00090
00091
00096 explicit LogChannel( const std::string & name ) ;
00097
00098
00099
00101 virtual ~LogChannel() throw() ;
00102
00103
00104
00119 virtual void addMessage( LogMessage & message,
00120 bool check = true ) ;
00121
00122
00123
00128 virtual const std::string getName() const ;
00129
00130
00131
00137 virtual MessageCount getMessageCount() const ;
00138
00139
00140
00153 virtual const std::string toString(
00154 Ceylan::VerbosityLevels level = Ceylan::high ) const ;
00155
00156
00157
00158
00159
00160 protected:
00161
00162
00163
00165 std::string _name ;
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175 #pragma warning( push )
00176 #pragma warning( disable : 4251 )
00177
00183 std::list<LogMessage *> _messages ;
00184
00185 #pragma warning( pop )
00186
00187
00188
00189 private:
00190
00191
00199 LogChannel( const LogChannel & source ) ;
00200
00201
00202
00211 LogChannel & operator = ( const LogChannel & source ) ;
00212
00213
00214
00215 } ;
00216
00217
00218 }
00219
00220 }
00221
00222
00223
00224 #endif // CEYLAN_LOG_CHANNEL_H_
00225