+++ /dev/null
-// RTTI support for C++\r
-\r
-#ifndef _TYPEINFO\r
-#define _TYPEINFO\r
-\r
-#include <exception>\r
-\r
-extern "C++" {\r
-\r
-class type_info {\r
-public:\r
- virtual ~type_info();\r
-\r
- int before(const type_info &) const;\r
- const char *name() const;\r
- const char *raw_name() const;\r
-\r
- int operator==(const type_info &) const;\r
- int operator!=(const type_info &) const;\r
-private:\r
- char *_name;\r
- char _mangled[32];\r
-\r
- type_info(const type_info &);\r
- type_info &operator=(const type_info &);\r
-};\r
-\r
-class bad_cast : public exception\r
-{\r
-public:\r
- bad_cast(const char *name = "bad cast") throw()\r
- : exception(name) { }\r
- bad_cast(const char * const *) throw();\r
- bad_cast(const char * const &) throw();\r
-\r
- virtual ~bad_cast() throw() { }\r
-};\r
-\r
-class bad_typeid : public exception\r
-{\r
-public:\r
- bad_typeid(const char *name = "bad typeid") throw()\r
- : exception(name) { }\r
-\r
- virtual ~bad_typeid() throw() { }\r
-};\r
-\r
-class __non_rtti_object : public bad_typeid\r
-{\r
-public:\r
- __non_rtti_object(const char *name) throw()\r
- : bad_typeid(name) { }\r
-\r
- virtual ~__non_rtti_object() throw() { }\r
-};\r
-\r
-namespace std\r
-{\r
- using ::type_info;\r
- using ::bad_cast;\r
- using ::bad_typeid;\r
-} // namespace std\r
-\r
-} // extern "C++"\r
-#endif\r