Coder
#include <tpau-cpp-kernal/Coder.h>
INCLUDE FILE
#include <tpau-cpp-kernal/Coder.h>
class Coder
constructor Coder
DEFINITION
|
Coder |
( |
CoderEngine & engine | ); |
| PARAMETER | DESCRIPTION |
engine |
|
method finish
Finish the coding process.
Subclasses should call this method in their end() method.
method process
DEFINITION
|
void process |
( |
std::string_view data | ); |
| PARAMETER | DESCRIPTION |
data |
|
method process
DEFINITION
|
void process |
( |
uint8_t datum | ); |
| PARAMETER | DESCRIPTION |
datum |
|
class CoderEngine
DEFINITION
class CoderEngine;
constructor CoderEngine
DEFINITION
|
CoderEngine |
( |
CoderOutput & output | ); |
| PARAMETER | DESCRIPTION |
output |
|
destructor ~CoderEnginevirtual
DEFINITION
|
virtual ~CoderEngine |
( |
); |
method finish
Finish the coding process.
method finish_implementationvirtual
Finish the coding process.
DEFINITION
|
virtual void finish_implementation |
( |
); |
method process
DEFINITION
|
void process |
( |
uint8_t datum | ); |
| PARAMETER | DESCRIPTION |
datum |
|
method process_implementationvirtual
DEFINITION
|
virtual void process_implementation |
( |
uint8_t datum | ) | = 0; |
| PARAMETER | DESCRIPTION |
datum |
|
method write
DEFINITION
|
void write |
( |
uint8_t datum | ); |
| PARAMETER | DESCRIPTION |
datum |
|
member finished
DEFINITION
bool finished;
member output
DEFINITION
CoderOutput & output;
class CoderOutput
DEFINITION
class CoderOutput;
destructor ~CoderOutputvirtual
DEFINITION
|
virtual ~CoderOutput |
( |
); |
method end
All output has been written.
| THROWS | DESCRIPTION |
Exception |
if the output has already been ended.
|
std::runtime_error |
if an error occurs while ending the output.
|
method end_implementationvirtual
End the output. This is called by end().
DEFINITION
|
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.
DEFINITION
|
void write |
( |
uint8_t datum | ); |
| PARAMETER | DESCRIPTION |
datum |
|
| THROWS | DESCRIPTION |
Exception |
if the output has already been ended.
|
std::runtime_error |
if an error occurs while writing the byte.
|
method write_implementationvirtual
Write the given byte to the output. This is called by write().
DEFINITION
|
virtual void write_implementation |
( |
uint8_t datum | ) | = 0; |
| PARAMETER | DESCRIPTION |
datum |
|
| THROWS | DESCRIPTION |
std::runtime_error |
if an error occurs while writing the byte.
|
class StreamCoderOutput
DEFINITION
class StreamCoderOutput;
constructor StreamCoderOutput
DEFINITION
|
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().
DEFINITION
|
virtual void write_implementation |
( |
uint8_t datum | ); |
| PARAMETER | DESCRIPTION |
datum |
|
| THROWS | DESCRIPTION |
std::runtime_error |
if an error occurs while writing the byte.
|
class StringCoderOutput
DEFINITION
class StringCoderOutput;
constructor StringCoderOutput
method get_string
Get the string that has been written to the output.
DEFINITION
|
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().
DEFINITION
|
virtual void write_implementation |
( |
uint8_t datum | ); |
| PARAMETER | DESCRIPTION |
datum |
|
| THROWS | DESCRIPTION |
std::runtime_error |
if an error occurs while writing the byte.
|