20 return (_flags & F_global) != 0;
26 INLINE
bool InterrogateType::
27 has_scoped_name()
const {
28 return !_scoped_name.empty();
34 INLINE
const std::string &InterrogateType::
35 get_scoped_name()
const {
42 INLINE
bool InterrogateType::
43 has_true_name()
const {
44 return !_true_name.empty();
50 INLINE
const std::string &InterrogateType::
51 get_true_name()
const {
58 INLINE
bool InterrogateType::
60 return !_comment.empty();
66 INLINE
const std::string &InterrogateType::
76 return (_flags & F_nested) != 0;
91 INLINE
bool InterrogateType::
93 return (_flags & F_atomic) != 0;
99 INLINE AtomicToken InterrogateType::
100 get_atomic_token()
const {
101 return _atomic_token;
107 INLINE
bool InterrogateType::
108 is_unsigned()
const {
109 return (_flags & F_unsigned) != 0;
115 INLINE
bool InterrogateType::
117 return (_flags & F_signed) != 0;
123 INLINE
bool InterrogateType::
125 return (_flags & F_long) != 0;
131 INLINE
bool InterrogateType::
132 is_longlong()
const {
133 return (_flags & F_longlong) != 0;
139 INLINE
bool InterrogateType::
141 return (_flags & F_short) != 0;
147 INLINE
bool InterrogateType::
149 return (_flags & F_wrapped) != 0;
155 INLINE
bool InterrogateType::
157 return (_flags & F_pointer) != 0;
163 INLINE
bool InterrogateType::
165 return (_flags & F_const) != 0;
171 INLINE
bool InterrogateType::
173 return (_flags & F_typedef) != 0;
179 INLINE TypeIndex InterrogateType::
180 get_wrapped_type()
const {
181 return _wrapped_type;
187 INLINE
bool InterrogateType::
189 return (_flags & F_array) != 0;
195 INLINE
int InterrogateType::
196 get_array_size()
const {
203 INLINE
bool InterrogateType::
205 return (_flags & F_enum) != 0;
213 return (_flags & F_scoped_enum) != 0;
219 INLINE
int InterrogateType::
220 number_of_enum_values()
const {
221 return _enum_values.size();
227 INLINE
const std::string &InterrogateType::
228 get_enum_value_name(
int n)
const {
229 if (n >= 0 && n < (
int)_enum_values.size()) {
230 return _enum_values[n]._name;
232 return _empty_string;
238 INLINE
const std::string &InterrogateType::
239 get_enum_value_scoped_name(
int n)
const {
240 if (n >= 0 && n < (
int)_enum_values.size()) {
241 return _enum_values[n]._scoped_name;
243 return _empty_string;
249 INLINE
const std::string &InterrogateType::
250 get_enum_value_comment(
int n)
const {
251 if (n >= 0 && n < (
int)_enum_values.size()) {
252 return _enum_values[n]._comment;
254 return _empty_string;
260 INLINE
int InterrogateType::
261 get_enum_value(
int n)
const {
262 if (n >= 0 && n < (
int)_enum_values.size()) {
263 return _enum_values[n]._value;
271 INLINE
bool InterrogateType::
273 return (_flags & F_struct) != 0;
279 INLINE
bool InterrogateType::
281 return (_flags & F_class) != 0;
287 INLINE
bool InterrogateType::
289 return (_flags & F_union) != 0;
295 INLINE
bool InterrogateType::
297 return (_flags & F_final) != 0;
303 INLINE
bool InterrogateType::
304 is_fully_defined()
const {
305 return (_flags & F_fully_defined) != 0;
315 return (_flags & F_unpublished) != 0;
321 INLINE
int InterrogateType::
322 number_of_constructors()
const {
323 return _constructors.size();
329 INLINE FunctionIndex InterrogateType::
330 get_constructor(
int n)
const {
331 if (n >= 0 && n < (
int)_constructors.size()) {
332 return _constructors[n];
341 INLINE
bool InterrogateType::
342 has_destructor()
const {
343 return (_destructor != 0);
349 INLINE
bool InterrogateType::
350 destructor_is_inherited()
const {
351 return (_flags & F_inherited_destructor) != 0;
357 INLINE
bool InterrogateType::
358 destructor_is_implicit()
const {
359 return (_flags & F_implicit_destructor) != 0;
365 INLINE FunctionIndex InterrogateType::
366 get_destructor()
const {
373 INLINE
int InterrogateType::
374 number_of_elements()
const {
375 return _elements.size();
381 INLINE ElementIndex InterrogateType::
382 get_element(
int n)
const {
383 if (n >= 0 && n < (
int)_elements.size()) {
393 INLINE
int InterrogateType::
394 number_of_methods()
const {
395 return _methods.size();
401 INLINE FunctionIndex InterrogateType::
402 get_method(
int n)
const {
403 if (n >= 0 && n < (
int)_methods.size()) {
413 INLINE
int InterrogateType::
414 number_of_make_seqs()
const {
415 return _make_seqs.size();
421 INLINE MakeSeqIndex InterrogateType::
422 get_make_seq(
int n)
const {
423 if (n >= 0 && n < (
int)_make_seqs.size()) {
424 return _make_seqs[n];
433 INLINE
int InterrogateType::
434 number_of_casts()
const {
435 return _casts.size();
441 INLINE FunctionIndex InterrogateType::
442 get_cast(
int n)
const {
443 if (n >= 0 && n < (
int)_casts.size()) {
453 INLINE
int InterrogateType::
454 number_of_derivations()
const {
455 return _derivations.size();
461 INLINE TypeIndex InterrogateType::
462 get_derivation(
int n)
const {
463 if (n >= 0 && n < (
int)_derivations.size()) {
464 return _derivations[n]._base;
473 INLINE
bool InterrogateType::
474 derivation_has_upcast(
int n)
const {
475 if (n >= 0 && n < (
int)_derivations.size()) {
476 return (_derivations[n]._flags & DF_upcast) != 0;
485 INLINE TypeIndex InterrogateType::
486 derivation_get_upcast(
int n)
const {
487 if (n >= 0 && n < (
int)_derivations.size()) {
488 return _derivations[n]._upcast;
497 INLINE
bool InterrogateType::
498 derivation_downcast_is_impossible(
int n)
const {
499 if (n >= 0 && n < (
int)_derivations.size()) {
500 return (_derivations[n]._flags & DF_downcast_impossible) != 0;
509 INLINE
bool InterrogateType::
510 derivation_has_downcast(
int n)
const {
511 if (n >= 0 && n < (
int)_derivations.size()) {
512 return (_derivations[n]._flags & DF_downcast) != 0;
521 INLINE TypeIndex InterrogateType::
522 derivation_get_downcast(
int n)
const {
523 if (n >= 0 && n < (
int)_derivations.size()) {
524 return _derivations[n]._downcast;
533 INLINE
int InterrogateType::
534 number_of_nested_types()
const {
535 return _nested_types.size();
541 INLINE TypeIndex InterrogateType::
542 get_nested_type(
int n)
const {
543 if (n >= 0 && n < (
int)_nested_types.size()) {
544 return _nested_types[n];
550 INLINE std::ostream &
556 INLINE std::istream &
562 INLINE std::ostream &
568 INLINE std::istream &
574 INLINE std::ostream &
580 INLINE std::istream &
void output(std::ostream &out) const
Formats the InterrogateType data for output to a data file.
An internal representation of a type.
bool is_unpublished() const
Returns true if the type is an unpublished type.
void input(std::istream &in)
Reads the data file as previously formatted by output().
bool is_nested() const
Returns true if this type is nested within some class definition.
bool is_global() const
Returns true if the type is marked as 'global'.
TypeIndex get_outer_class() const
If is_nested() returns true, this is the class within which this type is defined.
bool is_scoped_enum() const
Returns true if enum values are only available under a scope.