CatapultServer  v0.5.0.1 (Elephant)
catapult::cache::CatapultCacheView Class Reference

Locked view on top of the catapult cache. More...

Public Member Functions

 CatapultCacheView (CacheHeightView &&cacheHeightView, std::vector< std::unique_ptr< const SubCacheView >> &&subViews)
 Creates a locked catapult cache view from a cache height view (cacheHeightView) and subViews. More...
 
 ~CatapultCacheView ()
 Releases the read lock. More...
 
 CatapultCacheView (CatapultCacheView &&)
 
CatapultCacheViewoperator= (CatapultCacheView &&)
 
template<typename TCache >
const TCache::CacheViewType & sub () const
 Gets a specific sub cache view. More...
 
StateHashInfo calculateStateHash () const
 Calculates the cache state hash. More...
 
Height height () const
 Gets the cache height associated with the read lock. More...
 
ReadOnlyCatapultCache toReadOnly () const
 Creates a read-only view of this view. More...
 

Private Attributes

std::unique_ptr< CacheHeightViewm_pCacheHeight
 
std::vector< std::unique_ptr< const SubCacheView > > m_subViews
 

Detailed Description

Locked view on top of the catapult cache.

Constructor & Destructor Documentation

◆ CatapultCacheView() [1/2]

catapult::cache::CatapultCacheView::CatapultCacheView ( CacheHeightView &&  cacheHeightView,
std::vector< std::unique_ptr< const SubCacheView >> &&  subViews 
)

Creates a locked catapult cache view from a cache height view (cacheHeightView) and subViews.

◆ ~CatapultCacheView()

catapult::cache::CatapultCacheView::~CatapultCacheView ( )
default

Releases the read lock.

◆ CatapultCacheView() [2/2]

catapult::cache::CatapultCacheView::CatapultCacheView ( CatapultCacheView &&  )
default

Member Function Documentation

◆ calculateStateHash()

StateHashInfo catapult::cache::CatapultCacheView::calculateStateHash ( ) const

Calculates the cache state hash.

◆ height()

Height catapult::cache::CatapultCacheView::height ( ) const

Gets the cache height associated with the read lock.

◆ operator=()

CatapultCacheView & catapult::cache::CatapultCacheView::operator= ( CatapultCacheView &&  )
default

◆ sub()

template<typename TCache >
const TCache::CacheViewType& catapult::cache::CatapultCacheView::sub ( ) const
inline

Gets a specific sub cache view.

Here is the caller graph for this function:

◆ toReadOnly()

ReadOnlyCatapultCache catapult::cache::CatapultCacheView::toReadOnly ( ) const

Creates a read-only view of this view.

Member Data Documentation

◆ m_pCacheHeight

std::unique_ptr<CacheHeightView> catapult::cache::CatapultCacheView::m_pCacheHeight
private

◆ m_subViews

std::vector<std::unique_ptr<const SubCacheView> > catapult::cache::CatapultCacheView::m_subViews
private

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