/home/ntakagi/work/STLport-5.1.5/stlport/stl/_typeinfo.hGo to the documentation of this file.00001 /* 00002 * Copyright (c) 1999 00003 * Boris Fomitchev 00004 * 00005 * This material is provided "as is", with absolutely no warranty expressed 00006 * or implied. Any use is at your own risk. 00007 * 00008 * Permission to use or copy this software for any purpose is hereby granted 00009 * without fee, provided the above notices are retained on all copies. 00010 * Permission to modify the code and to distribute modified code is granted, 00011 * provided the above notices are retained, and a notice that the code was 00012 * modified is included with the above copyright notice. 00013 * 00014 */ 00015 00016 #ifndef _STLP_INTERNAL_TYPEINFO 00017 #define _STLP_INTERNAL_TYPEINFO 00018 00019 #if !defined (_STLP_NO_TYPEINFO) 00020 00021 # if defined (_STLP_NO_NEW_NEW_HEADER) 00022 # include <typeinfo.h> 00023 # else 00024 # ifdef _STLP_BROKEN_BAD_CAST_CLASS 00025 # define bad_cast _STLP_NULLIFIED_BROKEN_BAD_CAST_CLASS 00026 # endif 00027 # include _STLP_NATIVE_CPP_RUNTIME_HEADER(typeinfo) 00028 # ifdef _STLP_BROKEN_BAD_CAST_CLASS 00029 # undef bad_cast 00030 # undef _STLP_NULLIFIED_BROKEN_BAD_CAST_CLASS 00031 # endif 00032 # endif 00033 00034 # if (defined(_STLP_MSVC) && (_STLP_MSVC >= 1300)) || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) 00035 // In .NET, <typeinfo> actually includes <typeinfo.h> 00036 # undef _STLP_OLDSTD_typeinfo 00037 # endif 00038 00039 // if <typeinfo.h> already included, do not import anything 00040 # if defined(_STLP_USE_NAMESPACES) && !defined(_STLP_OLDSTD_typeinfo) && \ 00041 (defined(_STLP_VENDOR_GLOBAL_EXCEPT_STD) || \ 00042 defined(_STLP_USE_OWN_NAMESPACE) || defined (_STLP_DEBUG)) 00043 # if defined(_STLP_MSVC) && (_STLP_MSVC < 1300) && !defined(_STLP_WCE_NET) 00044 class bad_cast : public exception {}; 00045 # endif 00046 00047 _STLP_BEGIN_NAMESPACE 00048 // VC 6 and eVC 4 have type_info in the global namespace 00049 # if (defined(_STLP_MSVC) && (_STLP_MSVC < 1300)) || defined(_STLP_WCE_NET) 00050 using ::type_info; 00051 # else 00052 using _STLP_VENDOR_EXCEPT_STD::type_info; 00053 # endif 00054 00055 # if !(defined (__MRC__) || defined (__SC__) || defined (__DMC__)) 00056 using _STLP_VENDOR_EXCEPT_STD::bad_typeid; 00057 # endif 00058 00059 //#if defined( __xlC__ ) && (__xlC__ < 0x500) 00060 //# include <exception> 00061 //struct bad_cast : exception {}; 00062 //#endif 00063 # if defined (_STLP_MSVC) && (_STLP_MSVC < 1300) && !defined (_STLP_WCE_NET) 00064 using ::bad_cast; 00065 # else 00066 using _STLP_VENDOR_EXCEPT_STD::bad_cast; 00067 # endif 00068 00069 _STLP_END_NAMESPACE 00070 00071 # endif 00072 00073 #else 00074 00075 # ifndef _STLP_INTERNAL_EXCEPTION 00076 # include <stl/_exception.h> 00077 # endif 00078 00079 _STLP_BEGIN_NAMESPACE 00080 # if !defined (__DMC__) 00081 struct bad_cast : exception {}; 00082 # endif 00083 _STLP_END_NAMESPACE 00084 #endif 00085 00086 #endif
Generated on Mon Mar 10 15:32:43 2008 by ![]() |