CatapultServer  v0.5.0.1 (Elephant)
TransactionStatement.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "Receipt.h"
23 #include "ReceiptSource.h"
24 
25 namespace catapult { namespace model {
26 
29  public:
31  explicit TransactionStatement(const ReceiptSource& source);
32 
33  public:
35  const ReceiptSource& source() const;
36 
38  size_t size() const;
39 
41  const Receipt& receiptAt(size_t index) const;
42 
44  Hash256 hash() const;
45 
46  public:
48  void addReceipt(const Receipt& receipt);
49 
50  private:
52  std::vector<std::unique_ptr<Receipt>> m_receipts;
53  };
54 }}
catapult::model::TransactionStatement::receiptAt
const Receipt & receiptAt(size_t index) const
Gets the receipt at index.
Definition: TransactionStatement.cpp:38
Receipt.h
catapult::model::TransactionStatement::hash
Hash256 hash() const
Calculates a unique hash for this statement.
Definition: TransactionStatement.cpp:42
MemoryUtils.h
TransactionStatement.h
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::TransactionStatement::source
const ReceiptSource & source() const
Gets statement source.
Definition: TransactionStatement.cpp:30
catapult::crypto::KeccakBuilder
Builder for building a hash.
Definition: Hashes.h:61
catapult::model::Receipt::Type
ReceiptType Type
Receipt type.
Definition: Receipt.h:36
catapult::model::TransactionStatement::size
size_t size() const
Gets the number of attached receipts.
Definition: TransactionStatement.cpp:34
catapult::model::ReceiptType
ReceiptType
Enumeration of receipt types.
Definition: ReceiptType.h:58
catapult::model::TransactionStatement::m_receipts
std::vector< std::unique_ptr< Receipt > > m_receipts
Definition: TransactionStatement.h:52
catapult::crypto::KeccakBuilder::final
void final(OutputType &output) noexcept
Finalize hash calculation. Returns result in output.
Definition: Hashes.cpp:145
Hashes.h
catapult::crypto::KeccakBuilder::update
void update(const RawBuffer &dataBuffer) noexcept
Updates the state of hash with data inside dataBuffer.
Definition: Hashes.cpp:134
ReceiptSource.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::TransactionStatement::m_source
ReceiptSource m_source
Definition: TransactionStatement.h:51
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::model::TransactionStatement::TransactionStatement
TransactionStatement(const ReceiptSource &source)
Creates a statement around source.
Definition: TransactionStatement.cpp:27
catapult::utils::ByteArray< Hash256_Size, Hash256_tag >
catapult::model::SizePrefixedEntity::Size
uint32_t Size
Entity size.
Definition: SizePrefixedEntity.h:33