Spicy
Public Types | Public Member Functions | Static Public Member Functions | List of all members
hilti::rt::type_info::MapIterator Class Reference

#include <type-info.h>

Public Types

using Accessor = std::pair< const void *, const void * >(*)(const Value &v)
 

Public Member Functions

 MapIterator (const TypeInfo *ktype, const TypeInfo *vtype, Accessor accessor)
 
std::pair< Value, Valuevalue (const Value &v) const
 
const TypeInfokeyType () const
 
const TypeInfovalueType () const
 

Static Public Member Functions

template<typename K , typename V >
static auto accessor ()
 

Detailed Description

Auxiliary type information for type `iterator<map>.

Member Typedef Documentation

◆ Accessor

using hilti::rt::type_info::MapIterator::Accessor = std::pair<const void*, const void*> (*)(const Value& v)

Type of a function that, given the outer value, returns a pointer to the contained element.

Constructor & Destructor Documentation

◆ MapIterator()

hilti::rt::type_info::MapIterator::MapIterator ( const TypeInfo ktype,
const TypeInfo vtype,
Accessor  accessor 
)
inline

Constructor.

Parameters
ktypetype of the keys of the contained elements
vtypetype of the values of the contained elements
accessorfunction retrieving a pointer to the contained element

Member Function Documentation

◆ keyType()

const TypeInfo* hilti::rt::type_info::MapIterator::keyType ( ) const
inline

Returns the type of the key of the elements, as passed into the constructor.

◆ value()

std::pair<Value, Value> hilti::rt::type_info::MapIterator::value ( const Value v) const
inline

Returns the contained value as (key, value) pair.

◆ valueType()

const TypeInfo* hilti::rt::type_info::MapIterator::valueType ( ) const
inline

Returns the type of the valye of the elements, as passed into the constructor.


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