CatapultServer  v0.5.0.1 (Elephant)
BlockStatementBuilder.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "BlockStatement.h"
23 
24 namespace catapult { namespace model {
25 
28  public:
31 
32  public:
34  const ReceiptSource& source() const;
35 
37  void setSource(const ReceiptSource& source);
38 
40  void popSource();
41 
42  public:
44  void addReceipt(const Receipt& receipt);
45 
47  void addResolution(const UnresolvedAddress& unresolved, const Address& resolved);
48 
50  void addResolution(UnresolvedMosaicId unresolved, MosaicId resolved);
51 
52  public:
54  std::unique_ptr<BlockStatement> build();
55 
56  private:
58  std::unique_ptr<BlockStatement> m_pStatement;
59  };
60 }}
catapult::model::BlockStatementBuilder::addResolution
void addResolution(const UnresolvedAddress &unresolved, const Address &resolved)
Adds a resolution entry for resolving unresolved value to resolved value.
Definition: BlockStatementBuilder.cpp:80
catapult::model::BlockStatementBuilder::addReceipt
void addReceipt(const Receipt &receipt)
Adds receipt to this builder.
Definition: BlockStatementBuilder.cpp:48
catapult::model::Receipt
Binary layout for a receipt entity.
Definition: Receipt.h:31
catapult::model::TransactionStatement
Collection of receipts scoped to a transaction.
Definition: TransactionStatement.h:28
catapult::model::BlockStatementBuilder::source
const ReceiptSource & source() const
Gets active source.
Definition: BlockStatementBuilder.cpp:30
catapult::model::ReceiptSource::PrimaryId
uint32_t PrimaryId
Transaction primary source (e.g. index within block).
Definition: ReceiptSource.h:43
catapult::utils::BaseValue< uint64_t, UnresolvedMosaicId_tag >
catapult::model::BlockStatementBuilder::m_pStatement
std::unique_ptr< BlockStatement > m_pStatement
Definition: BlockStatementBuilder.h:58
catapult::model::BlockStatementBuilder::build
std::unique_ptr< BlockStatement > build()
Builds a block statement.
Definition: BlockStatementBuilder.cpp:88
BlockStatementBuilder.h
catapult::model::BlockStatementBuilder
Collection of receipts scoped to a block.
Definition: BlockStatementBuilder.h:27
BlockStatement.h
catapult::model::ReceiptSource
Receipt source (unique within a block).
Definition: ReceiptSource.h:29
catapult::model::TransactionStatement::addReceipt
void addReceipt(const Receipt &receipt)
Adds receipt to this transaction statement.
Definition: TransactionStatement.cpp:65
catapult::model::BlockStatementBuilder::setSource
void setSource(const ReceiptSource &source)
Sets active source.
Definition: BlockStatementBuilder.cpp:34
catapult::model::BlockStatementBuilder::popSource
void popSource()
Decrements the current primary source and removes all receipts associated with it.
Definition: BlockStatementBuilder.cpp:38
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::utils::ByteArray< Address_Decoded_Size, UnresolvedAddress_tag >
catapult::model::BlockStatementBuilder::m_activeSource
ReceiptSource m_activeSource
Definition: BlockStatementBuilder.h:57
catapult::model::DeepCopyTo
void DeepCopyTo(BlockStatement &destination, const BlockStatement &source)
Creates a deep copy of source into destination.
Definition: BlockStatement.cpp:101
catapult::model::BlockStatementBuilder::BlockStatementBuilder
BlockStatementBuilder()
Creates a builder.
Definition: BlockStatementBuilder.cpp:25