Spicy
Public Member Functions | List of all members
hilti::rt::type_info::map::Iterator Class Reference

#include <type-info.h>

Public Member Functions

 Iterator (const Map *type, Value v)
 
 Iterator ()
 
Iteratoroperator++ ()
 
Iterator operator++ (int)
 
std::pair< Value, Valueoperator* () const
 
bool operator== (const Iterator &other) const
 
bool operator!= (const Iterator &other) const
 

Detailed Description

Iterator to traverse over a map's value.

Constructor & Destructor Documentation

◆ Iterator() [1/2]

hilti::rt::type_info::map::Iterator::Iterator ( const Map type,
Value  v 
)
inline

Constructor.

Parameters
typetype information for the value being iterated over
vthe iterator's current value

◆ Iterator() [2/2]

hilti::rt::type_info::map::Iterator::Iterator ( )
inline

Default constructor creating an iterator that matches the end() position.

Member Function Documentation

◆ operator!=()

bool hilti::rt::type_info::map::Iterator::operator!= ( const Iterator other) const
inline

Opposite of operator==, with the same restrictions.

◆ operator*()

std::pair< Value, Value > hilti::rt::type_info::map::Iterator::operator* ( ) const
inline

Dereferences the iterator, returning the contained value.

Exceptions
<tt>InvalidIterator</tt>if the iterator is not pointing to a value (i.e., if it's the end position).

◆ operator++() [1/2]

Iterator & hilti::rt::type_info::map::Iterator::operator++ ( )
inline

Advances the iterator forward.

◆ operator++() [2/2]

Iterator hilti::rt::type_info::map::Iterator::operator++ ( int  )
inline

Advances the iterator forward.

◆ operator==()

bool hilti::rt::type_info::map::Iterator::operator== ( const Iterator other) const
inline

Returns whether the iterator matches the end position..

Note: The method does not support generic iterator comparisons, it only works for matching against the end position as returned by the default constructor.

Parameters
otheriterator to compare against

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