rili::stream::BufferingFifoDuplex Class Referencefinal
Inheritance diagram for rili::stream::BufferingFifoDuplex:
[legend]
Collaboration diagram for rili::stream::BufferingFifoDuplex:
[legend]

Public Member Functions

 BufferingFifoDuplex (BufferingFifoDuplex const &other)=default
 
BufferingFifoDuplexoperator= (BufferingFifoDuplex const &other)=default
 
 BufferingFifoDuplex (BufferingFifoDuplex &&other)=default
 
BufferingFifoDuplexoperator= (BufferingFifoDuplex &&other)=default
 
void consume (std::size_t size) override
 
view::Base const & readableView () const override
 
view::Base const & writableView () const override
 
std::exception_ptr pull (std::size_t count) override
 
void write (char const *data, std::size_t size) override
 
std::exception_ptr flush () override
 
- Public Member Functions inherited from rili::stream::Duplex
 Duplex (Duplex const &other)=delete
 
Duplexoperator= (Duplex const &other)=delete
 
- Public Member Functions inherited from rili::stream::Readable
void read (unsigned char *data, std::size_t size)
 
void read (char *data, std::size_t size)
 
void read (unsigned char &c)
 
void read (char &c)
 
OperationResult operator>> (char &v)
 
OperationResult operator>> (unsigned char &v)
 
OperationResult operator>> (short &v)
 
OperationResult operator>> (unsigned short &v)
 
OperationResult operator>> (long &v)
 
OperationResult operator>> (unsigned long &v)
 
OperationResult operator>> (long long &v)
 
OperationResult operator>> (unsigned long long &v)
 
OperationResult operator>> (int &v)
 
OperationResult operator>> (unsigned int &v)
 
OperationResult operator>> (float &v)
 
OperationResult operator>> (double &v)
 
OperationResult operator>> (bool &v)
 
OperationResult operator>> (void *&v)
 
OperationResult operator>> (std::string &v)
 
OperationResult operator>> (Reader const &fn)
 
- Public Member Functions inherited from rili::stream::Writable
void write (unsigned char const *data, std::size_t size)
 
Writableoperator<< (char v)
 
Writableoperator<< (unsigned char v)
 
Writableoperator<< (char const *v)
 
Writableoperator<< (unsigned char const *v)
 
Writableoperator<< (std::string const &v)
 
Writableoperator<< (short v)
 
Writableoperator<< (unsigned short v)
 
Writableoperator<< (long v)
 
Writableoperator<< (unsigned long v)
 
Writableoperator<< (long long v)
 
Writableoperator<< (unsigned long long v)
 
Writableoperator<< (int v)
 
Writableoperator<< (unsigned int v)
 
Writableoperator<< (float v)
 
Writableoperator<< (double v)
 
Writableoperator<< (bool v)
 
Writableoperator<< (void *v)
 
OperationResult operator<< (std::function< OperationResult(Writable &)> const &fn)
 
Writableoperator<< (Writer const &fn)
 

Additional Inherited Members

- Protected Member Functions inherited from rili::stream::Duplex
 Duplex (Duplex &&other)=default
 
Duplexoperator= (Duplex &&other)=default
 

Detailed Description

It is very similar to std::stringstream

Constructor & Destructor Documentation

rili::stream::BufferingFifoDuplex::BufferingFifoDuplex ( BufferingFifoDuplex const &  other)
inlinedefault

BufferingFifoDuplex.

Parameters
other
Returns
rili::stream::BufferingFifoDuplex::BufferingFifoDuplex ( BufferingFifoDuplex &&  other)
inlinedefault

BufferingFifoDuplex.

Parameters
other
Returns

Member Function Documentation

void rili::stream::BufferingFifoDuplex::consume ( std::size_t  size)
overridevirtual

consume remove given number of bytes from front of view

Parameters
sizenumber of bytes to remove

Implements rili::stream::Readable.

std::exception_ptr rili::stream::BufferingFifoDuplex::flush ( )
overridevirtual

flush used to force move data to underlying sink

Returns
error exception if occured

Implements rili::stream::Writable.

BufferingFifoDuplex& rili::stream::BufferingFifoDuplex::operator= ( BufferingFifoDuplex const &  other)
inlinedefault

BufferingFifoDuplex.

Parameters
other
Returns
BufferingFifoDuplex& rili::stream::BufferingFifoDuplex::operator= ( BufferingFifoDuplex &&  other)
inlinedefault

BufferingFifoDuplex.

Parameters
other
Returns
std::exception_ptr rili::stream::BufferingFifoDuplex::pull ( std::size_t  count)
overridevirtual

pull used to pull from stream underlying sink at least given number of bytes

Parameters
countnumber of bytes to retrieve from sink
Returns
error exception if occured
Note
implementation of this function do not should provide at least count number of bytes to view.
count equal to 0 means implementation should provide zero or more bytes to view and implementation should choose easiest amount to provide.

Implements rili::stream::Readable.

view::Base const& rili::stream::BufferingFifoDuplex::readableView ( ) const
overridevirtual

readableView used to access stream view

Returns
view

Implements rili::stream::Readable.

view::Base const& rili::stream::BufferingFifoDuplex::writableView ( ) const
overridevirtual

view used to access currently avaliable data in stream

Returns
view

Implements rili::stream::Writable.

void rili::stream::BufferingFifoDuplex::write ( char const *  data,
std::size_t  size 
)
overridevirtual

write used to write sequence of chars to stream of given size

Parameters
datadata which should be written
sizenumber of chars to write

Implements rili::stream::Writable.


The documentation for this class was generated from the following file:
  • rili/stream/BufferingStream.hpp