CatapultServer  v0.5.0.1 (Elephant)
catapult::cache::detail::CacheFindIterator< TCacheDescriptor, TValueAdapter, TBaseSetIterator, TValue > Class Template Reference

An iterator that is returned by cache find functions. More...

Public Member Functions

 CacheFindIterator ()=default
 Creates an uninitialized iterator. More...
 
 CacheFindIterator (TBaseSetIterator &&iter, const KeyType &key)
 Creates an iterator around a set iterator (iter) for the specified key. More...
 
TValue & get () const
 
TValue * tryGet () const
 Tries to get a const value. More...
 
const auto * tryGetUnadapted () const
 Tries to get a const (unadapted) value. More...
 

Private Types

using KeyType = typename TCacheDescriptor::KeyType
 

Private Attributes

TBaseSetIterator m_iter
 
KeyType m_key
 

Detailed Description

template<typename TCacheDescriptor, typename TValueAdapter, typename TBaseSetIterator, typename TValue>
class catapult::cache::detail::CacheFindIterator< TCacheDescriptor, TValueAdapter, TBaseSetIterator, TValue >

An iterator that is returned by cache find functions.

Member Typedef Documentation

◆ KeyType

template<typename TCacheDescriptor , typename TValueAdapter , typename TBaseSetIterator , typename TValue >
using catapult::cache::detail::CacheFindIterator< TCacheDescriptor, TValueAdapter, TBaseSetIterator, TValue >::KeyType = typename TCacheDescriptor::KeyType
private

Constructor & Destructor Documentation

◆ CacheFindIterator() [1/2]

template<typename TCacheDescriptor , typename TValueAdapter , typename TBaseSetIterator , typename TValue >
catapult::cache::detail::CacheFindIterator< TCacheDescriptor, TValueAdapter, TBaseSetIterator, TValue >::CacheFindIterator ( )
default

Creates an uninitialized iterator.

◆ CacheFindIterator() [2/2]

template<typename TCacheDescriptor , typename TValueAdapter , typename TBaseSetIterator , typename TValue >
catapult::cache::detail::CacheFindIterator< TCacheDescriptor, TValueAdapter, TBaseSetIterator, TValue >::CacheFindIterator ( TBaseSetIterator &&  iter,
const KeyType key 
)
inline

Creates an iterator around a set iterator (iter) for the specified key.

Member Function Documentation

◆ get()

template<typename TCacheDescriptor , typename TValueAdapter , typename TBaseSetIterator , typename TValue >
TValue& catapult::cache::detail::CacheFindIterator< TCacheDescriptor, TValueAdapter, TBaseSetIterator, TValue >::get ( ) const
inline

Gets a const value.

Exceptions
catapult_invalid_argumentif this iterator does not point to a value.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tryGet()

template<typename TCacheDescriptor , typename TValueAdapter , typename TBaseSetIterator , typename TValue >
TValue* catapult::cache::detail::CacheFindIterator< TCacheDescriptor, TValueAdapter, TBaseSetIterator, TValue >::tryGet ( ) const
inline

Tries to get a const value.

Here is the caller graph for this function:

◆ tryGetUnadapted()

template<typename TCacheDescriptor , typename TValueAdapter , typename TBaseSetIterator , typename TValue >
const auto* catapult::cache::detail::CacheFindIterator< TCacheDescriptor, TValueAdapter, TBaseSetIterator, TValue >::tryGetUnadapted ( ) const
inline

Tries to get a const (unadapted) value.

Member Data Documentation

◆ m_iter

template<typename TCacheDescriptor , typename TValueAdapter , typename TBaseSetIterator , typename TValue >
TBaseSetIterator catapult::cache::detail::CacheFindIterator< TCacheDescriptor, TValueAdapter, TBaseSetIterator, TValue >::m_iter
private

◆ m_key

template<typename TCacheDescriptor , typename TValueAdapter , typename TBaseSetIterator , typename TValue >
KeyType catapult::cache::detail::CacheFindIterator< TCacheDescriptor, TValueAdapter, TBaseSetIterator, TValue >::m_key
private

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