Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

VersionMango::StringDecoder16 Class Reference

Inheritance diagram for VersionMango::StringDecoder16:

VersionMango::StringDecoder List of all members.

Public Member Functions

 this (UConverter cvt, uint limit=uint.max)
 this (char[] type, uint limit=uint.max)
ConverterType type ()
uint read (IBuffer buffer, wchar[] dst)

Protected Member Functions

uint decoder (void *p, uint capacity)

Private Member Functions

void read (IReader r)
void setLimit (uint limit)
void setConverter (UConverter cvt)
void reset (uint limit=uint.max)
uint toGo ()
BufferDecoder bind (IReader reader)

Detailed Description

Decode a byte stream into UTF16 wchars. This decoder can:

Definition at line 237 of file UMango.d.


Member Function Documentation

this UConverter  cvt,
uint  limit = uint.max
[inline]
 

Construct a decoder with the given UConverter, and an optional 'limit' to the number of input bytes to be converted.

Definition at line 247 of file UMango.d.

this char[]  type,
uint  limit = uint.max
[inline]
 

Construct a decoder of the given specification, and an optional 'limit' to the number of input bytes to be converted.

Definition at line 261 of file UMango.d.

References UConverter.

ConverterType type  )  [inline]
 

Return the type of this decoder

Reimplemented from VersionMango::StringDecoder.

Definition at line 272 of file UMango.d.

References ConverterType.

uint decoder void *  p,
uint  capacity
[inline, protected]
 

Signature for BufferDecoder handlers. These decoders are intended to be usable as the default handlers within the reader constructs. Use IReader.setDecoder() to set a decoder as the default handler.

Reimplemented from VersionMango::StringDecoder.

Definition at line 287 of file UMango.d.

uint read IBuffer  buffer,
wchar[]  dst
[inline]
 

Decoders can be used to convert directly into a provided destination. The converter will try to fill the destination, up to the configured input 'limit', and returns the number of elements thus converted. This returned value will be less than the destination capacity when either the 'limit' was reached, or when a partial surrogate would have been placed at the tail.

Reimplemented from VersionMango::StringDecoder.

Definition at line 308 of file UMango.d.

References UAdjust::input, and UAdjust::output.

void read IReader  r  )  [inline, protected, inherited]
 

Placeholder for subclasses to do something useful when applied to an IReader. See UString for an example of such usage.

Reimplemented from IReadable.

Definition at line 174 of file UMango.d.

void setLimit uint  limit  )  [inline, inherited]
 

Set the limit for this decoder. This will cause the decoder to halt after reading the specified number of bytes from its input. The decoder may also halt before that point if the destination becomes full. Use method toGo() to monitor how much content has been read so far.

Definition at line 123 of file UMango.d.

void setConverter UConverter  cvt  )  [inline, inherited]
 

Change the converter used for this decoder.

Definition at line 134 of file UMango.d.

void reset uint  limit = uint.max  )  [inline, inherited]
 

Reset the converter and the input limit. The latter defaults to being unlimited, causing the decoder to read until the destination is full.

Definition at line 149 of file UMango.d.

uint toGo  )  [inline, protected, inherited]
 

Return the number of bytes yet to be read

Definition at line 161 of file UMango.d.

BufferDecoder bind IReader  reader  )  [inline, inherited]
 

Bind this StringDecoder to the specified IReader. This is invoked by an IReader to install it as the default handler, and thus be used by all subsequent IReader.get() requests for the subclass type.

Note that the byte limit will be respected if 'limit' has been set, which can be useful when converting an unknown number of elements (a la HTTP).

Reimplemented from IDecoder.

Definition at line 191 of file UMango.d.

References BufferDecoder, and IReader::getBuffer().


The documentation for this class was generated from the following file:
Generated on Tue Jan 25 21:18:45 2005 for Mango by doxygen 1.3.6