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

IReader Struct Reference

Inheritance diagram for IReader:

Reader EndianReader HttpReader TextReader ConsoleReader List of all members.

Public Types

typedef get opShr
typedef get opCall

Public Member Functions

IReader get (inout bool x)
IReader get (inout byte x)
IReader get (inout ubyte x)
IReader get (inout short x)
IReader get (inout ushort x)
IReader get (inout int x)
IReader get (inout uint x)
IReader get (inout long x)
IReader get (inout ulong x)
IReader get (inout float x)
IReader get (inout double x)
IReader get (inout real x)
IReader get (inout char x)
IReader get (inout wchar x)
IReader get (inout dchar x)
IReader get (inout byte[] x, uint elements=uint.max)
IReader get (inout short[] x, uint elements=uint.max)
IReader get (inout int[] x, uint elements=uint.max)
IReader get (inout long[] x, uint elements=uint.max)
IReader get (inout ubyte[] x, uint elements=uint.max)
IReader get (inout ushort[] x, uint elements=uint.max)
IReader get (inout uint[] x, uint elements=uint.max)
IReader get (inout ulong[] x, uint elements=uint.max)
IReader get (inout float[] x, uint elements=uint.max)
IReader get (inout double[] x, uint elements=uint.max)
IReader get (inout real[] x, uint elements=uint.max)
IReader get (inout char[] x, uint elements=uint.max)
IReader get (inout wchar[] x, uint elements=uint.max)
IReader get (inout dchar[] x, uint elements=uint.max)
IReader get (IReadable x)
void wait ()
IBuffer getBuffer ()
IArrayAllocator getAllocator ()
void setAllocator (IArrayAllocator memory)
void setDecoder (IDecoder d)

Detailed Description

All reader instances should implement this interface.

Definition at line 96 of file IReader.d.


Member Typedef Documentation

typedef get opShr
 

Definition at line 98 of file IReader.d.

typedef get opCall
 

Definition at line 99 of file IReader.d.


Member Function Documentation

IReader get inout bool  x  ) 
 

These are the basic reader methods

Reimplemented in Reader.

Referenced by RollCall::read(), Payload::read(), Message::read(), InvalidatorPayload::read(), testBuffer(), and testProtocol().

IReader get inout byte  x  ) 
 

Reimplemented in Reader.

IReader get inout ubyte  x  ) 
 

Reimplemented in Reader.

IReader get inout short  x  ) 
 

Reimplemented in Reader.

IReader get inout ushort  x  ) 
 

Reimplemented in Reader.

IReader get inout int  x  ) 
 

Reimplemented in Reader.

IReader get inout uint  x  ) 
 

Reimplemented in Reader.

IReader get inout long  x  ) 
 

Reimplemented in Reader.

IReader get inout ulong  x  ) 
 

Reimplemented in Reader.

IReader get inout float  x  ) 
 

Reimplemented in Reader.

IReader get inout double  x  ) 
 

Reimplemented in Reader.

IReader get inout real  x  ) 
 

Reimplemented in Reader.

IReader get inout char  x  ) 
 

Reimplemented in Reader.

IReader get inout wchar  x  ) 
 

Reimplemented in Reader.

IReader get inout dchar  x  ) 
 

Reimplemented in Reader.

IReader get inout byte[]  x,
uint  elements = uint.max
 

Reimplemented in Reader.

IReader get inout short[]  x,
uint  elements = uint.max
 

Reimplemented in Reader.

IReader get inout int[]  x,
uint  elements = uint.max
 

Reimplemented in Reader.

IReader get inout long[]  x,
uint  elements = uint.max
 

Reimplemented in Reader.

IReader get inout ubyte[]  x,
uint  elements = uint.max
 

Reimplemented in Reader.

IReader get inout ushort[]  x,
uint  elements = uint.max
 

Reimplemented in Reader.

IReader get inout uint[]  x,
uint  elements = uint.max
 

Reimplemented in Reader.

IReader get inout ulong[]  x,
uint  elements = uint.max
 

Reimplemented in Reader.

IReader get inout float[]  x,
uint  elements = uint.max
 

Reimplemented in Reader.

IReader get inout double[]  x,
uint  elements = uint.max
 

Reimplemented in Reader.

IReader get inout real[]  x,
uint  elements = uint.max
 

Reimplemented in Reader.

IReader get inout char[]  x,
uint  elements = uint.max
 

Reimplemented in Reader, and TextReader.

IReader get inout wchar[]  x,
uint  elements = uint.max
 

Reimplemented in Reader, and TextReader.

IReader get inout dchar[]  x,
uint  elements = uint.max
 

Reimplemented in Reader, and TextReader.

IReader get IReadable  x  ) 
 

This is the mechanism used for binding arbitrary classes to the IO system. If a class implements IReadable, it can be used as a target for IReader get() operations. That is, implementing IReadable is intended to transform any class into an IReader adaptor for the content held therein.

Reimplemented in Reader.

void wait  ) 
 

Pause the current thread until some content arrives in the associated input buffer. This may stall forever.

Reimplemented in Reader.

IBuffer getBuffer  ) 
 

Return the buffer associated with this reader

Reimplemented in Reader.

Referenced by LineScanner::read(), ReaderToken::read(), and BufferAllocator::reset().

IArrayAllocator getAllocator  ) 
 

Get the allocator to use for array management. Arrays are always allocated by the IReader. That is, you cannot read data into an array slice (for example). Instead, a number of IArrayAllocator classes are available to manage memory allocation when reading array content.

You might use this to manage the assigned allocator. For example, some allocators benefit from a reset() operation after each data 'record' has been processed.

Reimplemented in Reader.

void setAllocator IArrayAllocator  memory  ) 
 

Set the allocator to use for array management. Arrays are always allocated by the IReader. That is, you cannot read data into an array slice (for example). Instead, a number of IArrayAllocator classes are available to manage memory allocation when reading array content.

By default, an IReader will allocate each array from the heap. You can change that behavior by calling this method with an IArrayAllocator of choice. For instance, there is a BufferAllocator which will slice an array directly from the buffer where possible. Also available is the record-oriented SliceAllocator, which slices memory from within a pre-allocated heap area, and should be reset by the client code after each record has been read (to avoid unnecessary growth).

See ArrayAllocator for more information.

Reimplemented in Reader.

void setDecoder IDecoder  d  ) 
 

Bind an IDecoder to the writer. Decoders are intended to be used as a conversion mechanism between various character representations (encodings), or the translation of any data type from one representation to another. Each data type may be configured with a distinct decoder, covering all native types (15 in total).

An appropriate decoder set should be attached to each IReader, and thus be available for subsequent use. A raw binary implementation is attached by default (no encoding).

See module mango.icu.UMango for an example of decoder implementation -- those classes bind the ICU converters to this IO package.

Reimplemented in Reader.


The documentation for this struct was generated from the following file:
Generated on Fri May 27 18:12:02 2005 for Mango by  doxygen 1.4.0