blob: 55245e14fd01622d4444995312a498acf991b266 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
/***
*typeinfo.h - Defines the type_info structure and exceptions used for RTTI
*
* Copyright (c) 1994-1995, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Defines the type_info structure and exceptions used for
* Runtime Type Identification.
*
* [Public]
*
****/
#if _MSC_VER > 1000
#pragma once
#endif
#ifndef __cplusplus
#error This header requires a C++ compiler ...
#endif
#ifndef _INC_TYPEINFO
#define _INC_TYPEINFO
#if !defined(_WIN32) && !defined(_MAC)
#error ERROR: Only Mac or Win32 targets supported!
#endif
/* Define _CRTIMP */
#ifndef _CRTIMP
#ifdef _NTSDK
/* definition compatible with NT SDK */
#define _CRTIMP
#else /* ndef _NTSDK */
/* current definition */
#ifdef _DLL
#define _CRTIMP __declspec(dllimport)
#else /* ndef _DLL */
#define _CRTIMP
#endif /* _DLL */
#endif /* _NTSDK */
#endif /* _CRTIMP */
class type_info {
public:
_CRTIMP virtual ~type_info();
_CRTIMP int operator==(const type_info& rhs) const;
_CRTIMP int operator!=(const type_info& rhs) const;
_CRTIMP int before(const type_info& rhs) const;
_CRTIMP const char* name() const;
_CRTIMP const char* raw_name() const;
private:
void *_m_data;
char _m_d_name[1];
type_info(const type_info& rhs);
type_info& operator=(const type_info& rhs);
};
// This include must occur below the definition of class type_info
#include <stdexcpt.h>
class _CRTIMP bad_cast : public exception {
public:
bad_cast(const __exString& what_arg) : exception (what_arg) {}
};
class _CRTIMP bad_typeid : public exception {
public:
bad_typeid(const char * what_arg) : exception (what_arg) {}
};
class _CRTIMP __non_rtti_object : public bad_typeid {
public:
__non_rtti_object(const char * what_arg) : bad_typeid(what_arg) {}
};
#ifdef __RTTI_OLDNAMES
// Some synonyms for folks using older standard
typedef type_info Type_info;
typedef bad_cast Bad_cast;
typedef bad_typeid Bad_typeid;
#endif // __RTTI_OLDNAMES
#endif // _INC_TYPEINFO
|