Falcon::TranscoderByte Class Reference

Transparent byte oriented encoder. More...

#include <transcoding.h>

Inheritance diagram for Falcon::TranscoderByte:

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.
char substituteChar () const
void substituteChar (char chr)
 Set the substitute character.
 TranscoderByte (const TranscoderByte &other)
 TranscoderByte (Stream *s, bool bOwn=false)


Detailed Description

Transparent byte oriented encoder.

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.


Constructor & Destructor Documentation

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

Falcon::TranscoderByte::TranscoderByte ( const TranscoderByte other  ) 


Member Function Documentation

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.

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

Implements Falcon::Stream.

virtual bool Falcon::TranscoderByte::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.

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 '?'.


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