Spicy
Public Member Functions | Static Public Member Functions | List of all members
spicy::type::unit::item::Field Class Reference

#include <field.h>

Inheritance diagram for spicy::type::unit::item::Field:
hilti::NodeBase spicy::trait::isUnitItem hilti::trait::isNode hilti::trait::isNode

Public Member Functions

 Field (const std::optional< ID > &id, Type type, Engine e, const std::vector< Expression > &args, std::optional< Expression > repeat, const std::vector< Expression > &sinks, std::optional< AttributeSet > attrs={}, std::optional< Expression > cond={}, std::vector< Hook > hooks={}, Meta m=Meta())
 
 Field (const std::optional< ID > &id, Ctor ctor, Engine e, const std::vector< Expression > &args, std::optional< Expression > repeat, const std::vector< Expression > &sinks, std::optional< AttributeSet > attrs={}, std::optional< Expression > cond={}, std::vector< Hook > hooks={}, Meta m=Meta())
 
 Field (const std::optional< ID > &id, Item item, Engine e, const std::vector< Expression > &args, std::optional< Expression > repeat, const std::vector< Expression > &sinks, std::optional< AttributeSet > attrs={}, std::optional< Expression > cond={}, std::vector< Hook > hooks={}, const Meta &m=Meta())
 
 Field (const Field &other)=default
 
 Field (Field &&other)=default
 
const auto & id () const
 
auto index () const
 
auto ctor () const
 
auto item () const
 
auto repeatCount () const
 
auto attributes () const
 
auto condition () const
 
auto arguments () const
 
auto sinks () const
 
auto hooks () const
 
Engine engine () const
 
bool isContainer () const
 
bool isForwarding () const
 
bool isTransient () const
 
bool emitHook () const
 
Type parseType () const
 
Type originalType () const
 
NodeoriginalTypeNode ()
 
NodectorNode ()
 
NodeitemNode ()
 
NodeattributesNode ()
 
std::optional< std::pair< Expression, std::optional< Type > > > convertExpression () const
 
bool operator== (const Field &other) const
 
Fieldoperator= (const Field &other)=default
 
Fieldoperator= (Field &&other)=default
 
Type itemType () const
 
auto isEqual (const Item &other) const
 
auto properties () const
 
- 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 Type vectorElementTypeThroughSelf (ID id)
 
static Field setIndex (const Field &f, uint64_t index)
 
static Field setForwarding (const Field &f, bool is_forwarding)
 

Detailed Description

AST node for a unit field.

Member Function Documentation

◆ setIndex()

static Field spicy::type::unit::item::Field::setIndex ( const Field f,
uint64_t  index 
)
inlinestatic

Copies an existing field but changes its unit index.

Parameters
unitoriginal field
indexthe new index of the field
Returns
new Field with unit index set as requested

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