CatapultServer  v0.5.0.1 (Elephant)
BlockElementSerializer.h
Go to the documentation of this file.
1 
21 #pragma once
23 #include <memory>
24 
25 namespace catapult {
26  namespace io {
27  class InputStream;
28  class OutputStream;
29  }
30 }
31 
32 namespace catapult { namespace io {
33 
35  void WriteBlockElement(const model::BlockElement& blockElement, OutputStream& outputStream);
36 
39  std::shared_ptr<model::BlockElement> ReadBlockElement(InputStream& inputStream);
40 }}
MemoryUtils.h
catapult::model::BlockElement::EntityHash
Hash256 EntityHash
Entity hash.
Definition: Elements.h:66
catapult::model::BlockElement::Block
const model::Block & Block
Block entity.
Definition: Elements.h:63
catapult::model::BlockElement::GenerationHash
catapult::GenerationHash GenerationHash
Generation hash of the block.
Definition: Elements.h:69
catapult::io::Read32
auto Read32(TIo &input)
Reads value from input.
Definition: PodIoUtils.h:74
BlockElementSerializer.h
catapult::model::BlockElement::SubCacheMerkleRoots
std::vector< Hash256 > SubCacheMerkleRoots
Merkle roots for all sub caches at the current block.
Definition: Elements.h:72
Elements.h
catapult::io::OutputStream::write
virtual void write(const RawBuffer &buffer)=0
catapult::model::BlockElement::Transactions
std::vector< TransactionElement > Transactions
Transaction elements.
Definition: Elements.h:75
catapult::io::InputStream
Reader interface.
Definition: Stream.h:27
size
uint64_t size
Definition: MemoryCounters.cpp:65
catapult::io::ReadBlockElement
std::shared_ptr< model::BlockElement > ReadBlockElement(InputStream &inputStream)
Definition: BlockElementSerializer.cpp:110
catapult::io::WriteBlockElement
void WriteBlockElement(const model::BlockElement &blockElement, OutputStream &outputStream)
Writes blockElement into outputStream.
Definition: BlockElementSerializer.cpp:51
catapult::model::BlockElement
Processing element for a block composed of a block and metadata.
Definition: Elements.h:55
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::Hash256_Size
constexpr size_t Hash256_Size
Definition: src/catapult/types.h:34
PodIoUtils.h
catapult::io::Write32
void Write32(TIo &output, uint32_t value)
Writes value into output.
Definition: PodIoUtils.h:42
Stream.h
catapult::io::OutputStream
Writer interface.
Definition: Stream.h:41
catapult::model::SizePrefixedEntity::Size
uint32_t Size
Entity size.
Definition: SizePrefixedEntity.h:33