tudocomp
– The TU Dortmund Compression Framework
|
An abstraction layer for algorithm output. More...
#include <Output.hpp>
Public Member Functions | |
Output () | |
Constructs an output to stdout . More... | |
Output (Output &&other) | |
Move constructor. More... | |
Output (const Path &path, bool overwrite=false) | |
Constructs an output that appends to the file at the given path. More... | |
Output (std::vector< uint8_t > &buf) | |
Constructs an output that appends to the byte vector. More... | |
Output (std::ostream &stream) | |
Constructs an output that appends to the output stream. More... | |
Output & | operator= (Output &&other) |
Move assignment operator. More... | |
OutputStream | as_stream () const |
Creates a stream that allows for character-wise output. More... | |
Static Public Member Functions | |
static Output | from_path (const Path &path, bool overwrite=false) |
Constructs a file output writing to the file at the given path. More... | |
static Output | from_memory (std::vector< uint8_t > &buf) |
Constructs an output to a byte buffer. More... | |
static Output | from_stream (std::ostream &stream) |
Constructs an output to a stream. More... | |
Friends | |
class | OutputStream |
An abstraction layer for algorithm output.
This class serves as a generic abstraction over different output sinks: memory, files or streams. Output is generally done in a stream, ie it is written to the sink character by character.
Definition at line 23 of file Output.hpp.
|
inline |
Constructs an output to stdout
.
Definition at line 99 of file Output.hpp.
|
inline |
Move constructor.
Definition at line 102 of file Output.hpp.
|
inline |
Constructs an output that appends to the file at the given path.
path | The path to the output file. |
overwrite | If true , the file will be overwritten in case it already exists, otherwise the output will be appended to it. |
Definition at line 111 of file Output.hpp.
|
inline |
Constructs an output that appends to the byte vector.
buf | The byte buffer to write to. |
Definition at line 117 of file Output.hpp.
|
inline |
Constructs an output that appends to the output stream.
stream | The stream to write to. |
Definition at line 123 of file Output.hpp.
|
inline |
Creates a stream that allows for character-wise output.
Definition at line 223 of file OutputStream.hpp.
|
inlinestatic |
Constructs an output to a byte buffer.
buf | The byte buffer to write to. |
Definition at line 147 of file Output.hpp.
Constructs a file output writing to the file at the given path.
path | The path to the input file. |
overwrite | If true , the file will be overwritten in case it already exists, otherwise the output will be appended to it. |
Definition at line 139 of file Output.hpp.
|
inlinestatic |
Constructs an output to a stream.
stream | The stream to write to. |
Definition at line 155 of file Output.hpp.
Move assignment operator.
Definition at line 127 of file Output.hpp.
|
friend |
Definition at line 96 of file Output.hpp.