Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Phx::BitVector::InputFile Class Reference

Represents a file from which BitVector's can be read. More...

#include <PhxBitVector.h>

List of all members.

Public Member Functions

 InputFile (const String &fileName)
 Attempts to create a new InputFile from the file with specified name.
virtual ~InputFile ()
 Destroys the file object, automatically closing the file.
BitVector newBitVector (void)
 Create a new BitVector using the next sequence of bytes in the file.
uint32_t bitVectorCount (void) const
 Returns the number of BitVectors read from the file thus far.
uint32_t bitVectorCountMax (void) const
 The maximum number of BitVectors that can be read from the file.


Detailed Description

Represents a file from which BitVector's can be read.


Constructor & Destructor Documentation

Phx::BitVector::InputFile::InputFile const String &  fileName  ) 
 

Attempts to create a new InputFile from the file with specified name.

Parameters:
fileName The name of the file to open for reading.
Exceptions:
IOException thrown if the file could not be read or is otherwise invalid.


Member Function Documentation

uint32_t Phx::BitVector::InputFile::bitVectorCount void   )  const [inline]
 

Returns the number of BitVectors read from the file thus far.

Returns:
The number of BitVectors that have been retrieved from the file; i.e., the number of times newBitVector() has been called.

uint32_t Phx::BitVector::InputFile::bitVectorCountMax void   )  const [inline]
 

The maximum number of BitVectors that can be read from the file.

Returns:
The largest value that the bitVectorCount() attribute may attain.

BitVector Phx::BitVector::InputFile::newBitVector void   ) 
 

Create a new BitVector using the next sequence of bytes in the file.

Attempting to read when bitVectorCount() == bitVectorCountMax() (i.e., when all BitVectors in the file have been read), will result in an empty BitVector being returned.

Returns:
A BitVector containing the next packet of data stored in the file.
Exceptions:
IOException thrown if an IO error occurs while reading.


The documentation for this class was generated from the following file:
Generated on Wed Dec 21 22:05:39 2005 for Phoenix OSFS by  doxygen 1.4.2