25 return (_flags & F_global) != 0;
33 INLINE
bool InterrogateType::
34 has_scoped_name()
const {
35 return !_scoped_name.empty();
43 INLINE
const string &InterrogateType::
44 get_scoped_name()
const {
53 INLINE
bool InterrogateType::
54 has_true_name()
const {
55 return !_true_name.empty();
63 INLINE
const string &InterrogateType::
64 get_true_name()
const {
73 INLINE
bool InterrogateType::
75 return !_comment.empty();
83 INLINE
const string &InterrogateType::
96 return (_flags & F_nested) != 0;
115 INLINE
bool InterrogateType::
117 return (_flags & F_atomic) != 0;
125 INLINE AtomicToken InterrogateType::
126 get_atomic_token()
const {
127 return _atomic_token;
135 INLINE
bool InterrogateType::
136 is_unsigned()
const {
137 return (_flags & F_unsigned) != 0;
145 INLINE
bool InterrogateType::
147 return (_flags & F_signed) != 0;
155 INLINE
bool InterrogateType::
157 return (_flags & F_long) != 0;
165 INLINE
bool InterrogateType::
166 is_longlong()
const {
167 return (_flags & F_longlong) != 0;
175 INLINE
bool InterrogateType::
177 return (_flags & F_short) != 0;
185 INLINE
bool InterrogateType::
187 return (_flags & F_wrapped) != 0;
195 INLINE
bool InterrogateType::
197 return (_flags & F_pointer) != 0;
205 INLINE
bool InterrogateType::
207 return (_flags & F_const) != 0;
215 INLINE
bool InterrogateType::
217 return (_flags & F_typedef) != 0;
225 INLINE TypeIndex InterrogateType::
226 get_wrapped_type()
const {
227 return _wrapped_type;
235 INLINE
bool InterrogateType::
237 return (_flags & F_array) != 0;
245 INLINE
int InterrogateType::
246 get_array_size()
const {
255 INLINE
bool InterrogateType::
257 return (_flags & F_enum) != 0;
265 INLINE
int InterrogateType::
266 number_of_enum_values()
const {
267 return _enum_values.size();
275 INLINE
const string &InterrogateType::
276 get_enum_value_name(
int n)
const {
277 if (n >= 0 && n < (
int)_enum_values.size()) {
278 return _enum_values[n]._name;
280 return _empty_string;
288 INLINE
const string &InterrogateType::
289 get_enum_value_scoped_name(
int n)
const {
290 if (n >= 0 && n < (
int)_enum_values.size()) {
291 return _enum_values[n]._scoped_name;
293 return _empty_string;
301 INLINE
const string &InterrogateType::
302 get_enum_value_comment(
int n)
const {
303 if (n >= 0 && n < (
int)_enum_values.size()) {
304 return _enum_values[n]._comment;
306 return _empty_string;
314 INLINE
int InterrogateType::
315 get_enum_value(
int n)
const {
316 if (n >= 0 && n < (
int)_enum_values.size()) {
317 return _enum_values[n]._value;
327 INLINE
bool InterrogateType::
329 return (_flags & F_struct) != 0;
337 INLINE
bool InterrogateType::
339 return (_flags & F_class) != 0;
347 INLINE
bool InterrogateType::
349 return (_flags & F_union) != 0;
357 INLINE
bool InterrogateType::
358 is_fully_defined()
const {
359 return (_flags & F_fully_defined) != 0;
372 return (_flags & F_unpublished) != 0;
380 INLINE
int InterrogateType::
381 number_of_constructors()
const {
382 return _constructors.size();
390 INLINE FunctionIndex InterrogateType::
391 get_constructor(
int n)
const {
392 if (n >= 0 && n < (
int)_constructors.size()) {
393 return _constructors[n];
404 INLINE
bool InterrogateType::
405 has_destructor()
const {
406 return (_destructor != 0);
414 INLINE
bool InterrogateType::
415 destructor_is_inherited()
const {
416 return (_flags & F_inherited_destructor) != 0;
424 INLINE FunctionIndex InterrogateType::
425 get_destructor()
const {
434 INLINE
int InterrogateType::
435 number_of_elements()
const {
436 return _elements.size();
444 INLINE ElementIndex InterrogateType::
445 get_element(
int n)
const {
446 if (n >= 0 && n < (
int)_elements.size()) {
458 INLINE
int InterrogateType::
459 number_of_methods()
const {
460 return _methods.size();
468 INLINE FunctionIndex InterrogateType::
469 get_method(
int n)
const {
470 if (n >= 0 && n < (
int)_methods.size()) {
482 INLINE
int InterrogateType::
483 number_of_make_seqs()
const {
484 return _make_seqs.size();
492 INLINE MakeSeqIndex InterrogateType::
493 get_make_seq(
int n)
const {
494 if (n >= 0 && n < (
int)_make_seqs.size()) {
495 return _make_seqs[n];
506 INLINE
int InterrogateType::
507 number_of_casts()
const {
508 return _casts.size();
516 INLINE FunctionIndex InterrogateType::
517 get_cast(
int n)
const {
518 if (n >= 0 && n < (
int)_casts.size()) {
530 INLINE
int InterrogateType::
531 number_of_derivations()
const {
532 return _derivations.size();
540 INLINE TypeIndex InterrogateType::
541 get_derivation(
int n)
const {
542 if (n >= 0 && n < (
int)_derivations.size()) {
543 return _derivations[n]._base;
554 INLINE
bool InterrogateType::
555 derivation_has_upcast(
int n)
const {
556 if (n >= 0 && n < (
int)_derivations.size()) {
557 return (_derivations[n]._flags & DF_upcast) != 0;
568 INLINE TypeIndex InterrogateType::
569 derivation_get_upcast(
int n)
const {
570 if (n >= 0 && n < (
int)_derivations.size()) {
571 return _derivations[n]._upcast;
582 INLINE
bool InterrogateType::
583 derivation_downcast_is_impossible(
int n)
const {
584 if (n >= 0 && n < (
int)_derivations.size()) {
585 return (_derivations[n]._flags & DF_downcast_impossible) != 0;
596 INLINE
bool InterrogateType::
597 derivation_has_downcast(
int n)
const {
598 if (n >= 0 && n < (
int)_derivations.size()) {
599 return (_derivations[n]._flags & DF_downcast) != 0;
610 INLINE TypeIndex InterrogateType::
611 derivation_get_downcast(
int n)
const {
612 if (n >= 0 && n < (
int)_derivations.size()) {
613 return _derivations[n]._downcast;
624 INLINE
int InterrogateType::
625 number_of_nested_types()
const {
626 return _nested_types.size();
634 INLINE TypeIndex InterrogateType::
635 get_nested_type(
int n)
const {
636 if (n >= 0 && n < (
int)_nested_types.size()) {
637 return _nested_types[n];
void input(istream &in)
Reads the data file as previously formatted by output().
An internal representation of a type.
bool is_unpublished() const
Returns true if the type is an unpublished type.
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'.
void output(ostream &out) const
Formats the InterrogateType data for output to a data file.
TypeIndex get_outer_class() const
If is_nested() returns true, this is the class within which this type is defined. ...