Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

loggingHandler.h

Go to the documentation of this file.
00001 #ifndef logging_handler_H 00002 #define logging_handler_H 00003 /******************************************************************************* 00004 * ALMA - Atacama Large Millimiter Array 00005 * (c) Associated Universities Inc., 2005 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or (at your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 * 00021 * "@(#) $Id: loggingHandler.h,v 1.12 2007/12/28 04:13:32 cparedes Exp $" 00022 * 00023 * who when what 00024 * -------- -------- ---------------------------------------------- 00025 * dfugate 2005-03-09 created 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

Generated on Thu Apr 30 02:30:51 2009 for ACS C++ API by doxygen 1.3.8