Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# deGlobalTypes.hpp

Go to the documentation of this file.

    00001 ///////////////////////////////////////////////////////////////////////////////
    00002 /// @file deGlobalTypes.hpp
    00003 ///
    00004 /// @brief Basic datatype definitions (Destiny-wide scope)
    00005 ///
    00006 /// @author Hootie
    00007 ///
    00008 /// This file is the intellectual property of Novus Delta, LLC.. Usage of the
    00009 /// contents of this file is subject to the Destiny3D Member License which
    00010 /// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
    00011 ///
    00012 /// This file is distributed "AS IS" without warranty of any kind.  Novus
    00013 /// Delta, LLC. does not guarantee the fitness of the contents of this file
    00014 /// for any particular purpose.
    00015 ///
    00016 /// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
    00017 ///
    00018 /// <hr>
    00019 ///                                 Change History
    00020 /// <hr>
    00021 ///
    00022 /// @date Sept 2001
    00023 /// @author Hootie
    00024 /// @remarks Rearchitecture II
    00025 ///
    00026 ///////////////////////////////////////////////////////////////////////////////
    00027
    00028 #ifndef DEGLOBALTYPES_HPP
    00029 #define DEGLOBALTYPES_HPP
    00030
    00031 #define _DEQUOTE(x) #x
    00032 #define DESTRINGIZE_VALUE(x) _DEQUOTE(x)
    00033
    00034 #include "deOS.hpp" // platform-specific settings
    00035 #include <cstring> // memcpy, strcmp, etc
    00036 #include <cstdlib> // malloc & free
    00037
    00038 // comment this line to make everything become a "float"
    00039 #define DE_DOUBLE_PRECISION (1)
    00040
    00041
    00042
    00043 //=================================================================================
    00044 // Datatypes
    00045 //=================================================================================
    00046
    00047 typedef char deBoolean;
    00048 typedef float deFloat;
    00049 #ifdef DE_DOUBLE_PRECISION
    00050     typedef double deDouble;
    00051     #define COS cos
    00052     #define SIN sin
    00053     #define TAN tan
    00054     #define ACOS acos
    00055     #define ASIN asin
    00056     #define ATAN atan
    00057 #else
    00058     typedef float deDouble;
    00059     #define COS cosf
    00060     #define SIN sinf
    00061     #define TAN tanf
    00062     #define ACOS acosf
    00063     #define ASIN asinf
    00064     #define ATAN atanf
    00065 #endif
    00066 typedef unsigned long deARGB;
    00067 typedef unsigned short  deWorldID;
    00068 typedef unsigned long   deObjectID;
    00069
    00070 // windows types
    00071 // from windef.h
    00072 typedef unsigned long       DWORD;
    00073 typedef int                 BOOL;
    00074 typedef unsigned char       BYTE;
    00075 typedef unsigned short      WORD;
    00076 typedef float               FLOAT;
    00077 typedef FLOAT*              PFLOAT;
    00078 typedef BOOL*               LPBOOL;
    00079 typedef BYTE*               LPBYTE;
    00080 typedef int*                LPINT;
    00081 typedef WORD*               LPWORD;
    00082 typedef long*               LPLONG;
    00083 typedef DWORD*              LPDWORD;
    00084 typedef void*               LPVOID;
    00085 typedef const void*         LPCVOID;
    00086 typedef int                 INT;
    00087 typedef unsigned int        UINT;
    00088 typedef unsigned int*       PUINT;
    00089 // from RpcNdr.h
    00090 typedef unsigned char byte;
    00091 // from wtypes.h
    00092 typedef byte BYTE;
    00093 typedef unsigned short WORD;
    00094 typedef unsigned int UINT;
    00095 typedef int INT;
    00096 typedef long LONG;
    00097 typedef unsigned long DWORD;
    00098 // from somewhere
    00099 typedef void * HANDLE;
    00100
    00101 // "sized" types
    00102 typedef signed char         s8;
    00103 typedef signed short        s16;
    00104 typedef signed long         s32;
    00105
    00106 typedef unsigned char       u8;
    00107 typedef unsigned short      u16;
    00108 typedef unsigned long       u32;
    00109
    00110 // platform-specific types
    00111 #ifdef DE3D_HANDLES_ARE_VOID
    00112 typedef void * HWND;
    00113 typedef void * HINSTANCE;
    00114 typedef void * HMONITOR;
    00115 #else
    00116 typedef struct HWND__*      HWND;
    00117 typedef struct HINSTANCE__* HINSTANCE;
    00118 typedef struct HMONITOR__*  HMONITOR;
    00119 #endif
    00120 typedef HINSTANCE HMODULE;
    00121
    00122 #if defined(DE3D_INT64_IS_LONG_LONG)
    00123 typedef signed long long    s64;
    00124 typedef unsigned long long  u64;
    00125 #elif defined(DE3D_INT64_IS_MS_INT64)
    00126 typedef signed __int64      s64;
    00127 typedef unsigned __int64    u64;
    00128 #endif
    00129
    00130
    00131
    00132 //=================================================================================
    00133 // Defines and macros
    00134 //=================================================================================
    00135
    00136 const deBoolean DE_TRUE = 1;
    00137 const deBoolean DE_FALSE = 0;
    00138 #define deTRUE  (DE_TRUE)
    00139 #define deFALSE (DE_FALSE)
    00140 // Packs individual A,R,G,B values into a combined ARGB DWORD
    00141 #define ARGB(a,r,g,b) \
    00142     ((DWORD)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff)))
    00143 #define GrabARGB(argb,a,r,g,b)\
    00144     {a=((argb>>24)&0xff); r=((argb>>16)&0xff); g=((argb>>8)&0xff); b=((argb)&0xff); }
    00145
    00146 #define deXOR(x,y) ( (!(x)&&(y)) || ((x)&&!(y)) )
    00147
    00148 #ifndef max
    00149 #define max(a,b)            (((a) > (b)) ? (a) : (b))
    00150 #endif
    00151
    00152 #ifndef min
    00153 #define min(a,b)            (((a) < (b)) ? (a) : (b))
    00154 #endif
    00155
    00156 #define LEAK_HUNTING  // comment out to disable leak-hunts
    00157 #ifndef __GNUC__
    00158 #ifdef LEAK_HUNTING
    00159  #ifdef _DEBUG
    00160    //#pragma message("leak-hunting enabled")
    00161   #define _CRTDBG_MAP_ALLOC
    00162   #include <crtdbg.h>
    00163   #undef malloc
    00164   #define new               new(_NORMAL_BLOCK,__FILE__, __LINE__)
    00165   #define malloc(s)     _malloc_dbg(s,_NORMAL_BLOCK,__FILE__,__LINE__)
    00166   #define realloc(p, s) _realloc_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__)
    00167   #define free(p)           _free_dbg(p, _NORMAL_BLOCK)
    00168  #endif // _DEBUG
    00169 #endif
    00170 #endif
    00171
    00172 #if defined(_MSC_VER) && 0
    00173 // make MSVC use standard 'for' layout - will generate lots of warning 4127 on W4 mode
    00174 #define for if(0){}else for
    00175 #endif
    00176
    00177 // stupid windows stuff
    00178 #undef FAR
    00179 #define FAR
    00180
    00181 #define DETAILED_DEBUG_REPORT (1)
    00182 #define NOTIFY_BAD_RETURNS (1)
    00183
    00184 #if defined(DETAILED_DEBUG_REPORT) && DETAILED_DEBUG_REPORT && defined(_DEBUG) && !defined(__GNUC__)
    00185 #if defined(NOTIFY_BAD_RETURNS) && NOTIFY_BAD_RETURNS
    00186 #define _DEBUG_RETURN_LEVEL     _CRT_ASSERT
    00187 #else  // NOTIFY_BAD_RETURNS
    00188 #define _DEBUG_RETURN_LEVEL     _CRT_WARN
    00189 #endif // NOTIFY_BAD_RETURNS
    00190 #include <crtdbg.h>
    00191 //#include <winbase.h>
    00192 static inline void BREAK_EXECUTION() {_asm{int 3}}
    00193 #define DEBUGMSG0(msg)                      if (1 == _CrtDbgReport(_CRT_WARN, __FILE__, __LINE__, NULL, "%s\n", msg)) BREAK_EXECUTION()
    00194 #define DEBUGMSG1(fmt,arg1)                 if (1 == _CrtDbgReport(_CRT_WARN, __FILE__, __LINE__, NULL, fmt"\n", arg1)) BREAK_EXECUTION()
    00195 #define DEBUGMSG2(fmt,arg1,arg2)            if (1 == _CrtDbgReport(_CRT_WARN, __FILE__, __LINE__, NULL, fmt"\n", arg1, arg2)) BREAK_EXECUTION()
    00196 #define DEBUGMSG3(fmt,arg1,arg2,arg3)       if (1 == _CrtDbgReport(_CRT_WARN, __FILE__, __LINE__, NULL, fmt"\n", arg1, arg2, arg3)) BREAK_EXECUTION()
    00197 #define DEBUGMSG4(fmt,arg1,arg2,arg3,arg4)  if (1 == _CrtDbgReport(_CRT_WARN, __FILE__, __LINE__, NULL, fmt"\n", arg1, arg2, arg3, arg4)) BREAK_EXECUTION()
    00198 #define DEBUGRETURN(retval,message)         if (1 == _CrtDbgReport(_DEBUG_RETURN_LEVEL, __FILE__, __LINE__, NULL, "WARNING\n%s\nRETURNING %s\n", message, #retval))\
    00199                                             {BREAK_EXECUTION();return retval;} else return retval
    00200 #define DEBUGRETURNNOVAL(message)           if (1 == _CrtDbgReport(_DEBUG_RETURN_LEVEL, __FILE__, __LINE__, NULL, "WARNING\n%s\nRETURNING void\n", message))\
    00201                                             {BREAK_EXECUTION();return;} else return
    00202 #define DEBUG_EXP_RETURN(exp,retval)        if (exp) {} else if (1 == _CrtDbgReport(_DEBUG_RETURN_LEVEL, __FILE__, __LINE__, NULL, "%s\nRETURNING %s\n", #exp, #retval))\
    00203                                             {BREAK_EXECUTION();return retval;} else return retval
    00204 #define DEBUG_EXP_RETURNMSG(exp,retval,msg) if (exp) {} else if (1 == _CrtDbgReport(_DEBUG_RETURN_LEVEL, __FILE__, __LINE__, NULL, "%s\nMESSAGE:\n%s\nRETURNING %s\n", #exp, msg, #retval))\
    00205                                             {BREAK_EXECUTION();return retval;} else return retval
    00206 #define DE_ASSERT(exp)                      if (exp) {} else if (1 != _CrtDbgReport(_DEBUG_RETURN_LEVEL, __FILE__, __LINE__, NULL, "%s", #exp)) {} else BREAK_EXECUTION()
    00207 #define DEBUG_ONLY(exp)                     exp
    00208 #else  // DETAILED_DEBUG_REPORT
    00209 static inline void BREAK_EXECUTION() {}
    00210 #define DEBUGMSG0(msg)
    00211 #define DEBUGMSG1(fmt,arg1)
    00212 #define DEBUGMSG2(fmt,arg1,arg2)
    00213 #define DEBUGMSG3(fmt,arg1,arg2,arg3)
    00214 #define DEBUGMSG4(fmt,arg1,arg2,arg3,arg4)
    00215 #define DEBUGRETURN(retval,message)         return retval
    00216 #define DEBUGRETURNNOVAL(message)           return
    00217 #define DEBUG_EXP_RETURN(exp,retval)
    00218 #define DEBUG_EXP_RETURNMSG(exp,retval,msg)
    00219 #define DE_ASSERT(exp)
    00220 #define DEBUG_ONLY(exp)
    00221 #endif // DETAILED_DEBUG_REPORT
    00222
    00223 //=================================================================================
    00224 // Enums
    00225 //=================================================================================
    00226
    00227 enum deResult
    00228 {
    00229     deFAILED = 0,
    00230     deSUCCEEDED,
    00231     deCRITICALERROR,
    00232     _deResult_Force32bit = 0x7fffffff
    00233 };
    00234
    00235
    00236
    00237 //=================================================================================
    00238 // Structures
    00239 //=================================================================================
    00240
    00241 /// base reference-counting interface for all Destiny3D classes
    00242 //class IdeRefCountBase
    00243 DE3D_INTERFACE_(IdeRefCountBase)
    00244 {
    00245 protected:
    00246     virtual ~IdeRefCountBase() {}
    00247 public:
    00248     /// increment the object's reference count
    00249     /// @return The new reference count
    00250     virtual s32 Claim() = 0;
    00251     /// decrement the object's reference count, causing destruction if it reaches 0
    00252     /// @return The new reference count
    00253     virtual s32 Release() = 0;
    00254 };
    00255 struct deIDPair
    00256 {
    00257     deWorldID   wid;
    00258     deObjectID  oid;
    00259 };
    00260 struct deVec3d
    00261 {
    00262     union   { deDouble x; deDouble X; };
    00263     union   { deDouble y; deDouble Y; };
    00264     union   { deDouble z; deDouble Z; };
    00265 //  deVec3d() {}
    00266 //  deVec3d(deDouble x_, deDouble y_, deDouble z_) : x(x_),y(y_),z(z_) {}
    00267 };
    00268 struct deVec3f
    00269 {
    00270     union { deFloat x; deFloat X; };
    00271     union { deFloat y; deFloat Y; };
    00272     union { deFloat z; deFloat Z; };
    00273 //  deVertex() {}
    00274 //  deVertex(deFloat x_, deFloat y_, deFloat z_) : x(x_),y(y_),z(z_) {}
    00275 //  explicit deVertex(const deVec3d & vec) : x((deFloat)vec.x), y((deFloat)vec.y), z((deFloat)vec.z) {}
    00276 };
    00277 typedef deVec3f deVertex;
    00278 struct deColor
    00279 {
    00280     deFloat r,g,b,a;
    00281 //  deColor() {}
    00282 //  deColor(deFloat r_, deFloat g_, deFloat b_, deFloat a_) : r(r_),g(g_),b(b_),a(a_) {}
    00283 };
    00284 struct deRect
    00285 {
    00286     long Left;
    00287     long Top;
    00288     long Right;
    00289     long Bottom;
    00290 //  deRect() {}
    00291 //  deRect(const long left_, const long top_, const long right_, const long bottom_)
    00292 //      : Left(left_),Top(top_),Right(right_),Bottom(bottom_) {}
    00293 };
    00294 struct deFloatRect
    00295 {
    00296     deFloat Top;
    00297     deFloat Left;
    00298     deFloat Bottom;
    00299     deFloat Right;
    00300 //  deFloatRect() {}
    00301 //  deFloatRect(const deFloat left_, const deFloat top_, const deFloat right_, const deFloat bottom_)
    00302 //      : Left(left_),Top(top_),Right(right_),Bottom(bottom_) {}
    00303 };
    00304 struct dePlane
    00305 {
    00306     deVec3d Norm;
    00307     deDouble Dist;
    00308 //  dePlane() {}
    00309 //  dePlane(const deVec3d & norm_, const deDouble& dist_)
    00310 //      : Norm(norm_),Dist(dist_) {}
    00311 };
    00312 struct deBoundSphere
    00313 {
    00314     deVec3d Center;
    00315     deDouble Radius;
    00316 //  deBoundSphere() {}
    00317 //  deBoundSphere(const deVec3d & center_, const deDouble& radius_)
    00318 //      : Center(center_),Radius(radius_) {}
    00319 };
    00320 struct deAABB
    00321 {
    00322     deVec3d Min;
    00323     deVec3d Max;
    00324 //  deAABB() {}
    00325 //  deAABB(const deVec3d & min_, const deVec3d& max_)
    00326 //      : Min(min_),Max(max_) {}
    00327 };
    00328 struct deOBB
    00329 {
    00330     deVec3d Corner;
    00331     deVec3d Offset[3];
    00332 };
    00333 struct deTexCoord1
    00334 {
    00335     deFloat u;
    00336 //  deTexCoord1() {}
    00337 //  deTexCoord1(deFloat u_) : u(u_) {}
    00338 };
    00339 struct deTexCoord2
    00340 {
    00341     deFloat u;
    00342     deFloat v;
    00343 /*  deTexCoord2() {}
    00344     deTexCoord2(deFloat u_, deFloat v_) : u(u_),v(v_) {}
    00345     const deTexCoord2& operator=(const deTexCoord1 & tex1) { u = tex1.u; v = 0; }
    00346     operator deTexCoord1() {return deTexCoord1(u);}
    00347     */
    00348 };
    00349 struct deTexCoord3
    00350 {
    00351     deFloat u;
    00352     deFloat v;
    00353     deFloat w;
    00354 /*  deTexCoord3() {}
    00355     deTexCoord3(deFloat u_, deFloat v_, deFloat w_) : u(u_),v(v_),w(w_) {}
    00356     explicit deTexCoord3(const deVertex& vec) : u(vec.x),v(vec.y),w(vec.z) {}
    00357     explicit deTexCoord3(const deVec3d& vec) : u((deFloat)vec.x),v((deFloat)vec.y),w((deFloat)vec.z) {}
    00358     const deTexCoord3& operator=(const deTexCoord1 & tex1) { u = tex1.u; v = 0; w = 0;}
    00359     const deTexCoord3& operator=(const deTexCoord2 & tex2) { u = tex2.u; v = tex2.v; w = 0; }
    00360     operator deTexCoord1() {return deTexCoord1(u);}
    00361     operator deTexCoord2() {return deTexCoord2(u, v);}
    00362     */
    00363 };
    00364 struct deTexCoord4
    00365 {
    00366     deFloat u;
    00367     deFloat v;
    00368     deFloat w;
    00369     deFloat t;
    00370 /*  deTexCoord4() {}
    00371     deTexCoord4(deFloat u_, deFloat v_, deFloat w_, deFloat t_) : u(u_),v(v_),w(w_),t(t_) {}
    00372     const deTexCoord4& operator=(const deTexCoord1 & tex1) { u = tex1.u; v = 0; w = 0; t = 0; }
    00373     const deTexCoord4& operator=(const deTexCoord2 & tex2) { u = tex2.u; v = tex2.v; w = 0; t = 0; }
    00374     const deTexCoord4& operator=(const deTexCoord3 & tex3) { u = tex3.u; v = tex3.v; w = tex3.w; t = 0; }
    00375     operator deTexCoord1() {return deTexCoord1(u);}
    00376     operator deTexCoord2() {return deTexCoord2(u, v);}
    00377     operator deTexCoord3() {return deTexCoord3(u, v, w);}
    00378     */
    00379 };
    00380 /*
    00381 struct deTexCoord
    00382 {
    00383     union { deFloat u; deFloat U; };
    00384     union { deFloat v; deFloat V; };
    00385 };
    00386 */
    00387 typedef deTexCoord2 deTexCoord;
    00388 struct deLVert
    00389 {
    00390     deVec3d Pos;
    00391     deVec3d Norm;
    00392     deColor Color;
    00393     deTexCoord UV;
    00394 };
    00395
    00396 // helper implementation, not to be used in public interfaces
    00397 class deRefCountBase : virtual public IdeRefCountBase
    00398 {
    00399 private:
    00400     s32 m_NumClaims;
    00401 protected:
    00402     deRefCountBase() : m_NumClaims(1) {}
    00403     virtual ~deRefCountBase() {}
    00404 public:
    00405     s32 Claim()
    00406     {   ++m_NumClaims;
    00407         return m_NumClaims;
    00408     }
    00409     s32 Release()
    00410     {   --m_NumClaims;
    00411         if (m_NumClaims == 0)
    00412         {   delete this;
    00413             return 0;
    00414         }
    00415         return m_NumClaims;
    00416     }
    00417 };
    00418
    00419
    00420 //=================================================================================
    00421 // Constants
    00422 //=================================================================================
    00423 const deDouble DE_PI = (deDouble)3.14159265358979323846;
    00424 const deDouble DE_ONEOVERPI = (deDouble)0.318309886183790671;
    00425 const deVec3d deZeroVec = {0,0,0};
    00426 const deVec3d deOneVec = {1,1,1};
    00427 const deVec3d deVecX = {1,0,0};
    00428 const deVec3d deVecY = {0,1,0};
    00429 const deVec3d deVecZ = {0,0,1};
    00430 const deTexCoord deZeroTex = {0,0};
    00431
    00432 //=================================================================================
    00433 // Conversions
    00434 //=================================================================================
    00435 #pragma warning (disable : 4244)
    00436 static inline deColor deMake_Color(deARGB in) { deColor ret = {((in>>16)&0xFF)/255.0f, ((in>>8)&0xFF)/255.0f, (in&0XFF)/255.0f, ((in>>24)&0xFF)/255.0f}; return ret;}
    00437 static inline deARGB deMake_Color(deColor &in) { deARGB ret = ((deARGB(in.a*255))<<24) | ((deARGB(in.r*255))<<16) | ((deARGB(in.g*255))<<8) | ((deARGB(in.b*255))); return ret; }
    00438 static inline deVec3d deMake_Vec3d(deDouble x, deDouble y, deDouble z) {deVec3d ret = {x,y,z}; return ret;}
    00439 static inline deVec3d deMake_Vec3d(const deVertex & vec) {deVec3d ret = {vec.x,vec.y,vec.z}; return ret;}
    00440 static inline deVertex deMake_Vertex(deFloat x, deFloat y, deFloat z) {deVertex ret = {x,y,z}; return ret;}
    00441 static inline deVertex deMake_Vertex(const deVec3d & vec) {deVertex ret = {(deFloat)vec.x,(deFloat)vec.y,(deFloat)vec.z}; return ret;}
    00442 static inline deTexCoord deMake_TexCoord(deFloat u_, deFloat v_) { deTexCoord ret = {u_, v_}; return ret; }
    00443 static inline void deMake_TexCoord(deTexCoord1& target, const deTexCoord2& tex2) { target.u = tex2.u; }
    00444 static inline void deMake_TexCoord(deTexCoord1& target, const deTexCoord3& tex3) { target.u = tex3.u; }
    00445 static inline void deMake_TexCoord(deTexCoord1& target, const deTexCoord4& tex4) { target.u = tex4.u; }
    00446 static inline void deMake_TexCoord(deTexCoord2& target, const deTexCoord1& tex1) { target.u = tex1.u; target.v = 0; }
    00447 static inline void deMake_TexCoord(deTexCoord2& target, const deTexCoord3& tex3) { target.u = tex3.u; target.v = tex3.v; }
    00448 static inline void deMake_TexCoord(deTexCoord2& target, const deTexCoord4& tex4) { target.u = tex4.u; target.v = tex4.v; }
    00449 static inline void deMake_TexCoord(deTexCoord3& target, const deTexCoord1& tex1) { target.u = tex1.u; target.v = 0; target.w = 0; }
    00450 static inline void deMake_TexCoord(deTexCoord3& target, const deTexCoord2& tex2) { target.u = tex2.u; target.v = tex2.v; target.w = 0; }
    00451 static inline void deMake_TexCoord(deTexCoord3& target, const deTexCoord4& tex4) { target.u = tex4.u; target.v = tex4.v; target.w = tex4.w; }
    00452 static inline void deMake_TexCoord(deTexCoord4& target, const deTexCoord1& tex1) { target.u = tex1.u; target.v = 0; target.w = 0; target.t = 0; }
    00453 static inline void deMake_TexCoord(deTexCoord4& target, const deTexCoord2& tex2) { target.u = tex2.u; target.v = tex2.v; target.w = 0; target.t = 0; }
    00454 static inline void deMake_TexCoord(deTexCoord4& target, const deTexCoord3& tex3) { target.u = tex3.u; target.v = tex3.v; target.w = tex3.w; target.t = 0; }
    00455 #pragma warning (default : 4244)
    00456
    00457 //=================================================================================
    00458 // Useful macros
    00459 //=================================================================================
    00460 #define DEG2RAD(d) ((d)*(DE_PI/180.0))
    00461 #define RAD2DEG(r) ((r)*(180*DE_ONEOVERPI))
    00462
    00463 #define DE3D_SAFE_DELETE(p)       if(!p) {} else delete (p);     (p)=NULL
    00464 #define DE3D_SAFE_DELETE_ARRAY(p) if(!p) {} else delete[] (p);   (p)=NULL
    00465 #define DE3D_SAFE_RELEASE(p)      if(!p) {} else (p)->Release(); (p)=NULL
    00466
    00467 // comment these two lines to adjust message output on compilation
    00468 #define _TODO
    00469 #define _PRINT_NOTES
    00470 #ifdef _TODO
    00471     #define __DE_FILE__LINE__ __FILE__ "(" DESTRINGIZE_VALUE(__LINE__) "): "
    00472
    00473     #define TODO(x) message(__DE_FILE__LINE__"\n"\
    00474             "+--------------------------------\n"\
    00475             "| TODO : " #x                   "\n"\
    00476             "+--------------------------------\n")
    00477     #define FIXME(x) message(__DE_FILE__LINE__"\n"\
    00478             "+--------------------------------\n"\
    00479             "| FIXME: " #x                   "\n"\
    00480             "+--------------------------------\n")
    00481
    00482     #ifdef _PRINT_NOTES
    00483         #define note(x) message(__DE_FILE__LINE__ "NOTE: " #x "\n")
    00484     #else
    00485         #define note(x) _BLANK_PRAGMA
    00486     #endif
    00487     #define todo(x)  message(__DE_FILE__LINE__ "TODO: " #x "\n")
    00488     #define fixme(x) message(__DE_FILE__LINE__ "FIXME: " #x "\n")
    00489 #else
    00490     #define _BLANK_PRAGMA
    00491     #define TODO(x) _BLANK_PRAGMA
    00492     #define FIXME(x) _BLANK_PRAGMA
    00493     #define note(x) _BLANK_PRAGMA
    00494     #define todo(x) _BLANK_PRAGMA
    00495     #define fixme(x) _BLANK_PRAGMA
    00496 #endif
    00497
    00498
    00499 #endif //End DEGLOBALTYPES_HPP
    00500