Spicy
Public Types | Public Member Functions | Public Attributes | List of all members
hilti::rt::TypeInfo Struct Reference

#include <type-info.h>

Public Types

enum  Tag {
  Undefined, Address, Any, Bool,
  Bytes, BytesIterator, Enum, Error,
  Exception, Function, Interval, Library,
  Map, MapIterator, Network, Optional,
  Port, Real, RegExp, Result,
  Set, SetIterator, SignedInteger_int8, SignedInteger_int16,
  SignedInteger_int32, SignedInteger_int64, Stream, StreamIterator,
  StreamView, String, StrongReference, Struct,
  Time, Tuple, Union, UnsignedInteger_uint8,
  UnsignedInteger_uint16, UnsignedInteger_uint32, UnsignedInteger_uint64, ValueReference,
  Vector, VectorIterator, Void, WeakReference
}
 

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< const char, void(*)(const char *)> _storage = {nullptr, [](const 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
 
}; 
 

Detailed Description

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.

Member Data Documentation

◆ display

const char* hilti::rt::TypeInfo::display

String rendering of the type.

◆ id

std::optional<const char*> hilti::rt::TypeInfo::id

Spicy-side ID associated with the type, if any.


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