xvr2::ReadableStream Class Reference

#include <StreamInterface.h>

Inheritance diagram for xvr2::ReadableStream:

Inheritance graph
[legend]

List of all members.


Detailed Description

Implements readable/input streams.

Considerations 1. Readable streams ARE NOT flushable, that is since they are considered input devices there is no input to push down the pipe. 2. When subclassing sometimes is enough to just implement the UInt32 ReadableStream::read(void *data, UInt32 size) method. 3. Also you must provide an open method which takes a String as a parameter which specifies the stream "address", that address can be a filesystem path or any other address which your implmentation is meant to handle.

Definition at line 56 of file StreamInterface.h.


Public Member Functions

 ReadableStream ()
virtual ReadableStreamoperator>> (UInt32 n)
virtual ReadableStreamoperator>> (double n)
virtual ReadableStreamoperator>> (UInt64 n)
UInt32 read (UInt32 n)
UInt32 read (double n)
UInt32 read (UInt64 n)
virtual UInt32 read (void *data, UInt32 size)=0
virtual UInt32 read (Buffer &data, UInt32 size)
virtual ReadableStreamread (Buffer &b)
 Reads all data starting from the current position to the end of the file and returns it in a Buffer object.
virtual ReadableStreamreadAll (Buffer &b)
 Loads the full contents and returns it in a Buffer.
virtual void flush ()
virtual void setTimeout (int millisecs)
virtual void open (const String &path)=0
virtual void close ()=0
virtual bool opened ()=0
virtual FileSizeT size ()=0
virtual FileOffsetT tell ()=0
virtual void seek (FileOffsetT _pos)=0
virtual void seekEnd ()=0
virtual void seekBegin ()=0
virtual void seekStep (FileOffsetT _step)=0
virtual bool eof ()=0
virtual const char * getClassName ()
 Returns the name of the current class.
virtual std::string toString ()

Static Public Member Functions

static void debugmsg (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__)
 Will print a debug message to the screen.
static void debugmsgln (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__)

Protected Attributes

bool handles_timeouts
int timeout_msecs
std::string __cls_name

Friends

std::ostream & operator<< (std::ostream &stream, const Object &s)

Constructor & Destructor Documentation

xvr2::ReadableStream::ReadableStream (  )  [inline]

Definition at line 61 of file StreamInterface.h.

References handles_timeouts, and timeout_msecs.


Member Function Documentation

virtual ReadableStream& xvr2::ReadableStream::operator>> ( UInt32  n  )  [virtual]

virtual ReadableStream& xvr2::ReadableStream::operator>> ( double  n  )  [virtual]

virtual ReadableStream& xvr2::ReadableStream::operator>> ( UInt64  n  )  [virtual]

UInt32 xvr2::ReadableStream::read ( UInt32  n  ) 

UInt32 xvr2::ReadableStream::read ( double  n  ) 

UInt32 xvr2::ReadableStream::read ( UInt64  n  ) 

virtual UInt32 xvr2::ReadableStream::read ( void *  data,
UInt32  size 
) [pure virtual]

virtual UInt32 xvr2::ReadableStream::read ( Buffer data,
UInt32  size 
) [virtual]

Reimplemented in xvr2::StdioInputFile.

virtual ReadableStream& xvr2::ReadableStream::read ( Buffer b  )  [virtual]

Reads all data starting from the current position to the end of the file and returns it in a Buffer object.

Reimplemented in xvr2::StdioInputFile.

virtual ReadableStream& xvr2::ReadableStream::readAll ( Buffer b  )  [virtual]

Loads the full contents and returns it in a Buffer.

Reimplemented in xvr2::StdioInputFile.

virtual void xvr2::ReadableStream::flush (  )  [virtual]

Implements xvr2::StreamInterface.

Reimplemented in xvr2::StdioInputFile.

virtual void xvr2::ReadableStream::setTimeout ( int  millisecs  )  [inline, virtual]

Definition at line 79 of file StreamInterface.h.

References timeout_msecs.

virtual void xvr2::StreamInterface::open ( const String path  )  [pure virtual, inherited]

virtual void xvr2::StreamInterface::close (  )  [pure virtual, inherited]

virtual bool xvr2::StreamInterface::opened (  )  [pure virtual, inherited]

virtual FileSizeT xvr2::StreamInterface::size (  )  [pure virtual, inherited]

virtual FileOffsetT xvr2::StreamInterface::tell (  )  [pure virtual, inherited]

virtual void xvr2::StreamInterface::seek ( FileOffsetT  _pos  )  [pure virtual, inherited]

virtual void xvr2::StreamInterface::seekEnd (  )  [pure virtual, inherited]

virtual void xvr2::StreamInterface::seekBegin (  )  [pure virtual, inherited]

virtual void xvr2::StreamInterface::seekStep ( FileOffsetT  _step  )  [pure virtual, inherited]

virtual bool xvr2::StreamInterface::eof (  )  [pure virtual, inherited]

virtual const char* xvr2::Object::getClassName (  )  [virtual, inherited]

Returns the name of the current class.

static void xvr2::Object::debugmsg ( Object obj,
const char *  msg,
int  linenumber = __LINE__,
const char *  srcfile = __FILE__ 
) [static, inherited]

Will print a debug message to the screen.

static void xvr2::Object::debugmsgln ( Object obj,
const char *  msg,
int  linenumber = __LINE__,
const char *  srcfile = __FILE__ 
) [static, inherited]

virtual std::string xvr2::Object::toString (  )  [virtual, inherited]


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const Object s 
) [friend, inherited]


Member Data Documentation

Definition at line 58 of file StreamInterface.h.

Referenced by ReadableStream().

Definition at line 59 of file StreamInterface.h.

Referenced by ReadableStream(), and setTimeout().

std::string xvr2::Object::__cls_name [protected, inherited]

Definition at line 30 of file Object.h.


The documentation for this class was generated from the following file:

Generated on Fri Jun 20 22:55:57 2008 for X-VR2 SDK by  doxygen 1.5.5