Go to the documentation of this file.00001 #ifndef logging_handler_H
00002 #define logging_handler_H
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
00032 #ifndef __cplusplus
00033 #error This is a C++ include file and cannot be used from plain C
00034 #endif
00035
00036 #include <string>
00037 #include <lokiSmartPtr.h>
00038 #include "loggingBaseLog.h"
00039
00040 namespace Logging
00041 {
00042
00053 class Handler : public virtual BaseLog
00054 {
00055 public:
00056
00058 #ifndef MAKE_VXWORKS
00059 typedef Loki::SmartPtr<Handler,
00060 #ifdef __CYGWIN__
00061 Logging::RefCounted,
00062 #else
00063 Loki::RefCountedMTAdj<Loki::ObjectLevelLockable>::RefCountedMT,
00064 #endif
00065 Loki::AllowConversion,
00066 Loki::NoCheck,
00067 Loki::DefaultSPStorage> HandlerSmartPtr;
00068 #else
00069 typedef Loki::SmartPtr<Handler,
00070 RefCountedMT,
00071 Loki::AllowConversion,
00072 Loki::NoCheck,
00073 Loki::DefaultSPStorage> HandlerSmartPtr;
00074 #endif
00075
00076
00080 virtual ~Handler();
00081
00087 Priority
00088 getLevel() const {return priority_m;}
00089
00098 void
00099 setLevel(Priority priority) {
00100
00101 priority_m = priority; }
00102
00110 virtual void
00111 setLevels(Priority remotePriority, Priority localPriority, int type) {setLevel(remotePriority); }
00112
00113 int
00114 getRemoteLevel() { return remotePriority_m; }
00115 int
00116 getLocalLevel() { return localPriority_m; }
00117
00118 void
00119 setRemoteLevel(Priority remotePriority){ remotePriority_m = remotePriority;}
00120 void
00121 setLocalLevel(Priority localPriority){ localPriority_m = localPriority;}
00122
00123 void
00124 setRemoteLevelType(int type){ priority_type_remote_m = type;}
00125 void
00126 setLocalLevelType(int type){ priority_type_local_m = type;}
00127
00128 int
00129 getRemoteLevelType(){ return priority_type_remote_m;}
00130 int
00131 getLocalLevelType(){ return priority_type_local_m;}
00132 protected:
00133
00134
00135 private:
00136
00142 Priority priority_m;
00146 Priority localPriority_m;
00147 int priority_type_local_m;
00148 int priority_type_remote_m;
00152 Priority remotePriority_m;
00153 };
00154
00155 };
00156
00157 #endif