xrpld
Loading...
Searching...
No Matches
xrpl::Writer Class Referenceabstract

#include <Writer.h>

Inheritance diagram for xrpl::Writer:

Public Member Functions

virtual ~Writer ()=default
virtual bool complete ()=0
 Returns true if there is no more data to pull.
virtual void consume (std::size_t bytes)=0
 Removes bytes from the input sequence.
virtual bool prepare (std::size_t bytes, std::function< void(void)> resume)=0
 Add data to the input sequence.
virtual std::vector< boost::asio::const_buffer > data ()=0
 Returns a ConstBufferSequence representing the input sequence.

Detailed Description

Definition at line 10 of file server/Writer.h.

Constructor & Destructor Documentation

◆ ~Writer()

virtual xrpl::Writer::~Writer ( )
virtualdefault

Member Function Documentation

◆ complete()

virtual bool xrpl::Writer::complete ( )
pure virtual

Returns true if there is no more data to pull.

Implemented in xrpl::SimpleWriter.

◆ consume()

virtual void xrpl::Writer::consume ( std::size_t bytes)
pure virtual

Removes bytes from the input sequence.

Can be called with 0.

Implemented in xrpl::SimpleWriter.

◆ prepare()

virtual bool xrpl::Writer::prepare ( std::size_t bytes,
std::function< void(void)> resume )
pure virtual

Add data to the input sequence.

Parameters
bytesA hint to the number of bytes desired.
resumeA functor to later resume execution.
Returns
true if the writer is ready to provide more data.

Implemented in xrpl::SimpleWriter.

◆ data()

virtual std::vector< boost::asio::const_buffer > xrpl::Writer::data ( )
pure virtual

Returns a ConstBufferSequence representing the input sequence.

Implemented in xrpl::SimpleWriter.