Macros.h
Go to the documentation of this file.
1 /*
2  * Copyright 2010 SRI International
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 #ifndef karto_sdk_MACROS_H
19 #define karto_sdk_MACROS_H
20 
24 
28 #ifndef KARTO_DEPRECATED
29 # if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__>=1))
30 # define KARTO_DEPRECATED __attribute__((deprecated))
31 # elif defined(__INTEL) || defined(_MSC_VER)
32 # define KARTO_DEPRECATED __declspec(deprecated)
33 # else
34 # define KARTO_DEPRECATED
35 # endif
36 #endif
37 
41 
45 #if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__)
46 # if defined( _LIB ) || defined( KARTO_STATIC ) || defined( STATIC_BUILD )
47 # define KARTO_EXPORT
48 # else
49 # ifdef KARTO_DYNAMIC
50 # define KARTO_EXPORT __declspec(dllexport)
51 # else
52 # define KARTO_EXPORT __declspec(dllimport)
53 # endif // KARTO_DYNAMIC
54 # endif
55 #else
56 # define KARTO_EXPORT
57 #endif
58 
62 
66 #define forEach( listtype, list ) \
67  for ( listtype::iterator iter = (list)->begin(); iter != (list)->end(); ++iter )
68 
69 #define forEachAs( listtype, list, iter ) \
70  for ( listtype::iterator iter = (list)->begin(); iter != (list)->end(); ++iter )
71 
72 #define const_forEach( listtype, list ) \
73  for ( listtype::const_iterator iter = (list)->begin(); iter != (list)->end(); ++iter )
74 
75 #define const_forEachAs( listtype, list, iter ) \
76  for ( listtype::const_iterator iter = (list)->begin(); iter != (list)->end(); ++iter )
77 
78 #define forEachR( listtype, list ) \
79  for ( listtype::reverse_iterator iter = (list)->rbegin(); iter != (list)->rend(); ++iter )
80 
81 #define const_forEachR( listtype, list ) \
82  for ( listtype::const_reverse_iterator iter = (list)->rbegin(); iter != (list)->rend(); ++iter )
83 
84 
88 
93 #if defined(__INTEL) || defined(_MSC_VER)
94 
95 // Disable the warning: 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
96 #pragma warning(disable:4251)
97 
98 #endif
99 
100 #ifdef __INTEL_COMPILER
101 
102 // Disable the warning: conditional expression is constant
103 #pragma warning(disable:4127)
104 
105 // Disable the warning: 'identifier' : unreferenced formal parameter
106 #pragma warning(disable:4100)
107 
108 // remark #383: value copied to temporary, reference to temporary used
109 #pragma warning(disable:383)
110 
111 // remark #981: operands are evaluated in unspecified order
112 // disabled -> completely pointless if the functions do not have side effects
113 #pragma warning(disable:981)
114 
115 // remark #1418: external function definition with no prior declaration
116 #pragma warning(disable:1418)
117 
118 // remark #1572: floating-point equality and inequality comparisons are unreliable
119 // disabled -> everyone knows it, the parser passes this problem deliberately to the user
120 #pragma warning(disable:1572)
121 
122 // remark #10121:
123 #pragma warning(disable:10121)
124 
125 #endif // __INTEL_COMPILER
126 
127 #endif // karto_sdk_MACROS_H


slam_toolbox
Author(s): Steve Macenski
autogenerated on Sat Oct 3 2020 03:51:01