Coder
class Coder
constructor Coderprotected
| Coder | ( | CoderEngine & engine | ); |
| PARAMETER | DESCRIPTION |
|---|---|
engine |
destructor ~Codervirtual
| virtual ~Coder | ( | ); |
method finishprotected
Finish the coding process.
Subclasses should call this method in their end() method.
| void finish | ( | ); |
method process
Process the given data.
| void process | ( | std::string_view data | ); |
| PARAMETER | DESCRIPTION |
|---|---|
data |
The data to process. |
method process
Process the given byte.
| void process | ( | uint8_t datum | ); |
| PARAMETER | DESCRIPTION |
|---|---|
datum |
The byte to process. |
class CoderEngine
constructor CoderEngine
| CoderEngine | ( | CoderOutput & output | ); |
| PARAMETER | DESCRIPTION |
|---|---|
output |
destructor ~CoderEnginevirtual
| virtual ~CoderEngine | ( | ); |
method endprotected
| void end | ( | ); |
method finish
Finish the coding process.
| void finish | ( | ); |
method finish_implementationvirtual protected
Finish the coding process.
| virtual void finish_implementation | ( | ); |
method process
Process the given byte.
| void process | ( | uint8_t datum | ); |
| PARAMETER | DESCRIPTION |
|---|---|
datum |
The byte to process. |
method process_implementationvirtual protected
Process the given byte.
| virtual void process_implementation | ( | uint8_t datum | ) | = 0; |
| PARAMETER | DESCRIPTION |
|---|---|
datum |
The byte to process. |
method writeprotected
| void write | ( | uint8_t datum | ); |
| PARAMETER | DESCRIPTION |
|---|---|
datum |
member errorprotected
member finishedprotected
member outputprotected
class CoderOutput
destructor ~CoderOutputvirtual
| virtual ~CoderOutput | ( | ); |
method end
All output has been written.
| void end | ( | ); |
| THROWS | DESCRIPTION |
|---|---|
Exception |
if the output has already been ended. |
std::runtime_error |
if an error occurs while ending the output. |
method end_implementationvirtual protected
End the output. This is called by end().
| virtual void end_implementation | ( | ); |
| THROWS | DESCRIPTION |
|---|---|
std::runtime_error |
if an error occurs while ending the output. |
method write
Write the given byte to the output.
| void write | ( | uint8_t datum | ); |
| PARAMETER | DESCRIPTION |
|---|---|
datum |
The byte to write. |
| THROWS | DESCRIPTION |
|---|---|
Exception |
if the output has already been ended. |
std::runtime_error |
if an error occurs while writing the byte. |
method write_implementationvirtual protected
Write the given byte to the output. This is called by write().
| virtual void write_implementation | ( | uint8_t datum | ) | = 0; |
| PARAMETER | DESCRIPTION |
|---|---|
datum |
The byte to write. |
| THROWS | DESCRIPTION |
|---|---|
std::runtime_error |
if an error occurs while writing the byte. |
member endedprotected
class StreamCoderOutput
constructor StreamCoderOutput
| StreamCoderOutput | ( | std::ostream & stream, | |
| size_t line_length = 0, | |||
| size_t indent = 0 | ); |
| PARAMETER | DESCRIPTION |
|---|---|
stream |
|
line_length |
|
indent |
method write_implementationvirtual
Write the given byte to the output. This is called by write().
| virtual void write_implementation | ( | uint8_t datum | ); |
| PARAMETER | DESCRIPTION |
|---|---|
datum |
The byte to write. |
| THROWS | DESCRIPTION |
|---|---|
std::runtime_error |
if an error occurs while writing the byte. |
class StringCoderOutput
constructor StringCoderOutput
| StringCoderOutput | ( | ); |
method get_string
Get the string that has been written to the output.
| std::string get_string | ( | ); |
| RETURNS | DESCRIPTION |
|---|---|
std::string |
The string that has been written to the output. |
| THROWS | DESCRIPTION |
|---|---|
Exception |
if the output has not been ended yet. |
method write_implementationvirtual
Write the given byte to the output. This is called by write().
| virtual void write_implementation | ( | uint8_t datum | ); |
| PARAMETER | DESCRIPTION |
|---|---|
datum |
The byte to write. |
| THROWS | DESCRIPTION |
|---|---|
std::runtime_error |
if an error occurs while writing the byte. |