![]() |
Spicy
|
#include <type-info.h>
Public Types | |
using | Accessor = std::tuple< std::optional< hilti::rt::any >(*)(const Value &), std::optional< hilti::rt::any >(*)(const hilti::rt::any &), std::pair< const void *, const void * >(*)(const hilti::rt::any &)> |
template<typename K , typename V > | |
using | iterator_pair = std::pair< typename hilti::rt::Map< K, V >::const_iterator, typename hilti::rt::Map< K, V >::const_iterator > |
Public Member Functions | |
Map (const TypeInfo *ktype, const TypeInfo *vtype, Accessor accessor) | |
map::Sequence | iterate (const Value &value) const |
const TypeInfo * | keyType () const |
const TypeInfo * | valueType () const |
Static Public Member Functions | |
template<typename K , typename V > | |
static Accessor | accessor () |
Friends | |
class | map::Iterator |
Auxiliary type information for type `map
.
using hilti::rt::type_info::Map::Accessor = std::tuple<std::optional<hilti::rt::any> (*)(const Value&), std::optional<hilti::rt::any> (*)(const hilti::rt::any&), std::pair<const void*, const void*> (*)(const hilti::rt::any&)> |
Similar semantics as with IterableType
, but with different type for dereferenced value.
|
inline |
Constructor.
ktype | type of the keys of the contained elements |
vtype | type of the values of the contained elements |
accessor | set of functions retrieving and manipulating an iterator to traverse the sequence of contained elements |
|
inline |
Returns a Sequence
that can be iterated over to visit all the contained elements.
|
inline |
Returns the type of the key of the elements, as passed into the constructor.
|
inline |
Returns the type of the valye of the elements, as passed into the constructor.