• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

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.13 2012/01/20 22:07:44 tstaig 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 #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 

Generated on Mon May 4 2015 08:27:43 for ACS-2015.4 C++ API by  doxygen 1.7.0