CatapultServer  v0.5.0.1 (Elephant)
AccountOperationRestrictionBuilder.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "TransactionBuilder.h"
24 #include <vector>
25 
26 namespace catapult { namespace builders {
27 
30  public:
31  using Transaction = model::AccountOperationRestrictionTransaction;
32  using EmbeddedTransaction = model::EmbeddedAccountOperationRestrictionTransaction;
33 
34  public:
38 
39  public:
42 
45 
46  public:
49  size_t size() const;
50 
52  std::unique_ptr<Transaction> build() const;
53 
55  std::unique_ptr<EmbeddedTransaction> buildEmbedded() const;
56 
57  private:
58  template<typename TTransaction>
59  size_t sizeImpl() const;
60 
61  template<typename TTransaction>
62  std::unique_ptr<TTransaction> buildImpl() const;
63 
64  private:
66  std::vector<model::AccountOperationRestrictionModification> m_modifications;
67  };
68 }}
AccountOperationRestrictionBuilder.h
catapult::builders::AccountOperationRestrictionBuilder::sizeImpl
size_t sizeImpl() const
Definition: AccountOperationRestrictionBuilder.cpp:52
catapult::builders::AccountOperationRestrictionBuilder::addModification
void addModification(const model::AccountOperationRestrictionModification &modification)
Adds modification to account restriction modifications.
Definition: AccountOperationRestrictionBuilder.cpp:35
catapult::builders::TransactionBuilder::signer
const Key & signer() const
Returns signer.
Definition: TransactionBuilder.h:41
catapult::UnresolvedAddress
utils::ByteArray< Address_Decoded_Size, UnresolvedAddress_tag > UnresolvedAddress
Definition: src/catapult/types.h:66
AccountOperationRestrictionTransaction.h
catapult::model::AccountOperationRestrictionModification
AccountRestrictionModification< EntityType > AccountOperationRestrictionModification
Modification type used with account operation restriction transaction.
Definition: AccountOperationRestrictionTransaction.h:27
catapult::builders::AccountOperationRestrictionBuilder::AccountOperationRestrictionBuilder
AccountOperationRestrictionBuilder(model::NetworkIdentifier networkIdentifier, const Key &signer)
Definition: AccountOperationRestrictionBuilder.cpp:25
catapult::model::AccountRestrictionType
AccountRestrictionType
Account restriction types.
Definition: AccountRestrictionTypes.h:31
catapult::builders::AccountOperationRestrictionBuilder::Transaction
model::AccountOperationRestrictionTransaction Transaction
Definition: AccountOperationRestrictionBuilder.h:31
catapult::observers::DEFINE_OBSERVER
DEFINE_OBSERVER(AccountAddress, model::AccountAddressNotification, [](const auto &notification, const auto &context) { DefaultAccountVisitor visitor(context);visitor.visit(notification.Address);})
catapult::builders::AccountOperationRestrictionBuilder::buildEmbedded
std::unique_ptr< EmbeddedTransaction > buildEmbedded() const
Builds a new embedded account operation restriction transaction.
Definition: AccountOperationRestrictionBuilder.cpp:47
catapult::builders::AccountOperationRestrictionBuilder::m_restrictionType
model::AccountRestrictionType m_restrictionType
Definition: AccountOperationRestrictionBuilder.h:65
catapult::builders::AccountOperationRestrictionBuilder
Builder for an account operation restriction transaction.
Definition: AccountOperationRestrictionBuilder.h:29
EntityType.h
Observers.h
catapult::builders::AccountOperationRestrictionBuilder::m_modifications
std::vector< model::AccountOperationRestrictionModification > m_modifications
Definition: AccountOperationRestrictionBuilder.h:66
TransactionPlugin.h
TransactionBuilder.h
m_context
const ObserverContext & m_context
Definition: AccountObserver.cpp:54
catapult::builders::AccountOperationRestrictionBuilder::buildImpl
std::unique_ptr< TTransaction > buildImpl() const
catapult::builders::AccountOperationRestrictionBuilder::build
std::unique_ptr< Transaction > build() const
Builds a new account operation restriction transaction.
Definition: AccountOperationRestrictionBuilder.cpp:43
AccountStateCache.h
catapult::model::NetworkIdentifier
NetworkIdentifier
Possible network identifiers.
Definition: NetworkInfo.h:45
catapult::builders::TransactionBuilder
Base transaction builder.
Definition: TransactionBuilder.h:31
catapult::builders::AccountOperationRestrictionBuilder::EmbeddedTransaction
model::EmbeddedAccountOperationRestrictionTransaction EmbeddedTransaction
Definition: AccountOperationRestrictionBuilder.h:32
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::model::AccountRestrictionModification
Binary layout for an account restriction modification.
Definition: AccountRestrictionTypes.h:61
catapult::utils::ByteArray< Key_Size, Key_tag >
catapult::builders::AccountOperationRestrictionBuilder::setRestrictionType
void setRestrictionType(model::AccountRestrictionType restrictionType)
Sets the account restriction type to restrictionType.
Definition: AccountOperationRestrictionBuilder.cpp:31
catapult::Key
utils::ByteArray< Key_Size, Key_tag > Key
Definition: src/catapult/types.h:41
catapult::builders::TransactionType
model::AggregateTransaction TransactionType
Definition: AggregateTransactionBuilder.cpp:28
catapult::builders::AccountOperationRestrictionBuilder::size
size_t size() const
Definition: AccountOperationRestrictionBuilder.cpp:39