15 #ifndef INTERROGATETYPE_H 16 #define INTERROGATETYPE_H 18 #include "dtoolbase.h" 20 #include "interrogateComponent.h" 38 INLINE
bool is_global()
const;
40 INLINE
bool has_scoped_name()
const;
41 INLINE
const string &get_scoped_name()
const;
43 INLINE
bool has_true_name()
const;
44 INLINE
const string &get_true_name()
const;
46 INLINE
bool has_comment()
const;
47 INLINE
const string &get_comment()
const;
49 INLINE
bool is_nested()
const;
50 INLINE TypeIndex get_outer_class()
const;
52 INLINE
bool is_atomic()
const;
53 INLINE AtomicToken get_atomic_token()
const;
54 INLINE
bool is_unsigned()
const;
55 INLINE
bool is_signed()
const;
56 INLINE
bool is_long()
const;
57 INLINE
bool is_longlong()
const;
58 INLINE
bool is_short()
const;
60 INLINE
bool is_wrapped()
const;
61 INLINE
bool is_pointer()
const;
62 INLINE
bool is_const()
const;
63 INLINE
bool is_typedef()
const;
64 INLINE TypeIndex get_wrapped_type()
const;
66 INLINE
bool is_array()
const;
67 INLINE
int get_array_size()
const;
69 INLINE
bool is_enum()
const;
70 INLINE
int number_of_enum_values()
const;
71 INLINE
const string &get_enum_value_name(
int n)
const;
72 INLINE
const string &get_enum_value_scoped_name(
int n)
const;
73 INLINE
const string &get_enum_value_comment(
int n)
const;
74 INLINE
int get_enum_value(
int n)
const;
76 INLINE
bool is_struct()
const;
77 INLINE
bool is_class()
const;
78 INLINE
bool is_union()
const;
80 INLINE
bool is_fully_defined()
const;
81 INLINE
bool is_unpublished()
const;
82 INLINE
int number_of_constructors()
const;
83 INLINE FunctionIndex get_constructor(
int n)
const;
84 INLINE
bool has_destructor()
const;
85 INLINE
bool destructor_is_inherited()
const;
86 INLINE FunctionIndex get_destructor()
const;
87 INLINE
int number_of_elements()
const;
88 INLINE ElementIndex get_element(
int n)
const;
89 INLINE
int number_of_methods()
const;
90 INLINE FunctionIndex get_method(
int n)
const;
91 INLINE
int number_of_make_seqs()
const;
92 INLINE MakeSeqIndex get_make_seq(
int n)
const;
94 INLINE
int number_of_casts()
const;
95 INLINE FunctionIndex get_cast(
int n)
const;
97 INLINE
int number_of_derivations()
const;
98 INLINE TypeIndex get_derivation(
int n)
const;
100 INLINE
bool derivation_has_upcast(
int n)
const;
101 INLINE FunctionIndex derivation_get_upcast(
int n)
const;
103 INLINE
bool derivation_downcast_is_impossible(
int n)
const;
104 INLINE
bool derivation_has_downcast(
int n)
const;
105 INLINE FunctionIndex derivation_get_downcast(
int n)
const;
107 INLINE
int number_of_nested_types()
const;
108 INLINE TypeIndex get_nested_type(
int n)
const;
111 void output(ostream &out)
const;
112 void input(istream &in);
120 F_unsigned = 0x000004,
123 F_longlong = 0x000020,
125 F_wrapped = 0x000080,
126 F_pointer = 0x000100,
131 F_fully_defined = 0x002000,
132 F_true_destructor = 0x004000,
133 F_private_destructor = 0x008000,
134 F_inherited_destructor = 0x010000,
135 F_implicit_destructor = 0x020000,
138 F_unpublished = 0x100000,
139 F_typedef = 0x200000,
149 TypeIndex _outer_class;
150 AtomicToken _atomic_token;
151 TypeIndex _wrapped_type;
154 typedef vector<FunctionIndex> Functions;
155 Functions _constructors;
156 FunctionIndex _destructor;
158 typedef vector<ElementIndex> Elements;
163 typedef vector<MakeSeqIndex> MakeSeqs;
166 enum DerivationFlags {
169 DF_downcast_impossible = 0x04
178 void output(ostream &out)
const;
179 void input(istream &in);
183 FunctionIndex _upcast;
184 FunctionIndex _downcast;
188 typedef vector<Derivation> Derivations;
189 Derivations _derivations;
195 void output(ostream &out)
const;
196 void input(istream &in);
205 typedef vector<EnumValue> EnumValues;
206 EnumValues _enum_values;
208 typedef vector<TypeIndex> Types;
220 friend class InterrogateBuilder;
223 INLINE ostream &operator << (ostream &out,
const InterrogateType &type);
232 #include "interrogateType.I" 236 struct Dtool_PyTypedObject;
237 typedef std::map< int , Dtool_PyTypedObject *> RunTimeTypeDictionary;
238 typedef std::set<int > RunTimeTypeList;
240 EXPCL_DTOOLCONFIG RunTimeTypeDictionary & GetRunTimeDictionary();
241 EXPCL_DTOOLCONFIG RunTimeTypeList & GetRunTimeTypeList();
This class manages a mapping of integers to integers.
void input(istream &in)
Reads the data file as previously formatted by output().
void output(ostream &out) const
Formats the component for output to a data file.
An internal representation of a type.
The base class for things that are part of the interrogate database.