|
libcdoc 0.1.8
|
An abstract base class for multi-stream consumers. More...
#include <Io.h>
Inherits libcdoc::DataConsumer.
Inherited by libcdoc::FileListConsumer.
Public Member Functions | |
| virtual | ~MultiDataConsumer ()=default |
| virtual result_t | open (const std::string &name, int64_t size)=0 |
| create a new named sub-stream | |
Public Member Functions inherited from libcdoc::DataConsumer | |
| DataConsumer ()=default | |
| virtual | ~DataConsumer ()=default |
| virtual result_t | write (const uint8_t *src, size_t size)=0 |
| write write bytes to output object | |
| virtual result_t | close ()=0 |
| informs DataConsumer that the writing is finished | |
| virtual bool | isError ()=0 |
| checks whether DataSource is in error state | |
| virtual std::string | getLastErrorStr (result_t code) const |
| get textual description of the last error | |
| result_t | write (const std::vector< uint8_t > &src) |
| write all bytes in vector | |
| result_t | write (const std::string &src) |
| write all bytes in string | |
| result_t | writeAll (DataSource &src) |
| write all data from input object | |
| DataConsumer (const DataConsumer &)=delete | |
| DataConsumer & | operator= (const DataConsumer &)=delete |
An abstract base class for multi-stream consumers.
A new sub-stream is created by open and finished either by the next open or by closing the whole stream.
|
virtualdefault |
|
pure virtual |
create a new named sub-stream
Creates a new named sub-stream. It is up to implementation to handle the name and optional size.
| name | the name of sub-stream |
| size | the size of sub-stream or -1 if unknown at creation time |
Implemented in libcdoc::FileListConsumer.