|
libcdoc 0.5.0
|
#include <Io.h>
Inherits libcdoc::DataConsumer.
Public Member Functions | |
| VectorConsumer (std::vector< uint8_t > &data) | |
| result_t | write (const uint8_t *src, size_t size) noexcept final |
| write write bytes to output object | |
| result_t | close () noexcept final |
| informs DataConsumer that the writing is finished | |
| bool | isError () noexcept final |
| checks whether DataSource is in error state | |
| Public Member Functions inherited from libcdoc::DataConsumer | |
| DataConsumer ()=default | |
| virtual | ~DataConsumer ()=default |
| virtual std::string | getLastErrorStr (result_t code) const |
| get textual description of the last error | |
| result_t | write (const std::vector< uint8_t > &src) noexcept |
| write all bytes in vector | |
| result_t | write (const std::string &src) noexcept |
| write all bytes in string | |
| result_t | writeAll (DataSource &src) noexcept |
| write all data from input object | |
| DataConsumer (const DataConsumer &)=delete | |
| DataConsumer & | operator= (const DataConsumer &)=delete |
Protected Attributes | |
| std::vector< uint8_t > & | _data |
|
inline |
References _data.
|
inlinefinalvirtualnoexcept |
informs DataConsumer that the writing is finished
Implements libcdoc::DataConsumer.
References libcdoc::OK.
|
inlinefinalvirtualnoexcept |
checks whether DataSource is in error state
Implements libcdoc::DataConsumer.
|
inlinefinalvirtualnoexcept |
write write bytes to output object
The following invariant holds: If there was no error then result == size If there was an error then result < 0
| src | source block |
| size | the number of bytes to write |
Implements libcdoc::DataConsumer.
References _data.
|
protected |
Referenced by VectorConsumer(), and write().