[BASESRV]
[reactos.git] / include / c++ / typeinfo
index b364733..43dbb26 100644 (file)
@@ -7,41 +7,58 @@
 \r
 extern "C++" {\r
 \r
-namespace std \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
-    class type_info {\r
-    public:\r
-        virtual ~type_info();\r
-        bool before (const type_info& arg) const\r
-            { return __name < __arg.__name; }\r
-        bool operator==(const type_info& __arg) const\r
-            { return __name == __arg.__name; }\r
-        bool operator!=(const type_info& __arg) const\r
-            { return !operator==(__arg); }\r
-        const char* name() const;\r
-    protected:\r
-        const char* __name;\r
-    private:\r
-        type_info (const type_info& rhs);\r
-        type_info& operator= (const type_info& rhs);\r
-    };\r
-\r
-    class bad_cast : public exception \r
-    {\r
-    public:\r
-        bad_cast() throw() { }\r
-        virtual ~bad_cast() throw();\r
-        virtual const char* what() const throw();\r
-    };\r
-  \r
-    class bad_typeid : public exception \r
-    {\r
-    public:\r
-        bad_typeid () throw() { }\r
-        virtual ~bad_typeid() throw();\r
-        virtual const char* what() const throw();\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