Macros.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2006-2011, SRI International (R)
00003  *
00004  * This program is free software: you can redistribute it and/or modify
00005  * it under the terms of the GNU Lesser General Public License as published by
00006  * the Free Software Foundation, either version 3 of the License, or
00007  * (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public License
00015  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
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 // Disable the warning: 'identifier' : unreferenced formal parameter
00157 #pragma warning(disable:4100)
00158 
00159 // Disable the warning: 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
00160 #pragma warning(disable:4251)
00161 
00162 // Disable the warning: 'identifier' assignment operator could not be generated
00163 #pragma warning(disable:4512)
00164 
00165 #endif
00166 
00167 #ifdef __INTEL_COMPILER
00168 
00170 //#pragma warning(disable:4127)
00171 //
00173 //#pragma warning(disable:4100)
00174 //
00176 //#pragma warning(disable:383)
00177 //
00180 //#pragma warning(disable:981)
00181 //
00183 //#pragma warning(disable:1418)
00184 //
00187 //#pragma warning(disable:1572)
00188 //
00190 //#pragma warning(disable:10121)
00191 
00192 #endif // __INTEL_COMPILER
00193 
00195 
00196 #endif // __OpenKarto_Macros_h__


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Mon Oct 6 2014 02:44:17