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

rnaml::FileInputStream Class Reference

#include <FileInputStream.h>

Inheritance diagram for rnaml::FileInputStream:

rnaml::InputStream List of all members.

Public Methods

 FileInputStream (FILE *f)
 Initializes the object.

 FileInputStream (const char *name)
 Initializes the object.

 FileInputStream (int fd)
 Initializes the object.

virtual ~FileInputStream ()
 Destroys the object.

virtual xmlcpgInputStreamgetCStructure () const
 Gets the C substructure.

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

int getFD () const
 Gets the file input stream file descriptor.

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

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

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

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

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

virtual bool close ()
 Closes the file input stream.


Private Attributes

xmlcpgFileInputStreamis
 The C input stream structure.


Detailed Description

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


Constructor & Destructor Documentation

rnaml::FileInputStream::FileInputStream FILE *    f
 

Initializes the object.

Parameters:
f  the FILE stream.

rnaml::FileInputStream::FileInputStream const char *    name
 

Initializes the object.

Parameters:
name  the file name.

rnaml::FileInputStream::FileInputStream int    fd
 

Initializes the object.

Parameters:
fd  the file descriptor.

rnaml::FileInputStream::~FileInputStream   [virtual]
 

Destroys the object.


Member Function Documentation

bool rnaml::FileInputStream::close   [virtual]
 

Closes the file input stream.

Returns:
false upon successful completion.

Implements rnaml::InputStream.

virtual xmlcpgInputStream* rnaml::FileInputStream::getCStructure   const [inline, virtual]
 

Gets the C substructure.

Returns:
the C substructure.

Implements rnaml::InputStream.

bool rnaml::FileInputStream::getEOS   [virtual]
 

Tests the end of stream indicator of the file input stream.

Returns:
true if it is set.

Implements rnaml::InputStream.

bool rnaml::FileInputStream::getError   [virtual]
 

Tests the error indicator of the file input stream.

Returns:
true if an error occured.

Implements rnaml::InputStream.

const char * rnaml::FileInputStream::getErrorString   [virtual]
 

Gets the string describing the error.

Returns:
the error string.

Implements rnaml::InputStream.

int rnaml::FileInputStream::getFD  
 

Gets the file input stream file descriptor.

Returns:
the file descriptor.

int rnaml::FileInputStream::read void *    ptr,
int    nbytes
[virtual]
 

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

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

Implements rnaml::InputStream.

int rnaml::FileInputStream::read   [virtual]
 

Reads a character from the file input stream.

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

Implements rnaml::InputStream.

void rnaml::FileInputStream::setCStructure xmlcpgInputStream   is [virtual]
 

Sets the C substructure.

Parameters:
is  the xmlcpgInputStream.

Implements rnaml::InputStream.


Member Data Documentation

xmlcpgFileInputStream* rnaml::FileInputStream::is [private]
 

The C input stream structure.


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