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