Open PaperOpt
IO::BinaryFile Class Reference

#include <XMLParser.h>

Inheritance diagram for IO::BinaryFile:
Collaboration diagram for IO::BinaryFile:

List of all members.

Public Member Functions

 BinaryFile (const string &rFilename, int offset, bool isBigEndian)
 ~BinaryFile ()
double readDouble (void)
float readFloat (void)
int readInt (void)
bool eof ()

Detailed Description

Class representing a binary file, data will be read starting at an offset position, the class is also responsible for flipping the bytes of variables if the file uses a different endian than the computer.


Constructor & Destructor Documentation

BinaryFile::BinaryFile ( const string &  rFilename,
int  offset,
bool  isBigEndian 
)

Constructor. Will read from the file at gBinaryDirectory/rFilename.

Parameters:
rFilenamethe name/relative path of the file as read from XML.
offsetspecifies the byte where reading should start.
isBigEndianspecifies whether the file is stored in bigendian or littleendian format. If the machines endian differs from the file's, this class will swap the bytes.
BinaryFile::~BinaryFile ( )

Member Function Documentation

bool BinaryFile::eof ( ) [virtual]

Implements IO::File.

double BinaryFile::readDouble ( void  ) [virtual]

Implements IO::File.

Here is the caller graph for this function:

float BinaryFile::readFloat ( void  ) [virtual]

Implements IO::File.

int BinaryFile::readInt ( void  ) [virtual]

Implements IO::File.


The documentation for this class was generated from the following files: