CatapultServer
v0.5.0.1 (Elephant)
|
Account restrictions. More...
Public Member Functions | |
AccountRestrictions (const Address &address) | |
Creates account restrictions around address. More... | |
const Address & | address () 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 AccountRestriction & | restriction (model::AccountRestrictionType restrictionType) const |
Gets the const account restriction specified by restrictionType. More... | |
AccountRestriction & | restriction (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 |
Account restrictions.
|
private |
|
private |
|
explicit |
Creates account restrictions around address.
const Address & catapult::state::AccountRestrictions::address | ( | ) | const |
Gets the account address.
|
private |
AccountRestrictions::const_iterator catapult::state::AccountRestrictions::begin | ( | ) | const |
Returns a const iterator to the first account restriction.
AccountRestrictions::const_iterator catapult::state::AccountRestrictions::end | ( | ) | const |
Returns a const iterator to the element following the last account restriction.
bool catapult::state::AccountRestrictions::isEmpty | ( | ) | const |
Returns true
if no restrictions are set.
AccountRestriction & catapult::state::AccountRestrictions::restriction | ( | model::AccountRestrictionType | restrictionType | ) |
Gets the account restriction specified by restrictionType.
|
inline |
Gets the const typed account restriction specified by restrictionType.
const AccountRestriction & catapult::state::AccountRestrictions::restriction | ( | model::AccountRestrictionType | restrictionType | ) | const |
Gets the const account restriction specified by restrictionType.
|
inlinestaticprivate |
size_t catapult::state::AccountRestrictions::size | ( | ) | const |
Gets the number of possible account restrictions.
|
private |
|
private |