base_common.hh

Go to the documentation of this file.
00001 /*
00008  * LEGAL:   COPYRIGHT (C) 2006 JIM E. BROOKS
00009  *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
00010  *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
00011  *****************************************************************************/
00012 
00013 #ifndef BASE_COMMON_HH
00014 #define BASE_COMMON_HH 1
00015 
00016 // Instead of writing "static" which raises concerns about thread-safety.
00017 #define PERSISTENT   static
00018 #define INLINE       static inline
00019 #ifndef INTERN                  // tests can predefine to test static functions
00020 #define INTERN       static
00021 #endif
00022 #ifndef INTERNAL
00023 #define INTERNAL     static
00024 #endif
00025 #define CLASS_CONST  static const
00026 #define CLASS_VAR    static
00027 #define CLASS_METHOD static
00028 
00029 #if COMPILE_THREADS
00030 // Unless COMPILE_GCC_TLS=0 was defined by make NO_GCC_TLS=1
00031 #   ifndef COMPILE_GCC_TLS
00032 #   define COMPILE_GCC_TLS 1
00033 #   endif
00034 #endif
00035 
00036 // STATS and DEBUG are tied somewhat.
00037 #ifndef STATS
00038 #if DEBUG
00039 #define STATS 1
00040 #else
00041 #define STATS 0
00042 #endif
00043 #endif
00044 
00045 // To declare globals in header files.
00046 #if BASE_CC
00047 #define BASE_GLOBAL  // instantiate when .cc is compiled
00048 #else
00049 #define BASE_GLOBAL extern
00050 #endif
00051 
00052 // Include often-needed header files.
00053 #include "base_os.hh"
00054 #include "base_bits.hh"
00055 #include "base_cc.hh"
00056 #include "base_exception.hh"
00057 #include "base_assert.hh"
00058 #include "base_defs.hh"
00059 #include "base_defs_conf.hh"
00060 #include "base_funcs.hh"
00061 #if STATS
00062 #include "base_stats.hh"
00063 #endif
00064 #include "base_typesig_defs.hh"
00065 #include "base_typesig.hh"
00066 #include "base_thread_common.hh"
00067 #include "base_thread_types.hh"
00068 #include "base_thread_single.hh"
00069 #include "base_types.hh"
00070 #include "base_safe_ptr.hh"
00071 #include "base_thread_atomic.hh"
00072 #include "base_thread.hh"
00073 #include "base_thread_lock.hh"
00074 #include "base_shared_ptr.hh"
00075 #include "base_unique_ptr.hh"
00076 #include "base_types2.hh"
00077 #include "base_types_array.hh"
00078 #include "base_dlist.hh"
00079 #include "base_funcs2.hh"
00080 #if DEBUG
00081 #include "base_debug.hh"
00082 #endif
00083 #include "base_stream.hh"
00084 #include "base_random.hh"
00085 #include "base_global.hh"
00086 
00087 #endif // BASE_COMMON_HH
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:06 2007