IcePreprocessor.h
Go to the documentation of this file.
00001 
00002 
00008 
00009 
00011 // Include Guard
00012 #ifndef __ICEPREPROCESSOR_H__
00013 #define __ICEPREPROCESSOR_H__
00014 
00015         // Check platform
00016         #if defined( _WIN32 ) || defined( WIN32 )
00017                 // #pragma message("Compiling on Windows...")
00018                 #define PLATFORM_WINDOWS
00019         #else
00020                 // don't issue pragmas on unknown platforms
00021                 // #pragma message("Compiling on unknown platform...")
00022         #endif
00023 
00024         // Check compiler
00025         #if defined(_MSC_VER)
00026                 // #pragma message("Compiling with VC++...")
00027                 #define COMPILER_VISUAL_CPP
00028         #else
00029                 // don't issue pragmas on unknown platforms
00030                 // #pragma message("Compiling with unknown compiler...")
00031         #endif
00032 
00033         // Check compiler options. If this file is included in user-apps, this
00034         // shouldn't be needed, so that they can use what they like best.
00035         #ifndef ICE_DONT_CHECK_COMPILER_OPTIONS
00036                 #ifdef COMPILER_VISUAL_CPP
00037                         #if defined(_CHAR_UNSIGNED)
00038                         #endif
00039 
00040                         #if defined(_CPPRTTI)
00041                                 #error Please disable RTTI...
00042                         #endif
00043 
00044                         #if defined(_CPPUNWIND)
00045                                 #error Please disable exceptions...
00046                         #endif
00047 
00048                         #if defined(_MT)
00049                                 // Multithreading
00050                         #endif
00051                 #endif
00052         #endif
00053 
00054         // Check debug mode
00055         #ifdef  DEBUG                   // May be defined instead of _DEBUG. Let's fix it.
00056                 #ifndef _DEBUG
00057                         #define _DEBUG
00058                 #endif
00059         #endif
00060 
00061         #ifdef  _DEBUG
00062         // Here you may define items for debug builds
00063         #endif
00064 
00065         #ifndef THIS_FILE
00066                 #define THIS_FILE                       __FILE__
00067         #endif
00068 
00069         #ifndef ICE_NO_DLL
00070                 #ifdef ICECORE_EXPORTS
00071                         #define ICECORE_API                     __declspec(dllexport)
00072                 #else
00073                         #define ICECORE_API                     __declspec(dllimport)
00074                 #endif
00075         #else
00076                         #define ICECORE_API
00077         #endif
00078 
00079         // Don't override new/delete
00080 //      #define DEFAULT_NEWDELETE
00081         #define DONT_TRACK_MEMORY_LEAKS
00082 
00083         #define FUNCTION                                extern "C"
00084 
00085         // Cosmetic stuff [mainly useful with multiple inheritance]
00086         #define override(base_class)    virtual
00087 
00088         // Our own inline keyword, so that:
00089         // - we can switch to __forceinline to check it's really better or not
00090         // - we can remove __forceinline if the compiler doesn't support it
00091 //      #define inline_                         __forceinline
00092 //      #define inline_                         inline
00093 
00094         // Contributed by Bruce Mitchener
00095                 #if defined(COMPILER_VISUAL_CPP)
00096                         #define inline_                 __forceinline
00097 //                      #define inline_                 inline
00098                 #elif defined(__GNUC__) && __GNUC__ < 3
00099                         #define inline_ inline
00100                 #elif defined(__GNUC__)
00101                         #define inline_ inline __attribute__ ((always_inline))
00102                 #else
00103                         #define inline_ inline
00104                 #endif
00105 
00106         // Down the hatch
00107 #ifdef _MSC_VER
00108         #pragma inline_depth( 255 )
00109 #endif
00110 
00111         #ifdef COMPILER_VISUAL_CPP
00112                 #pragma intrinsic(memcmp)
00113                 #pragma intrinsic(memcpy)
00114                 #pragma intrinsic(memset)
00115                 #pragma intrinsic(strcat)
00116                 #pragma intrinsic(strcmp)
00117                 #pragma intrinsic(strcpy)
00118                 #pragma intrinsic(strlen)
00119                 #pragma intrinsic(abs)
00120                 #pragma intrinsic(labs)
00121         #endif
00122 
00123         // ANSI compliance
00124         #ifdef  _DEBUG
00125                 // Remove painful warning in debug
00126                 inline_ bool __False__(){ return false; }
00127                 #define for if(__False__()){}   else for
00128         #else
00129                 #define for if(0){}     else for
00130         #endif
00131 
00132 #endif // __ICEPREPROCESSOR_H__


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sun Apr 2 2017 03:43:54