InputStream Struct Reference
[I/O Services.]

Inherits Service.

Inherited by InputStreamImpl.

List of all members.

Public Methods

virtual bool initialize (RawStream *raw, Directory *dir, const Char *name)=0
virtual unsigned read (void *buffer, unsigned num)=0
virtual bool seek (int offset, int origin)=0
virtual unsigned tell ()=0
virtual bool eof ()=0
virtual void setByteOrder (int order)=0
virtual UInt8 readInt8 ()=0
virtual UInt16 readInt16 ()=0
virtual UInt32 readInt32 ()=0
virtual Float readFloat ()=0
virtual std::string readString ()=0
virtual std::string readFixedString (int length)=0
virtual void readIntegers (UInt32 *ints, int num)=0
virtual void readFloats (Float *floats, int num)=0
virtual void readVectors (Vector3 *vectors, int num)=0
virtual InputStream * createMemoryFile (unsigned size)=0
virtual const ChargetSourceName ()=0
virtual DirectorygetDirectory ()=0
virtual void addFilter (IOFilter *filter)=0


Detailed Description

A read-only data stream.


Member Function Documentation

virtual void InputStream::addFilter IOFilter   filter [pure virtual]
 

Apply a filter to the input data. Filters are applied in the reverse order that they are added to the stream.

virtual InputStream* InputStream::createMemoryFile unsigned    size [pure virtual]
 

Create an in-memory image of the file that can be accessed using the same InputStream interface.

Parameters:
size  The number of bytes, starting at the current file position, that should be buffered.

virtual bool InputStream::eof   [pure virtual]
 

Returns true when reading reaches the end of the file.

virtual Directory* InputStream::getDirectory   [pure virtual]
 

Get an interface to the directory containing this data source.

virtual const Char* InputStream::getSourceName   [pure virtual]
 

Get the name of the file (or whatever) associated with this stream.

virtual bool InputStream::initialize RawStream   raw,
Directory   dir,
const Char   name
[pure virtual]
 

Prepare the stream for use. Called by the I/O service as part of the stream setup code.

virtual unsigned InputStream::read void *    buffer,
unsigned    num
[pure virtual]
 

Read raw bytes from the stream.

Parameters:
buffer  A buffer to hold the data as it as read.
num  The number of bytes to read into the buffer.
Returns:
The number of bytes actually read.

virtual std::string InputStream::readFixedString int    length [pure virtual]
 

Read a fixed-length string.

virtual Float InputStream::readFloat   [pure virtual]
 

Read a single-precision floating point number.

virtual void InputStream::readFloats Float   floats,
int    num
[pure virtual]
 

Read an array of single-precision floats.

virtual UInt16 InputStream::readInt16   [pure virtual]
 

Read a 16-bit integer number.

virtual UInt32 InputStream::readInt32   [pure virtual]
 

Read a 32-bit integer number.

virtual UInt8 InputStream::readInt8   [pure virtual]
 

Read an 8-bit integer number.

virtual void InputStream::readIntegers UInt32   ints,
int    num
[pure virtual]
 

Read an array of 32-bit integers.

virtual std::string InputStream::readString   [pure virtual]
 

Read a zero-terminated string.

virtual void InputStream::readVectors Vector3   vectors,
int    num
[pure virtual]
 

Read an array of Vector3.

virtual bool InputStream::seek int    offset,
int    origin
[pure virtual]
 

Move the read/write position.

Parameters:
offset  The desired new offset from origin.
origin  One of the constants FILE_START, FILE_CURRENT, or FILE_END.
Returns:
True if successful, false on error.

virtual void InputStream::setByteOrder int    order [pure virtual]
 

Set the byte ordering for higher level data objects. The default for new streams is STREAM_LSB.

Parameters:
order  STREAM_MSB or STREAM_LSB

virtual unsigned InputStream::tell   [pure virtual]
 

Return the current read/write position, relative to the start of the file.


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


Flat Four Engine
Copyright (C) 2001 by 379, Inc.
This page generated by Doxygen