#include <Io.h>
Inherits libcdoc::DataConsumer.
◆ OStreamConsumer() [1/2]
| libcdoc::OStreamConsumer::OStreamConsumer |
( |
std::ostream * |
ofs, |
|
|
bool |
take_ownership = false |
|
) |
| |
|
inline |
◆ OStreamConsumer() [2/2]
| libcdoc::OStreamConsumer::OStreamConsumer |
( |
const std::string & |
path | ) |
|
◆ ~OStreamConsumer()
| libcdoc::OStreamConsumer::~OStreamConsumer |
( |
| ) |
|
|
inline |
◆ close()
| result_t libcdoc::OStreamConsumer::close |
( |
| ) |
|
|
inlinevirtual |
◆ isError()
| bool libcdoc::OStreamConsumer::isError |
( |
| ) |
|
|
inlinevirtual |
◆ write()
| result_t libcdoc::OStreamConsumer::write |
( |
const uint8_t * |
src, |
|
|
size_t |
size |
|
) |
| |
|
inlinevirtual |
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
- Parameters
-
| src | source block |
| size | the number of bytes to write |
- Returns
- size or error code
Implements libcdoc::DataConsumer.
References libcdoc::OUTPUT_STREAM_ERROR.
◆ _ofs
| std::ostream* libcdoc::OStreamConsumer::_ofs |
|
protected |
◆ _owned
| bool libcdoc::OStreamConsumer::_owned |
|
protected |
◆ STREAM_ERROR
| constexpr int libcdoc::OStreamConsumer::STREAM_ERROR = -500 |
|
staticconstexpr |
The documentation for this struct was generated from the following file: