Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

RuntimeGlobals.h

Go to the documentation of this file.
00001 #ifndef RUNTIMEGLOBALS_H 00002 #define RUNTIMEGLOBALS_H 00003 00004 #include <exception> 00005 00006 #include <PtMutex.h> 00007 #include <PropsFile.h> 00008 #include <TraceLogger.h> 00009 00010 //class LoadShedder; //until it compiles (needs sched) #include <LoadShedder.H> 00011 //#include <DelayedDataMgr.H> 00012 00013 BOREALIS_NAMESPACE_BEGIN; 00014 00015 class RuntimeGlobals 00016 { 00017 public: 00018 //--------------------------------------------------------------------------- 00019 // Methods that should only be called by whatever thread sets up this 00020 // set of globals. General consumers should never call these methods. 00021 // 00022 // Generally, the way to "unset" one of these pointers is by setting it to 00023 // NULL. 00024 //--------------------------------------------------------------------------- 00025 00026 static void setPropsFile(const PropsFile * p) 00027 throw (exception); 00028 00029 static void setTraceLogger(TraceLogger * p) 00030 throw (exception); 00031 00032 #if 0 00033 static void setDelayedDataMgr(DelayedDataMgr * p) 00034 throw (exception); 00035 00036 static void setLoadShedder(LoadShedder * p) 00037 throw (exception); 00038 #endif 00039 00040 //--------------------------------------------------------------------------- 00041 // Methods anyone can call. 00042 // The pointer is valid until a set...(...) call (see above) changes it... 00043 //--------------------------------------------------------------------------- 00044 00045 static const PropsFile * getPropsFile(bool throwExceptionIfNull = true) 00046 throw (exception); 00047 00048 static TraceLogger * getTraceLogger(bool throwExceptionIfNull = true) 00049 throw (exception); 00050 00051 #if 0 00052 static DelayedDataMgr * getDelayedDataMgr(bool throwExceptionIfNull = true) 00053 throw (exception); 00054 00055 static LoadShedder * getLoadShedder(bool throwExceptionIfNull = true) 00056 throw (exception); 00057 #endif 00058 00059 private: 00060 static PtMutex _s_mtx; 00061 00062 static const PropsFile * _s_pPropsFile; 00063 static TraceLogger * _s_pTraceLogger; 00064 00065 #if 0 00066 static DelayedDataMgr * _s_pHistorian; 00067 static LoadShedder * _s_pLoadShedder; 00068 #endif 00069 }; 00070 00071 BOREALIS_NAMESPACE_END; 00072 00073 #endif

Generated on Fri Nov 12 15:15:22 2004 for Borealis by doxygen 1.3.8