Macros.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2011, SRI International (R)
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #pragma once
19 
20 #ifndef __OpenKarto_Macros_h__
21 #define __OpenKarto_Macros_h__
22 
24 
25 
29 
33 #ifndef KARTO_DEPRECATED
34 # if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__==3 && __GNUC_MINOR__>=1))
35 # define KARTO_DEPRECATED __attribute__((deprecated))
36 # elif defined(__INTEL) || defined(_MSC_VER)
37 # define KARTO_DEPRECATED __declspec(deprecated)
38 # else
39 # define KARTO_DEPRECATED
40 # endif
41 #endif
42 
46 
50 #ifndef KARTO_FORCEINLINE
51 # if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__==3 && __GNUC_MINOR__>=1))
52 # define KARTO_FORCEINLINE inline __attribute__((always_inline))
53 # elif defined(__INTEL) || defined(_MSC_VER)
54 # define KARTO_FORCEINLINE __forceinline
55 # else
56 # define KARTO_FORCEINLINE
57 # endif
58 #endif
59 
63 
67 #if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__)
68 # if defined( _LIB ) || defined( KARTO_STATIC ) || defined( STATIC_BUILD )
69 # define KARTO_EXPORT
70 # else
71 # ifdef KARTO_DYNAMIC
72 # define KARTO_EXPORT __declspec(dllexport)
73 # else
74 # define KARTO_EXPORT __declspec(dllimport)
75 # endif // KARTO_DYNAMIC
76 # endif
77 #else
78 # define KARTO_EXPORT
79 #endif
80 
84 
88 #define forEach( listtype, list ) \
89  for ( listtype::iterator iter = (list)->begin(); iter != (list)->end(); ++iter )
90 
94 #define forEachAs( listtype, list, iter ) \
95  for ( listtype::iterator iter = (list)->begin(); iter != (list)->end(); ++iter )
96 
100 #define const_forEach( listtype, list ) \
101  for ( listtype::const_iterator iter = (list)->begin(); iter != (list)->end(); ++iter )
102 
106 #define const_forEachAs( listtype, list, iter ) \
107  for ( listtype::const_iterator iter = (list)->begin(); iter != (list)->end(); ++iter )
108 
112 #define forEachR( listtype, list ) \
113  for ( listtype::reverse_iterator iter = (list)->rbegin(); iter != (list)->rend(); ++iter )
114 
118 #define const_forEachR( listtype, list ) \
119  for ( listtype::const_reverse_iterator iter = (list)->rbegin(); iter != (list)->rend(); ++iter )
120 
124 #define karto_forEach(listtype, list) \
125  for ( listtype::Iterator iter = (list)->GetIterator(); iter.HasNext(); iter.Next())
126 
130 #define karto_forEachAs(listtype, list, iter) \
131  for ( listtype::Iterator iter = (list)->GetIterator(); iter.HasNext(); iter.Next())
132 
136 #define karto_const_forEach(listtype, list) \
137  for ( listtype::ConstIterator iter = (list)->GetConstIterator(); iter.HasNext(); iter.Next())
138 
142 #define karto_const_forEachAs(listtype, list, iter) \
143  for ( listtype::ConstIterator iter = (list)->GetConstIterator(); iter.HasNext(); iter.Next())
144 
145 
149 
154 #if defined(__INTEL) || defined(_MSC_VER)
155 
156 // Disable the warning: 'identifier' : unreferenced formal parameter
157 #pragma warning(disable:4100)
158 
159 // Disable the warning: 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
160 #pragma warning(disable:4251)
161 
162 // Disable the warning: 'identifier' assignment operator could not be generated
163 #pragma warning(disable:4512)
164 
165 #endif
166 
167 #ifdef __INTEL_COMPILER
168 
170 //#pragma warning(disable:4127)
171 //
173 //#pragma warning(disable:4100)
174 //
176 //#pragma warning(disable:383)
177 //
180 //#pragma warning(disable:981)
181 //
183 //#pragma warning(disable:1418)
184 //
187 //#pragma warning(disable:1572)
188 //
190 //#pragma warning(disable:10121)
191 
192 #endif // __INTEL_COMPILER
193 
195 
196 #endif // __OpenKarto_Macros_h__


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Tue Nov 7 2017 06:02:36