CatapultServer  v0.5.0.1 (Elephant)
MosaicAliasBuilder.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "TransactionBuilder.h"
24 
25 namespace catapult { namespace builders {
26 
29  public:
30  using Transaction = model::MosaicAliasTransaction;
31  using EmbeddedTransaction = model::EmbeddedMosaicAliasTransaction;
32 
33  public:
36  MosaicAliasBuilder(model::NetworkIdentifier networkIdentifier, const Key& signer);
37 
38  public:
40  void setAliasAction(model::AliasAction aliasAction);
41 
43  void setNamespaceId(NamespaceId namespaceId);
44 
46  void setMosaicId(MosaicId mosaicId);
47 
48  public:
51  size_t size() const;
52 
54  std::unique_ptr<Transaction> build() const;
55 
57  std::unique_ptr<EmbeddedTransaction> buildEmbedded() const;
58 
59  private:
60  template<typename TTransaction>
61  size_t sizeImpl() const;
62 
63  template<typename TTransaction>
64  std::unique_ptr<TTransaction> buildImpl() const;
65 
66  private:
70  };
71 }}
catapult::builders::MosaicAliasBuilder::size
size_t size() const
Definition: MosaicAliasBuilder.cpp:44
catapult::builders::MosaicAliasBuilder
Builder for a mosaic alias transaction.
Definition: MosaicAliasBuilder.h:28
catapult::builders::TransactionBuilder::signer
const Key & signer() const
Returns signer.
Definition: TransactionBuilder.h:41
catapult::builders::MosaicAliasBuilder::m_aliasAction
model::AliasAction m_aliasAction
Definition: MosaicAliasBuilder.h:67
MosaicAliasBuilder.h
catapult::builders::MosaicAliasBuilder::m_mosaicId
MosaicId m_mosaicId
Definition: MosaicAliasBuilder.h:69
catapult::builders::MosaicAliasBuilder::buildImpl
std::unique_ptr< TTransaction > buildImpl() const
catapult::utils::BaseValue< uint64_t, NamespaceId_tag >
catapult::builders::MosaicAliasBuilder::buildEmbedded
std::unique_ptr< EmbeddedTransaction > buildEmbedded() const
Builds a new embedded mosaic alias transaction.
Definition: MosaicAliasBuilder.cpp:52
catapult::builders::MosaicAliasBuilder::setAliasAction
void setAliasAction(model::AliasAction aliasAction)
Sets the alias action to aliasAction.
Definition: MosaicAliasBuilder.cpp:32
catapult::builders::MosaicAliasBuilder::m_namespaceId
NamespaceId m_namespaceId
Definition: MosaicAliasBuilder.h:68
catapult::builders::MosaicAliasBuilder::setMosaicId
void setMosaicId(MosaicId mosaicId)
Sets the aliased mosaic id to mosaicId.
Definition: MosaicAliasBuilder.cpp:40
catapult::builders::MosaicAliasBuilder::sizeImpl
size_t sizeImpl() const
Definition: MosaicAliasBuilder.cpp:57
catapult::builders::MosaicAliasBuilder::MosaicAliasBuilder
MosaicAliasBuilder(model::NetworkIdentifier networkIdentifier, const Key &signer)
Definition: MosaicAliasBuilder.cpp:25
TransactionBuilder.h
catapult::builders::MosaicAliasBuilder::build
std::unique_ptr< Transaction > build() const
Builds a new mosaic alias transaction.
Definition: MosaicAliasBuilder.cpp:48
catapult::builders::MosaicAliasBuilder::Transaction
model::MosaicAliasTransaction Transaction
Definition: MosaicAliasBuilder.h:30
MosaicAliasTransaction.h
catapult::model::NetworkIdentifier
NetworkIdentifier
Possible network identifiers.
Definition: NetworkInfo.h:45
catapult::builders::TransactionBuilder
Base transaction builder.
Definition: TransactionBuilder.h:31
catapult::builders::MosaicAliasBuilder::EmbeddedTransaction
model::EmbeddedMosaicAliasTransaction EmbeddedTransaction
Definition: MosaicAliasBuilder.h:31
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::model::AliasAction
AliasAction
Alias transaction action.
Definition: NamespaceTypes.h:36
catapult::utils::ByteArray< Key_Size, Key_tag >
catapult::builders::MosaicAliasBuilder::setNamespaceId
void setNamespaceId(NamespaceId namespaceId)
Sets the id of a namespace that will become an alias to namespaceId.
Definition: MosaicAliasBuilder.cpp:36
catapult::builders::TransactionType
model::AggregateTransaction TransactionType
Definition: AggregateTransactionBuilder.cpp:28