CatapultServer  v0.5.0.1 (Elephant)
AccountAddressRestrictionBuilder.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::AccountAddressRestrictionTransaction;
32  using EmbeddedTransaction = model::EmbeddedAccountAddressRestrictionTransaction;
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::AccountAddressRestrictionModification> m_modifications;
67  };
68 }}
AccountAddressRestrictionBuilder.h
catapult::builders::TransactionBuilder::signer
const Key & signer() const
Returns signer.
Definition: TransactionBuilder.h:41
catapult::model::AccountAddressRestrictionModification
AccountRestrictionModification< UnresolvedAddress > AccountAddressRestrictionModification
Modification type used with account address restriction transaction.
Definition: AccountAddressRestrictionTransaction.h:27
catapult::model::AccountRestrictionType
AccountRestrictionType
Account restriction types.
Definition: AccountRestrictionTypes.h:31
catapult::builders::AccountAddressRestrictionBuilder::EmbeddedTransaction
model::EmbeddedAccountAddressRestrictionTransaction EmbeddedTransaction
Definition: AccountAddressRestrictionBuilder.h:32
catapult::builders::AccountAddressRestrictionBuilder::m_restrictionType
model::AccountRestrictionType m_restrictionType
Definition: AccountAddressRestrictionBuilder.h:65
catapult::builders::AccountAddressRestrictionBuilder::AccountAddressRestrictionBuilder
AccountAddressRestrictionBuilder(model::NetworkIdentifier networkIdentifier, const Key &signer)
Definition: AccountAddressRestrictionBuilder.cpp:25
catapult::builders::AccountAddressRestrictionBuilder::sizeImpl
size_t sizeImpl() const
Definition: AccountAddressRestrictionBuilder.cpp:52
catapult::builders::AccountAddressRestrictionBuilder::Transaction
model::AccountAddressRestrictionTransaction Transaction
Definition: AccountAddressRestrictionBuilder.h:31
catapult::builders::AccountAddressRestrictionBuilder::m_modifications
std::vector< model::AccountAddressRestrictionModification > m_modifications
Definition: AccountAddressRestrictionBuilder.h:66
TransactionBuilder.h
catapult::builders::AccountAddressRestrictionBuilder::buildEmbedded
std::unique_ptr< EmbeddedTransaction > buildEmbedded() const
Builds a new embedded account address restriction transaction.
Definition: AccountAddressRestrictionBuilder.cpp:47
catapult::builders::AccountAddressRestrictionBuilder::addModification
void addModification(const model::AccountAddressRestrictionModification &modification)
Adds modification to account restriction modifications.
Definition: AccountAddressRestrictionBuilder.cpp:35
catapult::model::NetworkIdentifier
NetworkIdentifier
Possible network identifiers.
Definition: NetworkInfo.h:45
catapult::builders::AccountAddressRestrictionBuilder::setRestrictionType
void setRestrictionType(model::AccountRestrictionType restrictionType)
Sets the account restriction type to restrictionType.
Definition: AccountAddressRestrictionBuilder.cpp:31
catapult::builders::TransactionBuilder
Base transaction builder.
Definition: TransactionBuilder.h:31
AccountAddressRestrictionTransaction.h
catapult::builders::AccountAddressRestrictionBuilder::build
std::unique_ptr< Transaction > build() const
Builds a new account address restriction transaction.
Definition: AccountAddressRestrictionBuilder.cpp:43
catapult::builders::AccountAddressRestrictionBuilder::buildImpl
std::unique_ptr< TTransaction > buildImpl() const
catapult::builders::AccountAddressRestrictionBuilder
Builder for an account address restriction transaction.
Definition: AccountAddressRestrictionBuilder.h:29
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::TransactionType
model::AggregateTransaction TransactionType
Definition: AggregateTransactionBuilder.cpp:28
catapult::builders::AccountAddressRestrictionBuilder::size
size_t size() const
Definition: AccountAddressRestrictionBuilder.cpp:39