CatapultServer  v0.5.0.1 (Elephant)
catapult::io::SizeCalculatingOutputStream Struct Reference

Stream implementation for calculating the stream size. More...

Inheritance diagram for catapult::io::SizeCalculatingOutputStream:
Collaboration diagram for catapult::io::SizeCalculatingOutputStream:

Public Member Functions

size_t size () const
 Gets the size. More...
 
void write (const RawBuffer &buffer) override
 
void flush () override
 
- Public Member Functions inherited from catapult::io::OutputStream
virtual ~OutputStream ()=default
 

Private Attributes

size_t m_size = 0
 

Detailed Description

Stream implementation for calculating the stream size.

Member Function Documentation

◆ flush()

void catapult::io::SizeCalculatingOutputStream::flush ( )
inlineoverridevirtual

Commits all pending data.

Exceptions
catapult_file_io_errorif flush failed.

Implements catapult::io::OutputStream.

◆ size()

size_t catapult::io::SizeCalculatingOutputStream::size ( ) const
inline

Gets the size.

◆ write()

void catapult::io::SizeCalculatingOutputStream::write ( const RawBuffer &  buffer)
inlineoverridevirtual

Writes data pointed to by buffer to this stream.

Exceptions
catapult_file_io_errorif proper amount of data could not be written.

Implements catapult::io::OutputStream.

Member Data Documentation

◆ m_size

size_t catapult::io::SizeCalculatingOutputStream::m_size = 0
private

The documentation for this struct was generated from the following file: