Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #pragma once
00019
00020 #ifndef __OpenKarto_Macros_h__
00021 #define __OpenKarto_Macros_h__
00022
00024
00025
00029
00033 #ifndef KARTO_DEPRECATED
00034 # if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__==3 && __GNUC_MINOR__>=1))
00035 # define KARTO_DEPRECATED __attribute__((deprecated))
00036 # elif defined(__INTEL) || defined(_MSC_VER)
00037 # define KARTO_DEPRECATED __declspec(deprecated)
00038 # else
00039 # define KARTO_DEPRECATED
00040 # endif
00041 #endif
00042
00046
00050 #ifndef KARTO_FORCEINLINE
00051 # if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__==3 && __GNUC_MINOR__>=1))
00052 # define KARTO_FORCEINLINE inline __attribute__((always_inline))
00053 # elif defined(__INTEL) || defined(_MSC_VER)
00054 # define KARTO_FORCEINLINE __forceinline
00055 # else
00056 # define KARTO_FORCEINLINE
00057 # endif
00058 #endif
00059
00063
00067 #if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__)
00068 # if defined( _LIB ) || defined( KARTO_STATIC ) || defined( STATIC_BUILD )
00069 # define KARTO_EXPORT
00070 # else
00071 # ifdef KARTO_DYNAMIC
00072 # define KARTO_EXPORT __declspec(dllexport)
00073 # else
00074 # define KARTO_EXPORT __declspec(dllimport)
00075 # endif // KARTO_DYNAMIC
00076 # endif
00077 #else
00078 # define KARTO_EXPORT
00079 #endif
00080
00084
00088 #define forEach( listtype, list ) \
00089 for ( listtype::iterator iter = (list)->begin(); iter != (list)->end(); ++iter )
00090
00094 #define forEachAs( listtype, list, iter ) \
00095 for ( listtype::iterator iter = (list)->begin(); iter != (list)->end(); ++iter )
00096
00100 #define const_forEach( listtype, list ) \
00101 for ( listtype::const_iterator iter = (list)->begin(); iter != (list)->end(); ++iter )
00102
00106 #define const_forEachAs( listtype, list, iter ) \
00107 for ( listtype::const_iterator iter = (list)->begin(); iter != (list)->end(); ++iter )
00108
00112 #define forEachR( listtype, list ) \
00113 for ( listtype::reverse_iterator iter = (list)->rbegin(); iter != (list)->rend(); ++iter )
00114
00118 #define const_forEachR( listtype, list ) \
00119 for ( listtype::const_reverse_iterator iter = (list)->rbegin(); iter != (list)->rend(); ++iter )
00120
00124 #define karto_forEach(listtype, list) \
00125 for ( listtype::Iterator iter = (list)->GetIterator(); iter.HasNext(); iter.Next())
00126
00130 #define karto_forEachAs(listtype, list, iter) \
00131 for ( listtype::Iterator iter = (list)->GetIterator(); iter.HasNext(); iter.Next())
00132
00136 #define karto_const_forEach(listtype, list) \
00137 for ( listtype::ConstIterator iter = (list)->GetConstIterator(); iter.HasNext(); iter.Next())
00138
00142 #define karto_const_forEachAs(listtype, list, iter) \
00143 for ( listtype::ConstIterator iter = (list)->GetConstIterator(); iter.HasNext(); iter.Next())
00144
00145
00149
00154 #if defined(__INTEL) || defined(_MSC_VER)
00155
00156
00157 #pragma warning(disable:4100)
00158
00159
00160 #pragma warning(disable:4251)
00161
00162
00163 #pragma warning(disable:4512)
00164
00165 #endif
00166
00167 #ifdef __INTEL_COMPILER
00168
00170
00171
00173
00174
00176
00177
00180
00181
00183
00184
00187
00188
00190
00191
00192 #endif // __INTEL_COMPILER
00193
00195
00196 #endif // __OpenKarto_Macros_h__