Spicy
Public Member Functions | Static Public Member Functions | List of all members
hilti::type::Struct Class Reference

#include <struct.h>

Inheritance diagram for hilti::type::Struct:
hilti::TypeBase hilti::type::trait::isAllocable hilti::type::trait::isParameterized hilti::type::trait::isMutable hilti::NodeBase hilti::trait::isType hilti::trait::isNode hilti::trait::isNode

Public Member Functions

 Struct (std::vector< struct_::Field > fields, Meta m=Meta())
 
 Struct (std::vector< type::function::Parameter > params, std::vector< struct_::Field > fields, Meta m=Meta())
 
 Struct (Wildcard, Meta m=Meta())
 
auto hasFinalizer () const
 
auto parameters () const
 
std::vector< NodeRefparameterNodes ()
 
auto fields () const
 
auto types () const
 
auto ids () const
 
std::optional< struct_::Fieldfield (const ID &id) const
 
auto fields (const ID &id) const
 
bool operator== (const Struct &other) const
 
auto _fieldNodes ()
 
auto isEqual (const Type &other) const
 
auto typeParameters () const
 
auto isWildcard () const
 
auto properties () const
 
- Public Member Functions inherited from hilti::TypeBase
bool hasFlag (type::Flag f) const
 
type::Flags flags () const
 
bool _isConstant () const
 
std::optional< IDtypeID () const
 
std::optional< IDcxxID () const
 
const type::detail::State_state () const
 
type::detail::State_state ()
 
- Public Member Functions inherited from hilti::NodeBase
 NodeBase (Meta meta)
 
 NodeBase (std::vector< Node > childs, Meta meta)
 
template<typename T >
const T & child (int i) const
 
template<typename T >
void assertChildIsA (int i)
 
template<typename T >
std::vector< T > childs (int begin, int end) const
 
template<typename T >
std::vector< T > childsOfType () const
 
template<typename T >
auto nodesOfType () const
 
template<typename T >
auto nodesOfType ()
 
void addChild (Node n)
 
auto & childs () const
 
auto & childs ()
 
auto & meta () const
 
void setMeta (Meta m)
 
const NodeReforiginalNode () const
 
void setOriginalNode (const NodeRef &n)
 
void clearCache ()
 

Static Public Member Functions

static Struct addField (const Struct &s, struct_::Field f)
 

Detailed Description

AST node for a struct type.

Member Function Documentation

◆ _fieldNodes()

auto hilti::type::Struct::_fieldNodes ( )
inline

For internal use by the builder API only.

◆ addField()

static Struct hilti::type::Struct::addField ( const Struct s,
struct_::Field  f 
)
inlinestatic

Copies an existing type and adds a new field to the copy.

Parameters
soriginal type
ffield to add
Returns
new typed with field added

◆ isEqual()

auto hilti::type::Struct::isEqual ( const Type &  other) const
inline

Implements the Type interface.

◆ isWildcard()

auto hilti::type::Struct::isWildcard ( ) const
inline

Implements the Type interface.

◆ properties()

auto hilti::type::Struct::properties ( ) const
inline

Implements the Node interface.

◆ typeParameters()

auto hilti::type::Struct::typeParameters ( ) const
inline

Implements the Type interface.


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