00001 /* 00007 * LEGAL: COPYRIGHT (C) 2007 JIM E. BROOKS 00008 * THIS SOURCE CODE IS RELEASED UNDER THE TERMS 00009 * OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2). 00010 *****************************************************************************/ 00011 00012 // NOTE: "global" is a namespace, "gGlobals" is a var (instance of Globals class). 00013 00014 #ifndef BASE_GLOBALS_HH 00015 #define BASE_GLOBALS_HH 1 00016 00017 namespace base { 00018 00041 class Globals 00042 { 00043 // plural to differentiate from "global" namespace 00044 public: 00045 Globals( void ) 00046 : mExiting(false), 00047 mTesting(false) 00048 { 00049 // NOP 00050 } 00051 00052 // The order of construction/destruction of class members 00053 // is determined by the order in which they're declared. 00054 // ctor initialization list has no effect on order. 00055 00056 // mExiting: Destructors that might destroy a static object should 00057 // check mExiting to avoid calling methods of another destroyed static object. 00058 00059 bool mExiting; 00060 bool mTesting; 00061 Streams mStreams; 00062 #if COMPILE_THREADS 00063 Thread mThread; 00064 #endif 00065 #if DEBUG 00066 bool mAssertAbort; // call abort() if ASSERT() fails 00067 #endif 00068 }; 00069 00070 // The dreaded Globals var. 00071 BASE_GLOBAL Globals gGlobals; 00072 00073 } // namespace base 00074 00075 #endif // BASE_GLOBALS_HH
Palomino Flight Simulator documents generated by doxygen 1.5.6 on Mon Dec 29 17:26:59 2008