Falcon::TranscoderEOL Class Reference

EOL Transcoder. More...

#include <transcoding.h>

Inheritance diagram for Falcon::TranscoderEOL:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual FalconDataclone () 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)


Detailed Description

EOL Transcoder.

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.


Constructor & Destructor Documentation

Falcon::TranscoderEOL::TranscoderEOL ( Stream s,
bool  bOwn = false 
) [inline]

Falcon::TranscoderEOL::TranscoderEOL ( const TranscoderEOL other  ) 


Member Function Documentation

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.

Returns:
true if the character is available, false on stream end or error.

Implements Falcon::Stream.

virtual bool Falcon::TranscoderEOL::put ( uint32  chr  )  [virtual]

Writes a character on the stream.

Parameters:
chr the character to write.
Returns:
true success, false on stream error.

Reimplemented from Falcon::Stream.


The documentation for this class was generated from the following file:

Generated on Mon Oct 19 10:11:48 2009 for Falcon_Core by  doxygen 1.5.8