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 Loki::RefCountedMTAdj<Loki::ObjectLevelLockable>::RefCountedMT,
00061 Loki::AllowConversion,
00062 Loki::NoCheck,
00063 Loki::DefaultSPStorage> HandlerSmartPtr;
00064 #else
00065 typedef Loki::SmartPtr<Handler,
00066 RefCountedMT,
00067 Loki::AllowConversion,
00068 Loki::NoCheck,
00069 Loki::DefaultSPStorage> HandlerSmartPtr;
00070 #endif
00071
00072
00076 virtual ~Handler();
00077
00083 Priority
00084 getLevel() const {return priority_m;}
00085
00094 void
00095 setLevel(Priority priority) {
00096
00097 priority_m = priority; }
00098
00106 virtual void
00107 setLevels(Priority remotePriority, Priority localPriority, int type) {setLevel(remotePriority); }
00108
00109 int
00110 getRemoteLevel() { return remotePriority_m; }
00111 int
00112 getLocalLevel() { return localPriority_m; }
00113
00114 void
00115 setRemoteLevel(Priority remotePriority){ remotePriority_m = remotePriority;}
00116 void
00117 setLocalLevel(Priority localPriority){ localPriority_m = localPriority;}
00118
00119 void
00120 setRemoteLevelType(int type){ priority_type_remote_m = type;}
00121 void
00122 setLocalLevelType(int type){ priority_type_local_m = type;}
00123
00124 int
00125 getRemoteLevelType(){ return priority_type_remote_m;}
00126 int
00127 getLocalLevelType(){ return priority_type_local_m;}
00128 protected:
00129
00130
00131 private:
00132
00138 Priority priority_m;
00142 Priority localPriority_m;
00143 int priority_type_local_m;
00144 int priority_type_remote_m;
00148 Priority remotePriority_m;
00149 };
00150
00151 };
00152
00153 #endif