RawStream Struct Reference
[I/O Services.]

Inherits Service.

Inherited by DiskStream, IOFilter, and MemoryStream.

List of all members.

Public Methods

virtual bool eof ()=0
virtual unsigned read (void *buffer, unsigned num)=0
virtual unsigned write (void *buffer, unsigned num)=0
virtual bool flush ()=0
virtual bool seek (int offset, int origin)=0
virtual unsigned tell ()=0


Detailed Description

A "raw stream" provides a generic interface to a particular type of I/O. For example, reading a file from a disk file is one kind of I/O, while reading a file contained in a .zip archive is another. The raw stream provides the ability to translate between the stored data format and raw bytes, and is used by the InputStream service to get data in and out.


Member Function Documentation

virtual bool RawStream::eof   [pure virtual]
 

Returns true when at the end of the stream.

virtual bool RawStream::flush   [pure virtual]
 

Flush any buffered output to the stream.

virtual unsigned RawStream::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 bool RawStream::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 unsigned RawStream::tell   [pure virtual]
 

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

virtual unsigned RawStream::write void *    buffer,
unsigned    num
[pure virtual]
 

Write raw bytes into a stream.

Parameters:
buffer  A buffer holding the bytes to be written.
num  The number of bytes to be written.
Returns:
The number of bytes actually written. Will be zero if the stream does not support writing.


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