[SDK][NDK] Move SYSTEM_POWER_INFORMATION to ntpoapi.h (#869)
[reactos.git] / sdk / include / c++ / typeinfo
1 // RTTI support for C++
2
3 #ifndef _TYPEINFO
4 #define _TYPEINFO
5
6 #include <exception>
7
8 extern "C++" {
9
10 class type_info {
11 public:
12 virtual ~type_info();
13
14 int before(const type_info &) const;
15 const char *name() const;
16 const char *raw_name() const;
17
18 int operator==(const type_info &) const;
19 int operator!=(const type_info &) const;
20 private:
21 char *_name;
22 char _mangled[32];
23
24 type_info(const type_info &);
25 type_info &operator=(const type_info &);
26 };
27
28 class bad_cast : public exception
29 {
30 public:
31 bad_cast(const char *name = "bad cast") throw()
32 : exception(name) { }
33 bad_cast(const char * const *) throw();
34 bad_cast(const char * const &) throw();
35
36 virtual ~bad_cast() throw() { }
37 };
38
39 class bad_typeid : public exception
40 {
41 public:
42 bad_typeid(const char *name = "bad typeid") throw()
43 : exception(name) { }
44
45 virtual ~bad_typeid() throw() { }
46 };
47
48 class __non_rtti_object : public bad_typeid
49 {
50 public:
51 __non_rtti_object(const char *name) throw()
52 : bad_typeid(name) { }
53
54 virtual ~__non_rtti_object() throw() { }
55 };
56
57 namespace std
58 {
59 using ::type_info;
60 using ::bad_cast;
61 using ::bad_typeid;
62 } // namespace std
63
64 } // extern "C++"
65 #endif