CatapultServer  v0.5.0.1 (Elephant)
catapult::validators::AccountRestrictionView Class Reference

A view on top of a catapult cache cache for retrieving a typed account restriction. More...

Collaboration diagram for catapult::validators::AccountRestrictionView:

Public Member Functions

 AccountRestrictionView (const cache::ReadOnlyCatapultCache &cache)
 Creates a view around cache. More...
 
bool initialize (const Address &address)
 Tries to initialize the internal iterator for account restriction with address. More...
 
template<typename TRestrictionValue >
state::TypedAccountRestriction< TRestrictionValue > get (model::AccountRestrictionType restrictionType) const
 
template<typename TRestrictionValue >
bool isAllowed (model::AccountRestrictionType restrictionType, const TRestrictionValue &value)
 Returns true if value is allowed. More...
 

Private Types

using FindIterator = cache::AccountRestrictionCacheTypes::CacheReadOnlyType::ReadOnlyFindIterator< cache::AccountRestrictionCacheView::const_iterator, cache::AccountRestrictionCacheDelta::const_iterator >
 

Private Attributes

const cache::ReadOnlyCatapultCachem_cache
 
FindIterator m_iter
 

Detailed Description

A view on top of a catapult cache cache for retrieving a typed account restriction.

Member Typedef Documentation

◆ FindIterator

Constructor & Destructor Documentation

◆ AccountRestrictionView()

catapult::validators::AccountRestrictionView::AccountRestrictionView ( const cache::ReadOnlyCatapultCache cache)
explicit

Creates a view around cache.

Member Function Documentation

◆ get()

template<typename TRestrictionValue >
state::TypedAccountRestriction<TRestrictionValue> catapult::validators::AccountRestrictionView::get ( model::AccountRestrictionType  restrictionType) const
inline

Gets the typed account restriction specified by restrictionType.

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

◆ initialize()

bool catapult::validators::AccountRestrictionView::initialize ( const Address address)

Tries to initialize the internal iterator for account restriction with address.

Here is the call graph for this function:

◆ isAllowed()

template<typename TRestrictionValue >
bool catapult::validators::AccountRestrictionView::isAllowed ( model::AccountRestrictionType  restrictionType,
const TRestrictionValue &  value 
)
inline

Returns true if value is allowed.

Member Data Documentation

◆ m_cache

const cache::ReadOnlyCatapultCache& catapult::validators::AccountRestrictionView::m_cache
private

◆ m_iter

FindIterator catapult::validators::AccountRestrictionView::m_iter
private

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