CatapultServer  v0.5.0.1 (Elephant)
AccountRestrictionDescriptor.h
Go to the documentation of this file.
1 
21 #pragma once
23 #include "catapult/utils/Casting.h"
24 
25 namespace catapult { namespace state {
26 
30  Allow,
31 
33  Block
34  };
35 
38  public:
42  {}
43 
44  public:
48  }
49 
55  }
56 
58  constexpr model::AccountRestrictionType raw() const {
59  return m_restrictionType;
60  }
61 
62  private:
64  return static_cast<model::AccountRestrictionType>(utils::to_underlying_type(lhs) & ~utils::to_underlying_type(flag));
65  }
66 
67  private:
69  };
70 }}
catapult::state::AccountRestrictionDescriptor::raw
constexpr model::AccountRestrictionType raw() const
Gets the raw restriction type.
Definition: AccountRestrictionDescriptor.h:58
catapult::model::AccountRestrictionType
AccountRestrictionType
Account restriction types.
Definition: AccountRestrictionTypes.h:31
catapult::state::AccountRestrictionDescriptor::m_restrictionType
model::AccountRestrictionType m_restrictionType
Definition: AccountRestrictionDescriptor.h:68
catapult::state::AccountRestrictionDescriptor::AccountRestrictionDescriptor
constexpr AccountRestrictionDescriptor(model::AccountRestrictionType restrictionType)
Creates an account restriction descriptor around restrictionType.
Definition: AccountRestrictionDescriptor.h:40
catapult::state::AccountRestrictionDescriptor
Account restriction descriptor.
Definition: AccountRestrictionDescriptor.h:37
catapult::state::AccountRestrictionOperationType::Block
Account restriction contains blocked value.
catapult::utils::to_underlying_type
constexpr std::underlying_type_t< TEnum > to_underlying_type(TEnum value)
Converts a strongly typed enumeration value to its underlying integral value.
Definition: Casting.h:37
AccountRestrictionTypes.h
catapult::state::AccountRestrictionDescriptor::StripFlag
static constexpr model::AccountRestrictionType StripFlag(model::AccountRestrictionType lhs, model::AccountRestrictionType flag)
Definition: AccountRestrictionDescriptor.h:63
catapult::state::AccountRestrictionDescriptor::operationType
constexpr AccountRestrictionOperationType operationType() const
Gets the operation type.
Definition: AccountRestrictionDescriptor.h:51
catapult::model::AccountRestrictionType::Block
Account restriction is interpreted as blocking operation.
catapult::state::AccountRestrictionOperationType::Allow
Account restriction contains allowed values.
catapult::state::AccountRestrictionOperationType
AccountRestrictionOperationType
Operation type.
Definition: AccountRestrictionDescriptor.h:28
catapult::state::AccountRestrictionDescriptor::restrictionType
constexpr model::AccountRestrictionType restrictionType() const
Gets the value specific part of the restriction type.
Definition: AccountRestrictionDescriptor.h:46
Casting.h
catapult
Definition: AddressExtractionExtension.cpp:28