CBMC
small_mapt< T, Ind, Num >::const_iterator Class Reference

Const iterator. More...

#include <small_map.h>

+ Collaboration diagram for small_mapt< T, Ind, Num >::const_iterator:

Public Member Functions

 const_iterator (const small_mapt &m)
 
 const_iterator (const small_mapt &m, const std::size_t idx, const std::size_t ii)
 
const valuet operator* () const
 
const std::shared_ptr< valuetoperator-> () const
 
const T & get_value () const
 Non-standard direct access to the underlying value instead of creating a valuet object. More...
 
const_iterator operator++ ()
 
const_iterator operator++ (int)
 
bool operator== (const const_iterator &other) const
 
bool operator!= (const const_iterator &other) const
 

Private Member Functions

void find_next ()
 

Private Attributes

const small_maptm
 
std::size_t idx
 
std::size_t ii
 

Detailed Description

template<typename T, typename Ind = uint32_t, std::size_t Num = 8>
class small_mapt< T, Ind, Num >::const_iterator

Const iterator.

Any modification of the underlying map invalidates the iterator

Definition at line 242 of file small_map.h.

Constructor & Destructor Documentation

◆ const_iterator() [1/2]

template<typename T , typename Ind = uint32_t, std::size_t Num = 8>
small_mapt< T, Ind, Num >::const_iterator::const_iterator ( const small_mapt m)
inlineexplicit

Definition at line 245 of file small_map.h.

◆ const_iterator() [2/2]

template<typename T , typename Ind = uint32_t, std::size_t Num = 8>
small_mapt< T, Ind, Num >::const_iterator::const_iterator ( const small_mapt m,
const std::size_t  idx,
const std::size_t  ii 
)
inline

Definition at line 250 of file small_map.h.

Member Function Documentation

◆ find_next()

template<typename T , typename Ind = uint32_t, std::size_t Num = 8>
void small_mapt< T, Ind, Num >::const_iterator::find_next ( )
inlineprivate

Definition at line 307 of file small_map.h.

◆ get_value()

template<typename T , typename Ind = uint32_t, std::size_t Num = 8>
const T& small_mapt< T, Ind, Num >::const_iterator::get_value ( ) const
inline

Non-standard direct access to the underlying value instead of creating a valuet object.

Avoids creating a very short-lived valuet object when only the value is needed.

Returns
Reference to value stored in the map.

Definition at line 272 of file small_map.h.

◆ operator!=()

template<typename T , typename Ind = uint32_t, std::size_t Num = 8>
bool small_mapt< T, Ind, Num >::const_iterator::operator!= ( const const_iterator other) const
inline

Definition at line 301 of file small_map.h.

◆ operator*()

template<typename T , typename Ind = uint32_t, std::size_t Num = 8>
const valuet small_mapt< T, Ind, Num >::const_iterator::operator* ( ) const
inline

Definition at line 258 of file small_map.h.

◆ operator++() [1/2]

template<typename T , typename Ind = uint32_t, std::size_t Num = 8>
const_iterator small_mapt< T, Ind, Num >::const_iterator::operator++ ( )
inline

Definition at line 277 of file small_map.h.

◆ operator++() [2/2]

template<typename T , typename Ind = uint32_t, std::size_t Num = 8>
const_iterator small_mapt< T, Ind, Num >::const_iterator::operator++ ( int  )
inline

Definition at line 285 of file small_map.h.

◆ operator->()

template<typename T , typename Ind = uint32_t, std::size_t Num = 8>
const std::shared_ptr<valuet> small_mapt< T, Ind, Num >::const_iterator::operator-> ( ) const
inline

Definition at line 263 of file small_map.h.

◆ operator==()

template<typename T , typename Ind = uint32_t, std::size_t Num = 8>
bool small_mapt< T, Ind, Num >::const_iterator::operator== ( const const_iterator other) const
inline

Definition at line 296 of file small_map.h.

Member Data Documentation

◆ idx

template<typename T , typename Ind = uint32_t, std::size_t Num = 8>
std::size_t small_mapt< T, Ind, Num >::const_iterator::idx
private

Definition at line 323 of file small_map.h.

◆ ii

template<typename T , typename Ind = uint32_t, std::size_t Num = 8>
std::size_t small_mapt< T, Ind, Num >::const_iterator::ii
private

Definition at line 324 of file small_map.h.

◆ m

template<typename T , typename Ind = uint32_t, std::size_t Num = 8>
const small_mapt& small_mapt< T, Ind, Num >::const_iterator::m
private

Definition at line 322 of file small_map.h.


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