CatapultServer  v0.5.0.1 (Elephant)
catapult::cache::ConstAccessorMixin< TSet, TCacheDescriptor, TValueAdapter > Class Template Reference

A mixin for adding const access support to a cache. More...

Inheritance diagram for catapult::cache::ConstAccessorMixin< TSet, TCacheDescriptor, TValueAdapter >:

Public Types

using const_iterator = detail::CacheFindIterator< TCacheDescriptor, TValueAdapter, SetIteratorType, const ValueType >
 Find (const) iterator. More...
 

Public Member Functions

 ConstAccessorMixin (const TSet &set)
 Creates a mixin around set. More...
 
const_iterator find (const KeyType &key) const
 Finds the cache value identified by key. More...
 

Private Types

using KeyType = typename TCacheDescriptor::KeyType
 
using ValueType = typename TValueAdapter::AdaptedValueType
 
using SetIteratorType = typename TSet::FindConstIterator
 

Private Attributes

const TSet & m_set
 

Detailed Description

template<typename TSet, typename TCacheDescriptor, typename TValueAdapter = detail::NoOpAdapter<const typename TCacheDescriptor::ValueType>>
class catapult::cache::ConstAccessorMixin< TSet, TCacheDescriptor, TValueAdapter >

A mixin for adding const access support to a cache.

Member Typedef Documentation

◆ const_iterator

template<typename TSet , typename TCacheDescriptor , typename TValueAdapter = detail::NoOpAdapter<const typename TCacheDescriptor::ValueType>>
using catapult::cache::ConstAccessorMixin< TSet, TCacheDescriptor, TValueAdapter >::const_iterator = detail::CacheFindIterator<TCacheDescriptor, TValueAdapter, SetIteratorType, const ValueType>

Find (const) iterator.

◆ KeyType

template<typename TSet , typename TCacheDescriptor , typename TValueAdapter = detail::NoOpAdapter<const typename TCacheDescriptor::ValueType>>
using catapult::cache::ConstAccessorMixin< TSet, TCacheDescriptor, TValueAdapter >::KeyType = typename TCacheDescriptor::KeyType
private

◆ SetIteratorType

template<typename TSet , typename TCacheDescriptor , typename TValueAdapter = detail::NoOpAdapter<const typename TCacheDescriptor::ValueType>>
using catapult::cache::ConstAccessorMixin< TSet, TCacheDescriptor, TValueAdapter >::SetIteratorType = typename TSet::FindConstIterator
private

◆ ValueType

template<typename TSet , typename TCacheDescriptor , typename TValueAdapter = detail::NoOpAdapter<const typename TCacheDescriptor::ValueType>>
using catapult::cache::ConstAccessorMixin< TSet, TCacheDescriptor, TValueAdapter >::ValueType = typename TValueAdapter::AdaptedValueType
private

Constructor & Destructor Documentation

◆ ConstAccessorMixin()

template<typename TSet , typename TCacheDescriptor , typename TValueAdapter = detail::NoOpAdapter<const typename TCacheDescriptor::ValueType>>
catapult::cache::ConstAccessorMixin< TSet, TCacheDescriptor, TValueAdapter >::ConstAccessorMixin ( const TSet &  set)
inlineexplicit

Creates a mixin around set.

Member Function Documentation

◆ find()

template<typename TSet , typename TCacheDescriptor , typename TValueAdapter = detail::NoOpAdapter<const typename TCacheDescriptor::ValueType>>
const_iterator catapult::cache::ConstAccessorMixin< TSet, TCacheDescriptor, TValueAdapter >::find ( const KeyType key) const
inline

Finds the cache value identified by key.

Here is the caller graph for this function:

Member Data Documentation

◆ m_set

template<typename TSet , typename TCacheDescriptor , typename TValueAdapter = detail::NoOpAdapter<const typename TCacheDescriptor::ValueType>>
const TSet& catapult::cache::ConstAccessorMixin< TSet, TCacheDescriptor, TValueAdapter >::m_set
private

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