IDL compiler front-end library
List of all members
AST::Constant Class Reference

const definition. More...

#include <Constant.h>

Inheritance diagram for AST::Constant:
AST::NamedItem AST::Type AST::Variant AST::Item AST::Location

Additional Inherited Members

- Public Types inherited from AST::Item
enum class  Kind {
  ROOT , INCLUDE , NATIVE , TYPE_DEF ,
  CONSTANT , MODULE , MODULE_ITEMS , INTERFACE_DECL ,
  INTERFACE , OPERATION , PARAMETER , ATTRIBUTE ,
  EXCEPTION , STRUCT_DECL , STRUCT , MEMBER ,
  UNION_DECL , UNION , UNION_ELEMENT , ENUM ,
  ENUM_ITEM , VALUE_TYPE_DECL , VALUE_TYPE , VALUE_BOX ,
  STATE_MEMBER , VALUE_FACTORY
}
 The kind of item. More...
 
- Public Types inherited from AST::Type
enum class  Kind {
  VOID , BASIC_TYPE , NAMED_TYPE , STRING ,
  WSTRING , FIXED , SEQUENCE , ARRAY
}
 The kind of type. More...
 
- Public Types inherited from AST::Variant
enum class  VT {
  EMPTY , BOOLEAN , OCTET , CHAR ,
  WCHAR , USHORT , ULONG , ULONGLONG ,
  SHORT , LONG , LONGLONG , FLOAT ,
  DOUBLE , LONGDOUBLE , STRING , WSTRING ,
  FIXED , ENUM_ITEM , CONSTANT
}
 Value vtype. More...
 
- Public Member Functions inherited from AST::NamedItem
const Identifiername () const noexcept
 
const ItemScopeparent () const noexcept
 
std::string qualified_name () const
 
ScopedName scoped_name () const
 
const Symbolsparent_scope () const noexcept
 
- Public Member Functions inherited from AST::Item
Kind kind () const noexcept
 
bool is_type () const noexcept
 
bool is_forward_decl () const noexcept
 
- Public Member Functions inherited from AST::Location
const std::filesystem::path & file () const noexcept
 
unsigned line () const noexcept
 
- Public Member Functions inherited from AST::Type
Kind tkind () const noexcept
 
BasicType basic_type () const noexcept
 
const NamedItemnamed_type () const noexcept
 
Dim string_bound () const noexcept
 
Dim string_size () const noexcept
 Obsolete. Use Type::string_bound () instead.
 
const Sequencesequence () const noexcept
 
const Arrayarray () const noexcept
 
uint16_t fixed_digits () const noexcept
 
uint16_t fixed_scale () const noexcept
 
const Typedereference_type () const noexcept
 
 ~Type ()
 Destructor.
 
 Type ()
 Default constructor.
 
 Type (const Type &src)
 Copy constructor.
 
 Type (Type &&src) noexcept
 Move constructor.
 
Typeoperator= (const Type &src)
 Copy assignment.
 
Typeoperator= (Type &&src) noexcept
 Move assignment.
 
bool operator== (const Type &rhs) const noexcept
 Check types for equality.
 
- Public Member Functions inherited from AST::Variant
VT vtype () const noexcept
 
bool as_bool () const noexcept
 
uint8_t as_octet () const noexcept
 
char as_char () const noexcept
 
wchar_t as_wchar () const noexcept
 
uint16_t as_unsigned_short () const noexcept
 
int16_t as_short () const noexcept
 
uint32_t as_unsigned_long () const noexcept
 
int32_t as_long () const noexcept
 
uint64_t as_unsigned_long_long () const noexcept
 
int64_t as_long_long () const noexcept
 
float as_float () const noexcept
 
double as_double () const noexcept
 
long double as_long_double () const noexcept
 
const std::string & as_string () const noexcept
 
const std::wstring & as_wstring () const noexcept
 
const EnumItemas_enum_item () const noexcept
 
const Constantas_constant () const noexcept
 
const Fixedas_Fixed () const noexcept
 
std::string to_string () const
 
bool empty () const noexcept
 
const Variantdereference_const () const noexcept
 
 ~Variant ()
 Destructor.
 
 Variant ()
 VT::EMPTY.
 
 Variant (const Variant &src)
 Copy constructor.
 
 Variant (Variant &&src) noexcept
 Move constructor.
 
 Variant (bool v) noexcept
 VT::BOOLEAN.
 
 Variant (uint8_t v) noexcept
 VT::OCTET.
 
 Variant (char v) noexcept
 VT::CHAR.
 
 Variant (wchar_t v) noexcept
 VT::WCHAR.
 
 Variant (int16_t v) noexcept
 VT::SHORT.
 
 Variant (uint16_t v) noexcept
 VT::USHORT.
 
 Variant (int32_t v) noexcept
 VT::LONG.
 
 Variant (uint32_t v) noexcept
 VT::ULONG.
 
 Variant (int64_t v) noexcept
 VT::LONGLONG.
 
 Variant (uint64_t v) noexcept
 VT::ULONGLONG.
 
 Variant (float v) noexcept
 VT::FLOAT.
 
 Variant (double v) noexcept
 VT::DOUBLE.
 
 Variant (long double v) noexcept
 VT::LONGDOUBLE.
 
 Variant (std::string &&v) noexcept
 VT::STRING.
 
 Variant (const char *s)
 VT::STRING.
 
 Variant (std::wstring &&v) noexcept
 VT::WSTRING.
 
 Variant (const wchar_t *s)
 VT::WSTRING.
 
 Variant (const Fixed &v) noexcept
 VT::FIXED.
 
 Variant (const EnumItem &item) noexcept
 VT::ENUM_ITEM.
 
 Variant (const Constant &constant) noexcept
 VT::CONSTANT.
 
Variantoperator= (const Variant &src)
 Copy assignment.
 
Variantoperator= (Variant &&src) noexcept
 Move assignment.
 

Detailed Description

const definition.

Invariant
kind () == Item::Kind::CONSTANT
Examples
Printer.cpp.

Definition at line 41 of file Constant.h.


The documentation for this class was generated from the following file: