base_defs.hh

Go to the documentation of this file.
00001 /*
00008  * LEGAL:   COPYRIGHT (C) 2004 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 // base_defs.hh has generic defs
00014 // base_defs_conf.hh has configuration defs
00015 
00016 #ifndef BASE_DEFS_HH
00017 #define BASE_DEFS_HH 1
00018 
00019 namespace base {
00020 namespace defs {
00021 
00023 // Definitions, constants.
00024 #define KILOBYTE (1024u)
00025 #define MEGABYTE (1048576u)
00026 #define GIGABYTE (1073741824u)
00027 #define THOUSAND (1000)
00028 #define MILLION  (1000000)
00029 #define CHAR_LF '\n'
00030 #define CHAR_CR '\r'
00031 const bool FORCE = true;
00032 
00034 // @def Numeric limits.
00035 // *_LARGE are the largest positive values.
00036 // *_SMALL are the smallest negative values.
00037 // Defined by limits.h: INT_MIN, INT_MAX, UINT_MAX
00038 // Defined by float.h: FLT_MAX, FLT_MIN
00039 #define INT_SMALL (INT_MIN)
00040 #define INT_LARGE (INT_MAX)
00041 #define FLOAT_SMALL (-9999999999.0)     // FLOAT_SMALL is supposed to be negative
00042 #define FLOAT_LARGE ( 9999999999.0)     // so it cannot be based on FLT_MIN which is zero.
00043 
00045 // @def Misc limits.
00046 const uint MAX_ELEMS = 128 * MEGABYTE;
00047 
00051 #define ILLEGAL_PTR ((void*)13) // an unlucky address in the faulty zero page
00052 
00053 } // namespace defs
00054 } // namespace base
00055 
00056 using namespace base::defs;
00057 
00058 #endif // BASE_DEFS_HH
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:06 2007