00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __KARTO_MACROS__
00019 #define __KARTO_MACROS__
00020
00024
00028 #ifndef KARTO_DEPRECATED
00029 # if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__==3 && __GNUC_MINOR__>=1))
00030 # define KARTO_DEPRECATED __attribute__((deprecated))
00031 # elif defined(__INTEL) || defined(_MSC_VER)
00032 # define KARTO_DEPRECATED __declspec(deprecated)
00033 # else
00034 # define KARTO_DEPRECATED
00035 # endif
00036 #endif
00037
00041
00045 #if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__)
00046 # if defined( _LIB ) || defined( KARTO_STATIC ) || defined( STATIC_BUILD )
00047 # define KARTO_EXPORT
00048 # else
00049 # ifdef KARTO_DYNAMIC
00050 # define KARTO_EXPORT __declspec(dllexport)
00051 # else
00052 # define KARTO_EXPORT __declspec(dllimport)
00053 # endif // KARTO_DYNAMIC
00054 # endif
00055 #else
00056 # define KARTO_EXPORT
00057 #endif
00058
00062
00066 #define forEach( listtype, list ) \
00067 for ( listtype::iterator iter = (list)->begin(); iter != (list)->end(); ++iter )
00068
00069 #define forEachAs( listtype, list, iter ) \
00070 for ( listtype::iterator iter = (list)->begin(); iter != (list)->end(); ++iter )
00071
00072 #define const_forEach( listtype, list ) \
00073 for ( listtype::const_iterator iter = (list)->begin(); iter != (list)->end(); ++iter )
00074
00075 #define const_forEachAs( listtype, list, iter ) \
00076 for ( listtype::const_iterator iter = (list)->begin(); iter != (list)->end(); ++iter )
00077
00078 #define forEachR( listtype, list ) \
00079 for ( listtype::reverse_iterator iter = (list)->rbegin(); iter != (list)->rend(); ++iter )
00080
00081 #define const_forEachR( listtype, list ) \
00082 for ( listtype::const_reverse_iterator iter = (list)->rbegin(); iter != (list)->rend(); ++iter )
00083
00084
00088
00093 #if defined(__INTEL) || defined(_MSC_VER)
00094
00095
00096 #pragma warning(disable:4251)
00097
00098 #endif
00099
00100 #ifdef __INTEL_COMPILER
00101
00102
00103 #pragma warning(disable:4127)
00104
00105
00106 #pragma warning(disable:4100)
00107
00108
00109 #pragma warning(disable:383)
00110
00111
00112
00113 #pragma warning(disable:981)
00114
00115
00116 #pragma warning(disable:1418)
00117
00118
00119
00120 #pragma warning(disable:1572)
00121
00122
00123 #pragma warning(disable:10121)
00124
00125 #endif // __INTEL_COMPILER
00126
00127 #endif // __KARTO_MACROS__