Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

rnaml::InputStream Class Reference

The general input stream class. More...

#include <InputStream.h>

Inheritance diagram for rnaml::InputStream:

rnaml::FileInputStream rnaml::GZIPInputStream List of all members.

Public Methods

virtual ~InputStream ()
 Destroys the object.

virtual xmlcpgInputStreamgetCStructure () const=0
 Gets the C substructure.

virtual void setCStructure (xmlcpgInputStream *is)=0
 Sets the C substructure.

virtual bool getEOS () const=0
 Tests the end of stream indicator of the input stream.

virtual bool getError () const=0
 Tests the error indicator of the input stream.

virtual const char * getErrorString () const=0
 Gets the string describing the error.

virtual int read ()=0
 Reads a character from the input stream.

virtual int read (void *ptr, int size)=0
 Reads some bytes of data into the location pointed by ptr.

virtual bool close ()=0
 Closes the input stream.


Detailed Description

The general input stream class.

Author:
Martin Larose (larosem@iro.umontreal.ca)
Version:
Id:
InputStream.h,v 1.1 2003/11/05 18:04:53 larosem Exp


Constructor & Destructor Documentation

rnaml::InputStream::~InputStream   [virtual]
 

Destroys the object.


Member Function Documentation

virtual bool rnaml::InputStream::close   [pure virtual]
 

Closes the input stream.

Returns:
false upon successful completion, true otherwise.

Implemented in rnaml::FileInputStream, and rnaml::GZIPInputStream.

virtual xmlcpgInputStream* rnaml::InputStream::getCStructure   [pure virtual]
 

Gets the C substructure.

Returns:
the C substructure.

Implemented in rnaml::FileInputStream, and rnaml::GZIPInputStream.

virtual bool rnaml::InputStream::getEOS   [pure virtual]
 

Tests the end of stream indicator of the input stream.

Returns:
true if it is set;

Implemented in rnaml::FileInputStream, and rnaml::GZIPInputStream.

virtual bool rnaml::InputStream::getError   [pure virtual]
 

Tests the error indicator of the input stream.

Returns:
true if an error occured.

Implemented in rnaml::FileInputStream, and rnaml::GZIPInputStream.

virtual const char* rnaml::InputStream::getErrorString   [pure virtual]
 

Gets the string describing the error.

Returns:
the error string.

Implemented in rnaml::FileInputStream, and rnaml::GZIPInputStream.

virtual int rnaml::InputStream::read void *    ptr,
int    size
[pure virtual]
 

Reads some bytes of data into the location pointed by ptr.

Parameters:
ptr  the location where to store the input.
size  the number of bytes to read.
Returns:
the number of bytes read or 0 on end of stream or -1 on error.

Implemented in rnaml::FileInputStream, and rnaml::GZIPInputStream.

virtual int rnaml::InputStream::read   [pure virtual]
 

Reads a character from the input stream.

Returns:
the character cast to an int or -1 on end of stream or error.

Implemented in rnaml::FileInputStream, and rnaml::GZIPInputStream.

virtual void rnaml::InputStream::setCStructure xmlcpgInputStream   is [pure virtual]
 

Sets the C substructure.

Parameters:
is  the xmlcpgInputStream.

Implemented in rnaml::FileInputStream, and rnaml::GZIPInputStream.


The documentation for this class was generated from the following files:
Generated on Tue Nov 11 14:59:56 2003 for xmlcpg by doxygen1.2.18