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