CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
26 namespace catapult {
namespace state {
46 const std::set<std::vector<uint8_t>>&
values()
const;
50 bool contains(
const std::vector<uint8_t>& value)
const;
AccountRestrictionModificationType ModificationType
Modification type.
Definition: AccountRestrictionTypes.h:76
bool canBlock(const model::RawAccountRestrictionModification &modification) const
Returns true if modification can be applied to the blocked values.
Definition: AccountRestriction.cpp:50
AccountRestrictionType
Account restriction types.
Definition: AccountRestrictionTypes.h:31
const AccountRestrictionDescriptor & descriptor() const
Gets the restriction descriptor.
Definition: AccountRestriction.cpp:30
Account restriction.
Definition: AccountRestriction.h:29
Account restriction descriptor.
Definition: AccountRestrictionDescriptor.h:37
Account restriction contains blocked value.
#define CATAPULT_THROW_INVALID_ARGUMENT_2(MESSAGE, PARAM1, PARAM2)
Macro used to throw a catapult invalid argument with two parameters.
Definition: exceptions.h:187
bool canAllow(const model::RawAccountRestrictionModification &modification) const
Returns true if modification can be applied to the allowed values.
Definition: AccountRestriction.cpp:46
void allow(const model::RawAccountRestrictionModification &modification)
Applies modification to the allowed values.
Definition: AccountRestriction.cpp:54
bool isOperationAllowed(const model::RawAccountRestrictionModification &modification, AccountRestrictionOperationType operationType) const
Definition: AccountRestriction.cpp:67
size_t m_restrictionValueSize
Definition: AccountRestriction.h:74
AccountRestrictionDescriptor m_restrictionDescriptor
Definition: AccountRestriction.h:73
void update(const model::RawAccountRestrictionModification &modification)
Definition: AccountRestriction.cpp:82
constexpr AccountRestrictionOperationType operationType() const
Gets the operation type.
Definition: AccountRestrictionDescriptor.h:51
Account restriction is interpreted as blocking operation.
bool contains(const std::vector< uint8_t > &value) const
Returns true if value is known.
Definition: AccountRestriction.cpp:42
Raw account restriction modification.
Definition: AccountRestrictionTypes.h:73
std::set< RawValue > m_values
Definition: AccountRestriction.h:75
Account restriction contains allowed values.
AccountRestrictionOperationType
Operation type.
Definition: AccountRestrictionDescriptor.h:28
constexpr model::AccountRestrictionType restrictionType() const
Gets the value specific part of the restriction type.
Definition: AccountRestrictionDescriptor.h:46
std::vector< uint8_t > Value
Restriction value.
Definition: AccountRestrictionTypes.h:79
Definition: AddressExtractionExtension.cpp:28
AccountRestriction(model::AccountRestrictionType restrictionType, size_t restrictionValueSize)
Creates an account restriction around restrictionType and restrictionValueSize.
Definition: AccountRestriction.cpp:25
size_t valueSize() const
Gets the restriction value size.
Definition: AccountRestriction.cpp:34
const std::set< std::vector< uint8_t > > & values() const
Gets the values.
Definition: AccountRestriction.cpp:38
void block(const model::RawAccountRestrictionModification &modification)
Applies modification to the the blocked values.
Definition: AccountRestriction.cpp:61
std::vector< uint8_t > RawValue
Raw restriction value.
Definition: AccountRestriction.h:32