Macros.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2010 SRI International
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 #ifndef OPEN_KARTO_MACROS_H
00019 #define OPEN_KARTO_MACROS_H
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 // Disable the warning: 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
00096 #pragma warning(disable:4251)
00097 
00098 #endif
00099 
00100 #ifdef __INTEL_COMPILER
00101 
00102 // Disable the warning: conditional expression is constant
00103 #pragma warning(disable:4127)
00104 
00105 // Disable the warning: 'identifier' : unreferenced formal parameter
00106 #pragma warning(disable:4100)
00107 
00108 // remark #383: value copied to temporary, reference to temporary used
00109 #pragma warning(disable:383)
00110 
00111 // remark #981: operands are evaluated in unspecified order
00112 // disabled -> completely pointless if the functions do not have side effects
00113 #pragma warning(disable:981)
00114 
00115 // remark #1418: external function definition with no prior declaration
00116 #pragma warning(disable:1418)
00117 
00118 // remark #1572: floating-point equality and inequality comparisons are unreliable
00119 // disabled -> everyone knows it, the parser passes this problem deliberately to the user
00120 #pragma warning(disable:1572)
00121 
00122 // remark #10121:
00123 #pragma warning(disable:10121)
00124 
00125 #endif  // __INTEL_COMPILER
00126 
00127 #endif  // OPEN_KARTO_MACROS_H


open_karto
Author(s):
autogenerated on Thu Jun 6 2019 21:02:56