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

#include <switch.h>

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

Public Member Functions

 Switch (std::optional< Expression > expr, const std::vector< switch_::Case > &cases, Engine e, std::optional< Expression > cond, std::vector< Hook > hooks, std::optional< AttributeSet > attributes, Meta m=Meta())
 
auto expression () const
 
Engine engine () const
 
auto condition () const
 
auto cases () const
 
auto casesNodes ()
 
auto attributes () const
 
auto hooks () const
 
bool hasNoFields () const
 
std::optional< switch_::Casecase_ (const type::unit::item::Field &x)
 
bool operator== (const Switch &other) const
 
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 ()
 

Detailed Description

AST node for a unit field.

Member Function Documentation

◆ case_()

std::optional< spicy::type::unit::item::switch_::Case > spicy::type::unit::item::Switch::case_ ( const type::unit::item::Field x)

Returns the case that an field is part of, if any.

i: The field.

◆ hasNoFields()

bool spicy::type::unit::item::Switch::hasNoFields ( ) const

Returns true if there's no field storing information.


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