14 #ifndef INTERROGATETYPE_H 15 #define INTERROGATETYPE_H 36 INLINE
bool is_global()
const;
38 INLINE
bool has_scoped_name()
const;
39 INLINE
const std::string &get_scoped_name()
const;
41 INLINE
bool has_true_name()
const;
42 INLINE
const std::string &get_true_name()
const;
44 INLINE
bool has_comment()
const;
45 INLINE
const std::string &get_comment()
const;
47 INLINE
bool is_nested()
const;
48 INLINE TypeIndex get_outer_class()
const;
50 INLINE
bool is_atomic()
const;
51 INLINE AtomicToken get_atomic_token()
const;
52 INLINE
bool is_unsigned()
const;
53 INLINE
bool is_signed()
const;
54 INLINE
bool is_long()
const;
55 INLINE
bool is_longlong()
const;
56 INLINE
bool is_short()
const;
58 INLINE
bool is_wrapped()
const;
59 INLINE
bool is_pointer()
const;
60 INLINE
bool is_const()
const;
61 INLINE
bool is_typedef()
const;
62 INLINE TypeIndex get_wrapped_type()
const;
64 INLINE
bool is_array()
const;
65 INLINE
int get_array_size()
const;
67 INLINE
bool is_enum()
const;
68 INLINE
bool is_scoped_enum()
const;
69 INLINE
int number_of_enum_values()
const;
70 INLINE
const std::string &get_enum_value_name(
int n)
const;
71 INLINE
const std::string &get_enum_value_scoped_name(
int n)
const;
72 INLINE
const std::string &get_enum_value_comment(
int n)
const;
73 INLINE
int get_enum_value(
int n)
const;
75 INLINE
bool is_struct()
const;
76 INLINE
bool is_class()
const;
77 INLINE
bool is_union()
const;
78 INLINE
bool is_final()
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
bool destructor_is_implicit()
const;
87 INLINE FunctionIndex get_destructor()
const;
88 INLINE
int number_of_elements()
const;
89 INLINE ElementIndex get_element(
int n)
const;
90 INLINE
int number_of_methods()
const;
91 INLINE FunctionIndex get_method(
int n)
const;
92 INLINE
int number_of_make_seqs()
const;
93 INLINE MakeSeqIndex get_make_seq(
int n)
const;
95 INLINE
int number_of_casts()
const;
96 INLINE FunctionIndex get_cast(
int n)
const;
98 INLINE
int number_of_derivations()
const;
99 INLINE TypeIndex get_derivation(
int n)
const;
101 INLINE
bool derivation_has_upcast(
int n)
const;
102 INLINE FunctionIndex derivation_get_upcast(
int n)
const;
104 INLINE
bool derivation_downcast_is_impossible(
int n)
const;
105 INLINE
bool derivation_has_downcast(
int n)
const;
106 INLINE FunctionIndex derivation_get_downcast(
int n)
const;
108 INLINE
int number_of_nested_types()
const;
109 INLINE TypeIndex get_nested_type(
int n)
const;
112 void output(std::ostream &out)
const;
113 void input(std::istream &in);
121 F_unsigned = 0x000004,
124 F_longlong = 0x000020,
126 F_wrapped = 0x000080,
127 F_pointer = 0x000100,
132 F_fully_defined = 0x002000,
133 F_true_destructor = 0x004000,
134 F_private_destructor = 0x008000,
135 F_inherited_destructor = 0x010000,
136 F_implicit_destructor = 0x020000,
139 F_unpublished = 0x100000,
140 F_typedef = 0x200000,
142 F_scoped_enum = 0x800000,
149 std::string _scoped_name;
150 std::string _true_name;
151 std::string _comment;
152 TypeIndex _outer_class;
153 AtomicToken _atomic_token;
154 TypeIndex _wrapped_type;
157 typedef std::vector<FunctionIndex> Functions;
158 Functions _constructors;
159 FunctionIndex _destructor;
161 typedef std::vector<ElementIndex> Elements;
166 typedef std::vector<MakeSeqIndex> MakeSeqs;
169 enum DerivationFlags {
172 DF_downcast_impossible = 0x04
181 void output(std::ostream &out)
const;
182 void input(std::istream &in);
186 FunctionIndex _upcast;
187 FunctionIndex _downcast;
191 typedef std::vector<Derivation> Derivations;
192 Derivations _derivations;
198 void output(std::ostream &out)
const;
199 void input(std::istream &in);
202 std::string _scoped_name;
203 std::string _comment;
208 typedef std::vector<EnumValue> EnumValues;
209 EnumValues _enum_values;
211 typedef std::vector<TypeIndex> Types;
223 friend class InterrogateBuilder;
226 INLINE std::ostream &operator << (std::ostream &out,
const InterrogateType &type);
227 INLINE std::istream &operator >> (std::istream &in,
InterrogateType &type);
This class manages a mapping of integers to integers.
void output(std::ostream &out) const
Formats the component for output to a data file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An internal representation of a type.
The base class for things that are part of the interrogate database.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void input(std::istream &in)
Reads the data file as previously formatted by output().