#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. | |
TranscoderEOL (const TranscoderEOL &other) | |
TranscoderEOL (Stream *s, bool bOwn=false) |
Under some OSs, and in some stream environment (i.e. TELNET streams, HTTP headers etc.), the line terminator is a sequence of characters CR+LF. Falcon strings internal encoding sees '
' (LF) as a line terminator marker. As the transcoders are objects meant to translate the Falcon internal encoding into a text resource under the rules of external encoding, they also provide the facility to translate LF character into a CRLF sequence, and to recognize the CRLF sequence in read to translate it back into a '
' line terminator.
This trancoder can be cascaded with other transcoder; the stream used by this transcoder may be another transcoder storing output to files.
Falcon::TranscoderEOL::TranscoderEOL | ( | Stream * | s, | |
bool | bOwn = false | |||
) | [inline] |
Falcon::TranscoderEOL::TranscoderEOL | ( | const TranscoderEOL & | other | ) |
virtual FalconData* Falcon::TranscoderEOL::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::TranscoderEOL::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::TranscoderEOL::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::TranscoderEOL::put | ( | uint32 | chr | ) | [virtual] |
Writes a character on the stream.
chr | the character to write. |
Reimplemented from Falcon::Stream.