Spicy
Public Member Functions | List of all members
hilti::rt::type_info::Struct Class Reference

#include <type-info.h>

Public Member Functions

 Struct (std::vector< struct_::Field > fields)
 
auto fields (bool include_internal=false) const
 
auto iterate (const Value &v, bool include_internal=false) const
 

Detailed Description

Auxiliary type information for type `struct.

Constructor & Destructor Documentation

◆ Struct()

hilti::rt::type_info::Struct::Struct ( std::vector< struct_::Field fields)
inline

Constructor

Parameters
fieldsthe struct's fields

Member Function Documentation

◆ fields()

auto hilti::rt::type_info::Struct::fields ( bool  include_internal = false) const
inline

Returns the struct's field.

Parameters
include_internalinclude internal fields

◆ iterate()

auto hilti::rt::type_info::Struct::iterate ( const Value v,
bool  include_internal = false 
) const
inline

Returns a vector that can be iterated over to visit all the fields.

Parameters
vthe value referring to the struct to iterate over
include_internalinclude internal fields
Returns
a vector of pairs (field, value) where field is the current `struct_::Field and value is the field's value.

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