CatapultServer  v0.5.0.1 (Elephant)
catapult::cache::MutableAccessorMixin< TSet, TCacheDescriptor, TValueAdapter > Class Template Reference
Inheritance diagram for catapult::cache::MutableAccessorMixin< TSet, TCacheDescriptor, TValueAdapter >:

Public Types

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

Public Member Functions

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

Private Types

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

Private Attributes

TSet & m_set
 

Detailed Description

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

A mixin for adding non-const access support to a cache.

Note
This is not simply a specialization of ConstAccessorMixin due to differences in function constness.

Member Typedef Documentation

◆ iterator

template<typename TSet , typename TCacheDescriptor , typename TValueAdapter = detail::NoOpAdapter<typename TCacheDescriptor::ValueType>>
using catapult::cache::MutableAccessorMixin< TSet, TCacheDescriptor, TValueAdapter >::iterator = detail::CacheFindIterator<TCacheDescriptor, TValueAdapter, SetIteratorType, ValueType>

Find (mutable) iterator.

◆ KeyType

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

◆ SetIteratorType

template<typename TSet , typename TCacheDescriptor , typename TValueAdapter = detail::NoOpAdapter<typename TCacheDescriptor::ValueType>>
using catapult::cache::MutableAccessorMixin< TSet, TCacheDescriptor, TValueAdapter >::SetIteratorType = typename TSet::FindIterator
private

◆ ValueType

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

Constructor & Destructor Documentation

◆ MutableAccessorMixin()

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

Creates a mixin around set.

Member Function Documentation

◆ find()

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

Finds the cache value identified by key.

Member Data Documentation

◆ m_set

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

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