CatapultServer  v0.5.0.1 (Elephant)
catapult::cache::NamespaceLookupMixin< TPrimarySet, TFlatMap > Class Template Reference
Inheritance diagram for catapult::cache::NamespaceLookupMixin< TPrimarySet, TFlatMap >:

Classes

class  const_iterator
 An iterator that is returned by namespace cache find functions. More...
 

Public Member Functions

 NamespaceLookupMixin (const TPrimarySet &set, const TFlatMap &flatMap)
 Creates a mixin around (history by id) set and flatMap. More...
 
bool isActive (NamespaceId id, Height height) const
 Returns true if the value specified by identifier id is active at height. More...
 
const_iterator find (NamespaceId id) const
 Finds the cache value identified by id. More...
 

Private Attributes

const TPrimarySet & m_set
 
const TFlatMap & m_flatMap
 

Detailed Description

template<typename TPrimarySet, typename TFlatMap>
class catapult::cache::NamespaceLookupMixin< TPrimarySet, TFlatMap >

A mixin for looking up namespaces.

Note
Due to double lookups, this cannot be replaced with typical ActivePredicateMixin and ConstPredicateMixin.

Constructor & Destructor Documentation

◆ NamespaceLookupMixin()

template<typename TPrimarySet , typename TFlatMap >
catapult::cache::NamespaceLookupMixin< TPrimarySet, TFlatMap >::NamespaceLookupMixin ( const TPrimarySet &  set,
const TFlatMap &  flatMap 
)
inlineexplicit

Creates a mixin around (history by id) set and flatMap.

Member Function Documentation

◆ find()

template<typename TPrimarySet , typename TFlatMap >
const_iterator catapult::cache::NamespaceLookupMixin< TPrimarySet, TFlatMap >::find ( NamespaceId  id) const
inline

Finds the cache value identified by id.

Here is the caller graph for this function:

◆ isActive()

template<typename TPrimarySet , typename TFlatMap >
bool catapult::cache::NamespaceLookupMixin< TPrimarySet, TFlatMap >::isActive ( NamespaceId  id,
Height  height 
) const
inline

Returns true if the value specified by identifier id is active at height.

Member Data Documentation

◆ m_flatMap

template<typename TPrimarySet , typename TFlatMap >
const TFlatMap& catapult::cache::NamespaceLookupMixin< TPrimarySet, TFlatMap >::m_flatMap
private

◆ m_set

template<typename TPrimarySet , typename TFlatMap >
const TPrimarySet& catapult::cache::NamespaceLookupMixin< TPrimarySet, TFlatMap >::m_set
private

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