FrameF Class Reference
[Frame utilities]

#include <FrameF.hh>

List of all members.

Public Types

typedef long long int8_t
typedef int int4_t
typedef short int2_t

Public Member Functions

 FrameF (std::istream &in)
 ~FrameF (void)
bool isOK (void) const
short getID (void) const
short getInstance (void) const
int getLength (void) const
int getPatch (void) const
int getStrucHdrLen (void) const
int getVersion (void) const
void ReadHeader (void) throw (BadFile)
 Read the frame header record.
bool NxStruct (void) throw (BadFile)
 Skip to the next structure.
char getChar (void) throw (BadFile)
 Get a double.
short getShort (void) throw (BadFile)
 Get a double.
float getFloat (void) throw (BadFile)
 Get a double.
int getInt (void) throw (BadFile)
 Get a double.
void getLink (StrLink &link) throw (BadFile)
 Get a double.
long getLong (void) throw (BadFile)
 Get a double.
std::string getString (void) throw (BadFile)
 Get a double.
double getDouble (void) throw (BadFile)
 Get a double.
void resetHeader (void)
 Reset the header valid flag.
void Seek (int off, std::ios::seekdir mode)
 Seek file position.
void Skip (int off)
 skip data.

Classes

struct  StrHdr
struct  StrLink


Detailed Description

Class FrameF is a fast frame file reader. It understands the structure headers in a frame file and keeps track of the current structure and where it ends. brief Fast frame file reader.
Author:
John Zweizig
Version:
1.2; Modified July 27, 2000

Member Typedef Documentation

typedef long long FrameF::int8_t

8-byte integer data type.

typedef int FrameF::int4_t

4-byte integer data type.

typedef short FrameF::int2_t

2-byte integer data type.


Constructor & Destructor Documentation

FrameF::FrameF ( std::istream &  in  ) 

Construct a Frame file reader and attach it to an existing stream. The stream is specified. brief File constructor.

FrameF::~FrameF ( void   ) 

Destructor.


Member Function Documentation

bool FrameF::isOK ( void   )  const [inline]

Test whether the input data stream is ready for reading. brief Test input stream.

Returns:
true if input data stream is ready to read from.

short FrameF::getID ( void   )  const [inline]

Get the current structure ID. brief Get the current structure ID.

Returns:
the current structure ID.

short FrameF::getInstance ( void   )  const [inline]

Get the current structure instance number. brief Get the current structure instance number.

Returns:
the current structure instance number.

int FrameF::getLength ( void   )  const [inline]

Get the current structure length. The length returned includes the structure header length. brief Get the current structure length.

Returns:
Current structure length.

int FrameF::getPatch ( void   )  const [inline]

Get the frame patch number. brief Get the frame patch number.

Returns:
the frame patch number.

int FrameF::getStrucHdrLen ( void   )  const [inline]

Get the structure header length for the version of the frame standard to which this file conforms. brief Get the frame version.

Returns:
the frame version.

int FrameF::getVersion ( void   )  const [inline]

Get the version of the frame standard to which this file conforms. brief Get the frame version.

Returns:
the frame version.

void FrameF::ReadHeader ( void   )  throw (BadFile)

Read the frame header record.

Read the frame header record.

bool FrameF::NxStruct ( void   )  throw (BadFile)

Skip to the next structure.

Advance the file position to the start of the next structure.

char FrameF::getChar ( void   )  throw (BadFile)

Get a double.

Read a single character data item.

Returns:
Double data word.

short FrameF::getShort ( void   )  throw (BadFile)

Get a double.

Read a short integer data item. The byte ordering is swapped to allow use by the host.

Returns:
Double data word.

float FrameF::getFloat ( void   )  throw (BadFile)

Get a double.

Read a float data item. The byte ordering is swapped to allow use by the host.

Returns:
Double data word.

int FrameF::getInt ( void   )  throw (BadFile)

Get a double.

Read an integer data item. The byte ordering is swapped to allow use by the host.

Returns:
Double data word.

void FrameF::getLink ( StrLink link  )  throw (BadFile)

Get a double.

Read a structure link data item.

Returns:
Double data word.

long FrameF::getLong ( void   )  throw (BadFile)

Get a double.

Read a long integer data item. The byte ordering is swapped to allow use by the host.

Returns:
Double data word.

std::string FrameF::getString ( void   )  throw (BadFile)

Get a double.

Read a string data item. The string is stored in the frame as a byte-count followed by the data.

Returns:
Double data word.

double FrameF::getDouble ( void   )  throw (BadFile)

Get a double.

Read a double precision float data item. The byte ordering is swapped to allow use by the host.

Returns:
Double data word.

void FrameF::resetHeader ( void   )  [inline]

Reset the header valid flag.

Set the header OK flag to flase. This will force reading in the header before the next I?O operation.

void FrameF::Seek ( int  off,
std::ios::seekdir  mode 
)

Seek file position.

Seek to the specified file position.

Parameters:
off Offset in bytes.
mode starting position.

void FrameF::Skip ( int  off  ) 

skip data.

Skip a specified number of bytes in the frame file.

Parameters:
off Number of bytes to skip.


The documentation for this class was generated from the following file:
Generated on Sun Mar 8 19:21:08 2009 for dmt by  doxygen 1.5.4