rili::stream::BufferingWritable Class Referenceabstract
Inheritance diagram for rili::stream::BufferingWritable:
Collaboration diagram for rili::stream::BufferingWritable:
Public Member Functions | |
void | write (char const *data, std::size_t size) override |
std::exception_ptr | flush () override |
view::Base const & | writableView () const override |
Public Member Functions inherited from rili::stream::Writable | |
void | write (unsigned char const *data, std::size_t size) |
Writable & | operator<< (char v) |
Writable & | operator<< (unsigned char v) |
Writable & | operator<< (char const *v) |
Writable & | operator<< (unsigned char const *v) |
Writable & | operator<< (std::string const &v) |
Writable & | operator<< (short v) |
Writable & | operator<< (unsigned short v) |
Writable & | operator<< (long v) |
Writable & | operator<< (unsigned long v) |
Writable & | operator<< (long long v) |
Writable & | operator<< (unsigned long long v) |
Writable & | operator<< (int v) |
Writable & | operator<< (unsigned int v) |
Writable & | operator<< (float v) |
Writable & | operator<< (double v) |
Writable & | operator<< (bool v) |
Writable & | operator<< (void *v) |
OperationResult | operator<< (std::function< OperationResult(Writable &)> const &fn) |
Writable & | operator<< (Writer const &fn) |
Protected Member Functions | |
virtual std::exception_ptr | commit (view::Default &view)=0 |
Member Function Documentation
|
protectedpure virtual |
commit used by BufferingWritable implementation to pass current buffered view to underlying sink implementation which should shrink provided view. User should implement it to move data from view to sink.
- Parameters
-
view data to be moved to sink
- Returns
- operation error exception if occured.
- Note
- implementation of this method is not obligated to move all data from view to sink. You can not mova anything or only that much as you can at once. BufferingWritable will care to call it again latter if still needed to push data to sink.
|
overridevirtual |
flush used to force move data to underlying sink
- Returns
- error exception if occured
Implements rili::stream::Writable.
|
overridevirtual |
view used to access currently avaliable data in stream
- Returns
- view
Implements rili::stream::Writable.
|
overridevirtual |
write used to write sequence of chars to stream of given size
- Parameters
-
data data which should be written size number of chars to write
Implements rili::stream::Writable.
The documentation for this class was generated from the following file:
- rili/stream/BufferingStream.hpp