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

IReader Struct Reference

Inheritance diagram for IReader:

AbstractReader Reader TextReader EndianReader HttpReader List of all members.

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 char[] x)
IReader get (inout wchar[] x)
IReader get (inout dchar[] x)
IReader get (IReadable x)
IReader push (uint size)
void wait ()
uint length ()
IBuffer getBuffer ()
void setAllocator (IArrayAllocator memory)
IArrayAllocator getAllocator ()
void setStringDecoder (IStringDecoder s)

Detailed Description

All reader instances should implement this interface.

Definition at line 93 of file IReader.d.


Member Function Documentation

IReader get inout bool  x  ) 
 

These are the basic reader methods

Reimplemented in AbstractReader.

Referenced by UText::VersionMango::read(), RollCall::read(), Payload::read(), Message::read(), InvalidatorPayload::read(), testBuffer(), testClassIO(), testClassSerialization(), testCompositeIO(), testProtocol(), and testRandomAccess().

IReader get inout byte  x  ) 
 

Reimplemented in AbstractReader.

IReader get inout ubyte  x  ) 
 

Reimplemented in AbstractReader.

IReader get inout short  x  ) 
 

Reimplemented in AbstractReader.

IReader get inout ushort  x  ) 
 

Reimplemented in AbstractReader.

IReader get inout int  x  ) 
 

Reimplemented in AbstractReader.

IReader get inout uint  x  ) 
 

Reimplemented in AbstractReader.

IReader get inout long  x  ) 
 

Reimplemented in AbstractReader.

IReader get inout ulong  x  ) 
 

Reimplemented in AbstractReader.

IReader get inout float  x  ) 
 

Reimplemented in AbstractReader.

IReader get inout double  x  ) 
 

Reimplemented in AbstractReader.

IReader get inout real  x  ) 
 

Reimplemented in AbstractReader.

IReader get inout char  x  ) 
 

Reimplemented in AbstractReader.

IReader get inout wchar  x  ) 
 

Reimplemented in AbstractReader.

IReader get inout dchar  x  ) 
 

Reimplemented in AbstractReader.

IReader get inout char[]  x  ) 
 

Reimplemented in AbstractReader, and TextReader.

IReader get inout wchar[]  x  ) 
 

Reimplemented in AbstractReader, and TextReader.

IReader get inout dchar[]  x  ) 
 

Reimplemented in AbstractReader, 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 AbstractReader.

IReader push uint  size  ) 
 

Push the size (in bytes) to use for the next array-read. By default, array sizes are read from the input stream, so this is the means by which one may specify the size where the stream is not formatted in such a manner.

char[] x; int size; IReader reader; reader.push(size).get(x);

Reimplemented in AbstractReader.

void wait  ) 
 

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

Reimplemented in AbstractReader.

uint length  ) 
 

Return the size (byte count) of the subsequent data stream. This is typically read from the stream as a number, but may be provided by the client code via the push() method.

Reimplemented in AbstractReader.

Referenced by SliceAllocator::allocate(), BufferAllocator::allocate(), SimpleAllocator::allocate(), and Message::read().

IBuffer getBuffer  ) 
 

Return the buffer associated with this reader

Reimplemented in AbstractReader.

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

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 AbstractReader.

IArrayAllocator getAllocator  ) 
 

Reimplemented in AbstractReader.

Referenced by UString::VersionMango::read().

void setStringDecoder IStringDecoder  s  ) 
 

Set the configured IStringDecoder. These are intended to be used as a conversion mechanism between various character representations. They are also expected to be used for the process of applying character encodings.

Reimplemented in AbstractReader.


The documentation for this struct was generated from the following file:
Generated on Sun Nov 7 19:07:06 2004 for Mango by doxygen 1.3.6