Inheritance diagram for VersionMango::StringDecoder16:
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) |
Definition at line 237 of file UMango.d.
|
Construct a decoder with the given UConverter, and an optional 'limit' to the number of input bytes to be converted. |
|
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. |
|
Return the type of this decoder Reimplemented from VersionMango::StringDecoder. Definition at line 272 of file UMango.d. References ConverterType. |
|
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. |
|
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. |
|
Placeholder for subclasses to do something useful when applied to an IReader. See UString for an example of such usage. Reimplemented from IReadable. |
|
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. |
|
Change the converter used for this decoder. |
|
Reset the converter and the input limit. The latter defaults to being unlimited, causing the decoder to read until the destination is full. |
|
Return the number of bytes yet to be read |
|
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(). |