stlhelper.h
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
00019
00020
00021
00022
00023
00024
00025
00026
00027
00029
00031
00033
00034 #ifndef STLHELPER_INCLUDED_
00035 #define STLHELPER_INCLUDED_
00036
00037 #if _MSC_VER > 1000
00038 #pragma once
00039 #endif
00040
00041
00043
00045
00046 #ifdef STL_USING_ALL
00047
00048 #define STL_USING_MAP
00049 #define STL_USING_VECTOR
00050 #define STL_USING_LIST
00051 #define STL_USING_STRING
00052 #define STL_USING_STREAM
00053 #define STL_USING_ASSERT
00054 #define STL_USING_MEMORY
00055 #define STL_USING_STACK
00056
00057 #endif
00058
00059
00061
00063
00064 #ifdef STL_USING_MAP
00065
00066 #pragma warning(push)
00067
00068 #include <yvals.h>
00069
00070 #pragma warning(disable: 4018) // signed/unsigned mismatch
00071 #pragma warning(disable: 4100) // unreferenced formal parameter
00072 #pragma warning(disable: 4245) // conversion from 'type1' to 'type2', signed/unsigned mismatch
00073 #pragma warning(disable: 4512) // 'class' : assignment operator could not be generated
00074 #pragma warning(disable: 4663) // C++ language change: to explicitly specialize class template 'vector'
00075 #pragma warning(disable: 4710) // 'function' : function not inlined
00076 #pragma warning(disable: 4786) // identifier was truncated to 'number' characters in the debug information
00077
00078
00079
00080
00081
00082 #include <map>
00083
00084 #pragma warning(pop)
00085
00086 #endif
00087
00088
00090
00092
00093 #ifdef STL_USING_VECTOR
00094
00095 #pragma warning(push)
00096
00097 #include <yvals.h>
00098
00099 #pragma warning(disable: 4018) // signed/unsigned mismatch
00100 #pragma warning(disable: 4100) // unreferenced formal parameter
00101 #pragma warning(disable: 4245) // conversion from 'type1' to 'type2', signed/unsigned mismatch
00102 #pragma warning(disable: 4663) // C++ language change: to explicitly specialize class template 'vector'
00103 #pragma warning(disable: 4702) // unreachable code
00104 #pragma warning(disable: 4710) // 'function' : function not inlined
00105 #pragma warning(disable: 4786) // identifier was truncated to 'number' characters in the debug information
00106
00107 #include <vector>
00108
00109 #pragma warning(pop)
00110
00111 #endif
00112
00113
00115
00117
00118 #ifdef STL_USING_LIST
00119
00120 #pragma warning(push)
00121
00122 #include <yvals.h>
00123
00124 #pragma warning(disable: 4100) // unreferenced formal parameter
00125 #pragma warning(disable: 4284) // return type for 'identifier::operator ->' is not a UDT or reference
00126
00127 #pragma warning(disable: 4710) // 'function' : function not inlined
00128 #pragma warning(disable: 4786) // identifier was truncated to 'number' characters in the debug information
00129
00130 #include <list>
00131
00132 #pragma warning(pop)
00133
00134 #endif
00135
00136
00138
00140
00141 #ifdef STL_USING_STRING
00142
00143 #pragma warning(push)
00144
00145 #include <yvals.h>
00146
00147 #pragma warning(disable: 4018) // signed/unsigned mismatch
00148 #pragma warning(disable: 4100) // unreferenced formal parameter
00149 #pragma warning(disable: 4146) // unary minus operator applied to unsigned type, result still unsigned
00150 #pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data
00151 #pragma warning(disable: 4245) // conversion from 'type1' to 'type2', signed/unsigned mismatch
00152 #pragma warning(disable: 4511) // 'class' : copy constructor could not be generated
00153 #pragma warning(disable: 4512) // 'class' : assignment operator could not be generated
00154 #pragma warning(disable: 4663) // C++ language change: to explicitly specialize class template 'vector'
00155 #pragma warning(disable: 4710) // 'function' : function not inlined
00156 #pragma warning(disable: 4786) // identifier was truncated to 'number' characters in the debug information
00157
00158 #include <string>
00159
00160 #pragma warning(pop)
00161
00162 #pragma warning(disable: 4514) // unreferenced inline/local function has been removed
00163 #pragma warning(disable: 4710) // 'function' : function not inlined
00164 #pragma warning(disable: 4786) // identifier was truncated to 'number' characters in the debug information
00165
00166 #endif
00167
00168
00170
00172
00173 #ifdef STL_USING_STREAM
00174
00175 #pragma warning(push)
00176
00177 #include <yvals.h>
00178
00179 #pragma warning(disable: 4097) // typedef-name 'identifier1' used as synonym for class-name 'identifier2'
00180 #pragma warning(disable: 4127) // conditional expression is constant
00181
00182 #include <sstream>
00183 #include <fstream>
00184
00185 #pragma warning(pop)
00186
00187 #endif
00188
00189
00191
00193
00194 #ifdef STL_USING_MEMORY
00195
00196
00197
00198
00199
00200
00201
00202 #pragma warning(push)
00203
00204 #include <yvals.h>
00205
00206 #pragma warning(disable: 4018) // signed/unsigned mismatch
00207 #pragma warning(disable: 4100) // unreferenced formal parameter
00208 #pragma warning(disable: 4245) // conversion from 'type1' to 'type2', signed/unsigned mismatch
00209 #pragma warning(disable: 4710) // 'function' : function not inlined
00210 #pragma warning(disable: 4786) // identifier was truncated to 'number' characters in the debug information
00211
00212 #include <memory>
00213
00214 #pragma warning(pop)
00215
00216 #endif
00217
00218
00220
00222
00223 #ifdef STL_USING_STACK
00224
00225 #pragma warning(push)
00226
00227 #include <yvals.h>
00228
00229 #pragma warning(disable: 4018) // signed/unsigned mismatch
00230 #pragma warning(disable: 4100) // unreferenced formal parameter
00231 #pragma warning(disable: 4245) // conversion from 'type1' to 'type2', signed/unsigned mismatch
00232 #pragma warning(disable: 4710) // 'function' : function not inlined
00233 #pragma warning(disable: 4786) // identifier was truncated to 'number' characters in the debug information
00234
00235 #include <stack>
00236
00237 #pragma warning(pop)
00238
00239 #endif
00240
00241
00243
00245
00246 #ifdef STL_USING_ASSERT
00247
00248
00249 #ifndef ASSERT
00250
00251 #include <cassert>
00252
00253
00254 #ifdef _DEBUG
00255
00256 #define ASSERT( exp ) assert( exp )
00257 #define VERIFY( exp ) assert( exp )
00258 #define TRACE ::OutputDebugString
00259
00260 #else
00261
00262 #define ASSERT( exp ) ((void)0)
00263 #define VERIFY( exp ) ((void)(exp))
00264 #define TRACE 1 ? (void)0 : ::OutputDebugString
00265
00266 #endif // _DEBUG
00267
00268 #endif // ASSERT
00269
00270
00271 #define ASSERT_BREAK( exp ) { ASSERT(exp); if( !(exp) ) break; }
00272 #define ASSERT_CONTINUE( exp ) { ASSERT(exp); if( !(exp) ) continue; }
00273 #define ASSERT_RETURN( exp ) { ASSERT(exp); if( !(exp) ) return; }
00274 #define ASSERT_RETURN_NULL( exp ) { ASSERT(exp); if( !(exp) ) return 0; }
00275 #define ASSERT_RETURN_FALSE( exp ) { ASSERT(exp); if( !(exp) ) return false; }
00276
00277 #endif // STL_USING_ASSERT
00278
00279
00281
00283
00284 #if defined STL_USING_MAP || defined STL_USING_VECTOR || defined STL_USING_LIST || \
00285 defined STL_USING_STRING || defined STL_USING_STREAM || defined STL_USING_ASSERT || \
00286 defined STL_USING_MEMORY || defined STL_USING_STACK
00287 using std::string;
00288 using std::vector;
00289 using std::vector<string>;
00290 using std::vector<string>::iterator;
00291 #else
00292 #pragma message( "Warning: You included <STL.H> without using any STL features!" )
00293 #endif
00294
00295 #endif // STLHELPER_INCLUDED_
00296
Generated
for
My SDL C++ Gui by
1.3.6
Page, code, and content Copyright (C) 2004 by Anders Hedström