CatapultServer  v0.5.0.1 (Elephant)
TransactionInfoSerializer.h
Go to the documentation of this file.
1 
21 #pragma once
24 
25 namespace catapult {
26  namespace io {
27  class InputStream;
28  class OutputStream;
29  }
30 }
31 
32 namespace catapult { namespace io {
33 
35  void WriteTransactionInfo(const model::TransactionInfo& transactionInfo, OutputStream& outputStream);
36 
38  void ReadTransactionInfo(InputStream& inputStream, model::TransactionInfo& transactionInfo);
39 
41  void WriteTransactionInfos(const model::TransactionInfosSet& transactionInfos, OutputStream& outputStream);
42 
44  void ReadTransactionInfos(InputStream& inputStream, model::TransactionInfosSet& transactionInfos);
45 }}
catapult::utils::ByteArray::size
constexpr size_t size() const
Returns the array size.
Definition: ByteArray.h:55
Observers.h
catapult::io::ReadTransactionInfos
void ReadTransactionInfos(InputStream &inputStream, model::TransactionInfosSet &transactionInfos)
Reads transaction infos from inputStream into transactionInfos.
Definition: TransactionInfoSerializer.cpp:67
catapult::observers::DEFINE_OBSERVER
DEFINE_OBSERVER(AccountAddress, model::AccountAddressNotification, [](const auto &notification, const auto &context) { DefaultAccountVisitor visitor(context);visitor.visit(notification.Address);})
catapult::io::WriteTransactionInfos
void WriteTransactionInfos(const model::TransactionInfosSet &transactionInfos, OutputStream &outputStream)
Writes transactionInfos into outputStream.
Definition: TransactionInfoSerializer.cpp:61
HashCache.h
catapult::hashcache::HashCache
DECLARE_SERVICE_REGISTRAR() HashCache()
Definition: HashCacheService.cpp:46
catapult::model::TransactionInfo::MerkleComponentHash
Hash256 MerkleComponentHash
Modified hash that should be used as a hash in the merkle tree.
Definition: EntityInfo.h:131
catapult::io::Read32
auto Read32(TIo &input)
Reads value from input.
Definition: PodIoUtils.h:74
catapult::io::ReadTransactionInfo
void ReadTransactionInfo(InputStream &inputStream, model::TransactionInfo &transactionInfo)
Reads transaction info from inputStream into transactionInfo.
Definition: TransactionInfoSerializer.cpp:42
catapult::model::TransactionInfo
A transaction and its associated metadata.
Definition: EntityInfo.h:104
EntityIoUtils.h
catapult::io::OutputStream::write
virtual void write(const RawBuffer &buffer)=0
catapult::utils::ByteArray::data
constexpr const uint8_t * data() const noexcept
Returns a const pointer to the underlying array.
Definition: ByteArray.h:70
catapult::io::InputStream
Reader interface.
Definition: Stream.h:27
TransactionInfoSerializer.h
catapult::model::DetachedTransactionInfo::OptionalExtractedAddresses
std::shared_ptr< const UnresolvedAddressSet > OptionalExtractedAddresses
Extracted addresses (optional).
Definition: EntityInfo.h:100
EntityInfo.h
catapult::io::Write64
void Write64(TIo &output, uint64_t value)
Writes value into output.
Definition: PodIoUtils.h:36
catapult::model::TransactionInfosSet
std::unordered_set< TransactionInfo, EntityInfoHasher< const Transaction >, EntityInfoComparer< const Transaction > > TransactionInfosSet
Unordered set of transaction infos.
Definition: ContainerTypes.h:50
catapult::io::InputStream::read
virtual void read(const MutableRawBuffer &buffer)=0
ContainerTypes.h
catapult::model::EntityInfo::pEntity
std::shared_ptr< TEntity > pEntity
Entity pointer.
Definition: EntityInfo.h:45
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::io::Read64
auto Read64(TIo &input)
Reads value from input.
Definition: PodIoUtils.h:66
catapult::io::Write32
void Write32(TIo &output, uint32_t value)
Writes value into output.
Definition: PodIoUtils.h:42
catapult::utils::ByteArray< Address_Decoded_Size, UnresolvedAddress_tag >
Stream.h
catapult::model::EntityInfo::EntityHash
Hash256 EntityHash
Entity hash.
Definition: EntityInfo.h:48
catapult::io::WriteTransactionInfo
void WriteTransactionInfo(const model::TransactionInfo &transactionInfo, OutputStream &outputStream)
Writes transactionInfo into outputStream.
Definition: TransactionInfoSerializer.cpp:27
catapult::io::WriteEntity
void WriteEntity(TIo &output, const model::SizePrefixedEntity &entity)
Writes size prefixed entity into output.
Definition: EntityIoUtils.h:31
catapult::io::OutputStream
Writer interface.
Definition: Stream.h:41