27 #ifndef IDLFE_AST_TYPE_H_
28 #define IDLFE_AST_TYPE_H_
33 #include <forward_list>
73 return type_.basic_type;
81 assert (type_.named_type);
82 return *type_.named_type;
90 return type_.string_bound;
104 return *type_.sequence;
123 return type_.fixed.digits;
132 return type_.fixed.scale;
169 static Type make_string (
Dim size = 0)
174 static Type make_wstring (
Dim size = 0)
179 static Type make_sequence (
const Type& type,
Dim size = 0);
183 static Type make_fixed (
unsigned digits,
unsigned scale)
185 return Type (digits, scale);
188 Type (
const NamedItem* named);
191 friend class Builder;
193 size_t key_max () const noexcept;
195 bool is_complete_or_ref () const noexcept;
196 bool is_complete_or_seq () const noexcept;
197 bool is_complete () const noexcept;
200 void clear () noexcept;
207 void copy (
const Type& src);
214 Type (
unsigned digits,
unsigned scale);
217 Type (Sequence* seq) :
218 kind_ (
Kind::SEQUENCE),
245 U (
const NamedItem* nt) :
253 U (
const Sequence* pseq) :
257 U (
const Array* parr) :
The array type descriptor.
The sequence type descriptor.
const Sequence & sequence() const noexcept
Kind tkind() const noexcept
const Array & array() const noexcept
Type()
Default constructor.
uint16_t fixed_digits() const noexcept
bool operator==(const Type &rhs) const noexcept
Check types for equality.
const NamedItem & named_type() const noexcept
Type & operator=(const Type &src)
Copy assignment.
BasicType basic_type() const noexcept
Type(const Type &src)
Copy constructor.
Dim string_size() const noexcept
Obsolete. Use Type::string_bound () instead.
uint16_t fixed_scale() const noexcept
Type(Type &&src) noexcept
Move constructor.
@ NAMED_TYPE
named_type ()
@ FIXED
fixed_digits (), fixed_scale ()
@ BASIC_TYPE
Type::basic_type ();
const Type & dereference_type() const noexcept
Dim string_bound() const noexcept
Abstract Syntax Tree namespace.
uint32_t Dim
Array dimensions, string and sequence bounds.
BasicType
CORBA basic type enumeration.
std::forward_list< unsigned > FixedArraySizes
Array dimensions.