#include <transcoding.h>
Public Member Functions | |
virtual FalconData * | clone () const |
Clones the stream. | |
virtual const String | encoding () const |
Returns the character encoding which is managed by this transcoder. | |
virtual bool | get (uint32 &chr) |
Gets next character from the stream. | |
virtual bool | put (uint32 chr) |
Writes a character on the stream. | |
char | substituteChar () const |
void | substituteChar (char chr) |
Set the substitute character. | |
TranscoderByte (const TranscoderByte &other) | |
TranscoderByte (Stream *s, bool bOwn=false) |
This encoder writes anything below 256 directly; characters above 256 are translated into a '?', but the default can be overridden with the substituteChar method.
This is a good default transcoder to be used in case it is not possibile to determine a transcoder.
Code name for this transcoder is "byte", incase you want to summon it throgh TranscoderFactory.
Falcon::TranscoderByte::TranscoderByte | ( | Stream * | s, | |
bool | bOwn = false | |||
) | [inline] |
Falcon::TranscoderByte::TranscoderByte | ( | const TranscoderByte & | other | ) |
virtual FalconData* Falcon::TranscoderByte::clone | ( | ) | const [virtual] |
Clones the stream.
This version returns 0 and sets error to unsupported; subclasses must properly clone the stream.
Reimplemented from Falcon::Stream.
virtual const String Falcon::TranscoderByte::encoding | ( | ) | const [inline, virtual] |
Returns the character encoding which is managed by this transcoder.
Subclasses must reimplement this to return the name of the supported encoding.
Implements Falcon::Transcoder.
virtual bool Falcon::TranscoderByte::get | ( | uint32 & | chr | ) | [virtual] |
Gets next character from the stream.
Subclasses must manage both stateful transcoding and properly popping readahead characters from the buffer.
Implements Falcon::Stream.
virtual bool Falcon::TranscoderByte::put | ( | uint32 | chr | ) | [virtual] |
Writes a character on the stream.
chr | the character to write. |
Reimplemented from Falcon::Stream.
char Falcon::TranscoderByte::substituteChar | ( | ) | const [inline] |
void Falcon::TranscoderByte::substituteChar | ( | char | chr | ) | [inline] |
Set the substitute character.
This is the character that this transcoder writes insead of chars above 255. By default it is '?'.