GlfFileReader Class Reference
Inheritance diagram for GlfFileReader:
[legend]
Collaboration diagram for GlfFileReader:
[legend]

## Public Member Functions

| GlfFileReader ()
| Default Constructor. More...
| GlfFileReader (const char *filename)
| Constructor that opens the specified file for read. More...
Public Member Functions inherited from GlfFile
| GlfFile ()
| Default Constructor. More...
| GlfFile (const char *filename, OpenType mode=READ)
| Constructor that opens the specified file based on the specified mode (READ/WRITE). More...
virtual | ~GlfFile ()
| Closes the file if there is one open, adding an end marker record if there is a previous section and one has not already been written. More...
bool | openForRead (const char *filename)
| Open a glf file for reading with the specified filename. More...
bool | openForRead (const char *filename, GlfHeader &header)
| Open a glf file for reading with the specified filename and read the header into the specified header. More...
bool | openForWrite (const char *filename, bool compressed=true)
| Open a glf file for writing with the specified filename. More...
void | close ()
| Close the file if there is one open, adding an end marker record if there is a previous section and one has not already been written. More...
bool | isEOF ()
| Returns whether or not the end of the file has been reached. More...
bool | readHeader (GlfHeader &header)
| Reads the header section from the file and stores it in the passed in header. More...
bool | writeHeader (GlfHeader &header)
| Writes the specified header into the file. More...
bool | getNextRefSection (GlfRefSection &refSection)
| Gets the next reference section from the file & stores it in the passed in section, consuming records until a new section is found. More...
bool | writeRefSection (const GlfRefSection &refSection)
| Write the reference section to the file, adding an end marker record if there is a previous section and one has not already been written. More...
bool | getNextRecord (GlfRecord &record)
| Gets the nextrecord from the file & stores it in the passed in record. More...
bool | writeRecord (const GlfRecord &record)
| Writes the specified record into the file. More...
uint32_t | getCurrentRecordCount ()
| Return the number of records that have been read/written so far. More...
GlfStatus::Status | getFailure ()
| Get the Status of the last call that sets status. More...
GlfStatus::Status | getStatus ()
| Get the Status of the last call that sets status. More...
const char * | getStatusMessage ()
| Get the Status of the last call that sets status. More...

## Additional Inherited Members

Public Types inherited from GlfFile
enum | OpenType { READ , WRITE }
| Enum for indicating whether to open the file for read or write. More...

## Detailed Description

Definition at line 173 of file GlfFile.h.

## Constructor & Destructor Documentation

## GlfFileReader() [1/2]

GlfFileReader::GlfFileReader | ( |  | ) |

Default Constructor.

Definition at line 522 of file GlfFile.cpp.

{
}

## GlfFileReader() [2/2]

GlfFileReader::GlfFileReader | ( | const char * | filename | ) |

Constructor that opens the specified file for read.

Parameters

  filename | file to open for reading.

Definition at line 528 of file GlfFile.cpp.

{
if(!openForRead(filename))
{
// Failed to open for reading - print error and abort.
fprintf(stderr, "%s\n", getStatusMessage());
std::cerr << "FAILURE - EXITING!!!" << std::endl;
exit(-1);
}
}
GlfFile::getStatusMessage
const char * getStatusMessage()
Get the Status of the last call that sets status.
Definition: GlfFile.h:135
GlfFile::openForRead
bool openForRead(const char *filename)
Open a glf file for reading with the specified filename.
Definition: GlfFile.cpp:66

References GlfFile::getStatusMessage(), and GlfFile::openForRead().

## ~GlfFileReader()

GlfFileReader::~GlfFileReader | ( |  | ) |

virtual

Definition at line 540 of file GlfFile.cpp.

{
}

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

- glf/GlfFile.h
- glf/GlfFile.cpp