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

Account restriction. More...

Collaboration diagram for catapult::state::AccountRestriction:

Public Types

using RawValue = std::vector< uint8_t >
 Raw restriction value. More...
 

Public Member Functions

 AccountRestriction (model::AccountRestrictionType restrictionType, size_t restrictionValueSize)
 Creates an account restriction around restrictionType and restrictionValueSize. More...
 
const AccountRestrictionDescriptordescriptor () const
 Gets the restriction descriptor. More...
 
size_t valueSize () const
 Gets the restriction value size. More...
 
const std::set< std::vector< uint8_t > > & values () const
 Gets the values. More...
 
bool contains (const std::vector< uint8_t > &value) const
 Returns true if value is known. More...
 
bool canAllow (const model::RawAccountRestrictionModification &modification) const
 Returns true if modification can be applied to the allowed values. More...
 
bool canBlock (const model::RawAccountRestrictionModification &modification) const
 Returns true if modification can be applied to the blocked values. More...
 
void allow (const model::RawAccountRestrictionModification &modification)
 Applies modification to the allowed values. More...
 
void block (const model::RawAccountRestrictionModification &modification)
 Applies modification to the the blocked values. More...
 

Private Member Functions

bool isOperationAllowed (const model::RawAccountRestrictionModification &modification, AccountRestrictionOperationType operationType) const
 
void update (const model::RawAccountRestrictionModification &modification)
 

Private Attributes

AccountRestrictionDescriptor m_restrictionDescriptor
 
size_t m_restrictionValueSize
 
std::set< RawValuem_values
 

Detailed Description

Account restriction.

Member Typedef Documentation

◆ RawValue

using catapult::state::AccountRestriction::RawValue = std::vector<uint8_t>

Raw restriction value.

Constructor & Destructor Documentation

◆ AccountRestriction()

catapult::state::AccountRestriction::AccountRestriction ( model::AccountRestrictionType  restrictionType,
size_t  restrictionValueSize 
)
explicit

Creates an account restriction around restrictionType and restrictionValueSize.

Member Function Documentation

◆ allow()

void catapult::state::AccountRestriction::allow ( const model::RawAccountRestrictionModification modification)

Applies modification to the allowed values.

Here is the call graph for this function:

◆ block()

void catapult::state::AccountRestriction::block ( const model::RawAccountRestrictionModification modification)

Applies modification to the the blocked values.

Here is the call graph for this function:

◆ canAllow()

bool catapult::state::AccountRestriction::canAllow ( const model::RawAccountRestrictionModification modification) const

Returns true if modification can be applied to the allowed values.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ canBlock()

bool catapult::state::AccountRestriction::canBlock ( const model::RawAccountRestrictionModification modification) const

Returns true if modification can be applied to the blocked values.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ contains()

bool catapult::state::AccountRestriction::contains ( const std::vector< uint8_t > &  value) const

Returns true if value is known.

Here is the caller graph for this function:

◆ descriptor()

const AccountRestrictionDescriptor & catapult::state::AccountRestriction::descriptor ( ) const

Gets the restriction descriptor.

Here is the caller graph for this function:

◆ isOperationAllowed()

bool catapult::state::AccountRestriction::isOperationAllowed ( const model::RawAccountRestrictionModification modification,
AccountRestrictionOperationType  operationType 
) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void catapult::state::AccountRestriction::update ( const model::RawAccountRestrictionModification modification)
private
Here is the caller graph for this function:

◆ values()

const std::set< std::vector< uint8_t > > & catapult::state::AccountRestriction::values ( ) const

Gets the values.

Here is the caller graph for this function:

◆ valueSize()

size_t catapult::state::AccountRestriction::valueSize ( ) const

Gets the restriction value size.

Member Data Documentation

◆ m_restrictionDescriptor

AccountRestrictionDescriptor catapult::state::AccountRestriction::m_restrictionDescriptor
private

◆ m_restrictionValueSize

size_t catapult::state::AccountRestriction::m_restrictionValueSize
private

◆ m_values

std::set<RawValue> catapult::state::AccountRestriction::m_values
private

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