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

Phx::BitVector::InputStream Class Reference

A wrapper to BitVector that provides stream-style input (reading) semantics. More...

#include <PhxBitVector.h>

List of all members.

Public Member Functions

 InputStream (const BitVector *bitVector)
 Construct the InputStream on top of the given bit vector.
const BitVectorbitVector (void) const
 Returns a reference to the bit vector that this stream was constructed on top of.
Bits readIndex (void) const
 Gets the position in the bit vector from which the next field will be read.
void readIndex (Bits readIndex)
 Sets the position in the bit vector to which the next field will be read.
bool endOfStream (void)
 Returns whether the current readIndex is at or beyond the end of the stream.
InputStreamoperator>> (String &s)
InputStreamoperator>> (double &s)
InputStreamoperator>> (float &s)
InputStreamoperator>> (uint64_t &s)
InputStreamoperator>> (uint32_t &s)
InputStreamoperator>> (uint16_t &s)
InputStreamoperator>> (uint8_t &s)
InputStreamoperator>> (int64_t &s)
InputStreamoperator>> (int32_t &s)
InputStreamoperator>> (int16_t &s)
InputStreamoperator>> (int8_t &s)
InputStreamoperator>> (bool &s)


Detailed Description

A wrapper to BitVector that provides stream-style input (reading) semantics.

Note that this stream is only valid for as long as the pointer to the bit vector supplied to its constructor is valid. The responsibility for the memory pointed to is the client's.


Constructor & Destructor Documentation

Phx::BitVector::InputStream::InputStream const BitVector bitVector  )  [inline]
 

Construct the InputStream on top of the given bit vector.

Parameters:
bitVector The BitVector to read data from.
Exceptions:
RangeException thrown if bitVector is 0.


Member Function Documentation

bool Phx::BitVector::InputStream::endOfStream void   )  [inline]
 

Returns whether the current readIndex is at or beyond the end of the stream.

Returns:
True if the current read index is greater or equal to the number of valid bits in the bit vector.

void Phx::BitVector::InputStream::readIndex Bits  readIndex  )  [inline]
 

Sets the position in the bit vector to which the next field will be read.

Parameters:
readIndex The new read index. Note that setting a read index which is beyond the end of the bit vector is legal -- all 'reads' will read 0's. Be sure to check endOfStream().


The documentation for this class was generated from the following file:
Generated on Mon Jul 10 19:45:30 2006 for Phoenix OSFS by  doxygen 1.4.2