![]() |
Spicy
|
#include <parsed-unit.h>
Public Member Functions | |
template<typename T > | |
const T & | get () const |
hilti::rt::type_info::Value | value () const |
void | reset () |
![]() | |
template<typename T > | |
Parent (const StrongReference< T > &value) | |
Parent () | |
void | tie (hilti::rt::StrongReferenceGeneric value) |
Static Public Member Functions | |
template<typename T > | |
static void | initialize (ParsedUnit &u, const hilti::rt::ValueReference< T > &t, const hilti::rt::TypeInfo *ti) |
Type-erased wrapper around parsed unit instances.
Initially, this will be unbound, i.e., not refer to any particular instance. initialize()
then binds it to an instance and have ParsedUnit
hold a strong reference to it.
|
inline |
Returns typed access to the contained instance.
|
inlinestatic |
Initializes the wrapper with a particular parse unit instance. The ParsedUnit
will hold a strong reference to the instance until released.
u | type-erased wrapper to initialize |
t | reference to instance to initialize u with |
ti | pointer to valid type information for T |
|
inline |
Releases any contained instance.
|
inline |
Returns the instance and its type in a value representation suitable to use with the type-info
API for iteration over the fields.