CatapultServer  v0.5.0.1 (Elephant)
catapult::state::AccountRestrictions Class Reference

Account restrictions. More...

Collaboration diagram for catapult::state::AccountRestrictions:

Public Member Functions

 AccountRestrictions (const Address &address)
 Creates account restrictions around address. More...
 
const Addressaddress () const
 Gets the account address. More...
 
size_t size () const
 Gets the number of possible account restrictions. More...
 
bool isEmpty () const
 Returns true if no restrictions are set. More...
 
template<typename TRestrictionValue >
TypedAccountRestriction< TRestrictionValue > restriction (model::AccountRestrictionType restrictionType) const
 Gets the const typed account restriction specified by restrictionType. More...
 
const AccountRestrictionrestriction (model::AccountRestrictionType restrictionType) const
 Gets the const account restriction specified by restrictionType. More...
 
AccountRestrictionrestriction (model::AccountRestrictionType restrictionType)
 Gets the account restriction specified by restrictionType. More...
 
const_iterator begin () const
 Returns a const iterator to the first account restriction. More...
 
const_iterator end () const
 Returns a const iterator to the element following the last account restriction. More...
 

Private Types

using RestrictionsMap = std::map< model::AccountRestrictionType, AccountRestriction >
 
using const_iterator = RestrictionsMap::const_iterator
 

Private Member Functions

void addRestriction (model::AccountRestrictionType restrictionType, size_t restrictionValueSize)
 

Static Private Member Functions

template<typename TRestrictionsMap , typename TAccountRestriction >
static TAccountRestriction & restriction (TRestrictionsMap &restrictionsMap, model::AccountRestrictionType restrictionType)
 

Private Attributes

Address m_address
 
RestrictionsMap m_restrictions
 

Detailed Description

Account restrictions.

Member Typedef Documentation

◆ const_iterator

using catapult::state::AccountRestrictions::const_iterator = RestrictionsMap::const_iterator
private

◆ RestrictionsMap

Constructor & Destructor Documentation

◆ AccountRestrictions()

catapult::state::AccountRestrictions::AccountRestrictions ( const Address address)
explicit

Creates account restrictions around address.

Here is the call graph for this function:

Member Function Documentation

◆ address()

const Address & catapult::state::AccountRestrictions::address ( ) const

Gets the account address.

Here is the caller graph for this function:

◆ addRestriction()

void catapult::state::AccountRestrictions::addRestriction ( model::AccountRestrictionType  restrictionType,
size_t  restrictionValueSize 
)
private
Here is the caller graph for this function:

◆ begin()

AccountRestrictions::const_iterator catapult::state::AccountRestrictions::begin ( ) const

Returns a const iterator to the first account restriction.

Here is the caller graph for this function:

◆ end()

AccountRestrictions::const_iterator catapult::state::AccountRestrictions::end ( ) const

Returns a const iterator to the element following the last account restriction.

Here is the caller graph for this function:

◆ isEmpty()

bool catapult::state::AccountRestrictions::isEmpty ( ) const

Returns true if no restrictions are set.

Here is the call graph for this function:

◆ restriction() [1/4]

AccountRestriction & catapult::state::AccountRestrictions::restriction ( model::AccountRestrictionType  restrictionType)

Gets the account restriction specified by restrictionType.

◆ restriction() [2/4]

template<typename TRestrictionValue >
TypedAccountRestriction<TRestrictionValue> catapult::state::AccountRestrictions::restriction ( model::AccountRestrictionType  restrictionType) const
inline

Gets the const typed account restriction specified by restrictionType.

Here is the caller graph for this function:

◆ restriction() [3/4]

const AccountRestriction & catapult::state::AccountRestrictions::restriction ( model::AccountRestrictionType  restrictionType) const

Gets the const account restriction specified by restrictionType.

◆ restriction() [4/4]

template<typename TRestrictionsMap , typename TAccountRestriction >
static TAccountRestriction& catapult::state::AccountRestrictions::restriction ( TRestrictionsMap &  restrictionsMap,
model::AccountRestrictionType  restrictionType 
)
inlinestaticprivate

◆ size()

size_t catapult::state::AccountRestrictions::size ( ) const

Gets the number of possible account restrictions.

Here is the caller graph for this function:

Member Data Documentation

◆ m_address

Address catapult::state::AccountRestrictions::m_address
private

◆ m_restrictions

RestrictionsMap catapult::state::AccountRestrictions::m_restrictions
private

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