![]() |
Spicy
|
#include <type-info.h>
Public Member Functions | |
template<typename Type > | |
TypeInfo (std::optional< const char *> _id, const char *_display, Type *value) | |
Public Attributes | |
std::optional< const char * > | id |
const char * | display |
std::unique_ptr< char, void(*)(char *)> | _storage = {nullptr, [](char*) {}} |
Tag | tag = Tag::Undefined |
Tag indicating which field of below union is set. | |
union { | |
type_info::Address * address | |
type_info::Any * any | |
type_info::Bool * bool_ | |
type_info::Bytes * bytes | |
type_info::BytesIterator * bytes_iterator | |
type_info::Enum * enum_ | |
type_info::Error * error | |
type_info::Exception * exception | |
type_info::Function * function | |
type_info::Interval * interval | |
type_info::Library * library | |
type_info::Map * map | |
type_info::MapIterator * map_iterator | |
type_info::Network * network | |
type_info::Optional * optional | |
type_info::Port * port | |
type_info::Real * real | |
type_info::RegExp * regexp | |
type_info::Result * result | |
type_info::Set * set | |
type_info::SetIterator * set_iterator | |
type_info::SignedInteger< int8_t > * signed_integer_int8 | |
type_info::SignedInteger< int16_t > * signed_integer_int16 | |
type_info::SignedInteger< int32_t > * signed_integer_int32 | |
type_info::SignedInteger< int64_t > * signed_integer_int64 | |
type_info::Stream * stream | |
type_info::StreamIterator * stream_iterator | |
type_info::StreamView * stream_view | |
type_info::String * string | |
type_info::StrongReference * strong_reference | |
type_info::Struct * struct_ | |
type_info::Time * time | |
type_info::Tuple * tuple | |
type_info::Union * union_ | |
type_info::UnsignedInteger< uint8_t > * unsigned_integer_uint8 | |
type_info::UnsignedInteger< uint16_t > * unsigned_integer_uint16 | |
type_info::UnsignedInteger< uint32_t > * unsigned_integer_uint32 | |
type_info::UnsignedInteger< uint64_t > * unsigned_integer_uint64 | |
type_info::ValueReference * value_reference | |
type_info::Vector * vector | |
type_info::VectorIterator * vector_iterator | |
type_info::Void * void_ | |
type_info::WeakReference * weak_reference | |
}; | |
Top-level type information structure describing one type. There's a generic part applying to all types, plus a tagged union storing additional, type-specific auxiliary information. To query which union field is set users should query the tag
member.
const char* hilti::rt::TypeInfo::display |
String rendering of the type.
std::optional<const char*> hilti::rt::TypeInfo::id |
Spicy-side ID associated with the type, if any.