18 #ifndef __GLF_FILE_H__ 19 #define __GLF_FILE_H__ 22 #include "GlfHeader.h" 23 #include "GlfRefSection.h" 24 #include "GlfRecord.h" 25 #include "GlfStatus.h" 67 bool openForWrite(
const char * filename,
bool compressed =
true);
148 bool myIsOpenForRead;
150 bool myIsOpenForWrite;
158 enum EXPECTED_SECTION
166 uint32_t myRecordCount;
GlfStatus::Status getStatus()
Get the Status of the last call that sets status.
bool isEOF()
Returns whether or not the end of the file has been reached.
const char * getStatusMessage()
Get the Status of the last call that sets status.
bool openForWrite(const char *filename, bool compressed=true)
Open a glf file for writing with the specified filename.
const char * getStatusMessage() const
Return the status message.
uint32_t getCurrentRecordCount()
Return the number of records that have been read/written so far.
This class allows a user to easily get/set the fields in a GLF section/chromosome header...
void close()
Close the file if there is one open, adding an end marker record if there is a previous section and o...
Status getStatus() const
Return the enum for this status.
bool getNextRecord(GlfRecord &record)
Gets the nextrecord from the file & stores it in the passed in record.
bool openForRead(const char *filename)
Open a glf file for reading with the specified filename.
This class allows a user to easily get/set the fields in a GLF record.
bool writeRefSection(const GlfRefSection &refSection)
Write the reference section to the file, adding an end marker record if there is a previous section a...
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.
This class allows a user to easily read/write a GLF file.
OpenType
Enum for indicating whether to open the file for read or write.
virtual ~GlfFile()
Closes the file if there is one open, adding an end marker record if there is a previous section and ...
bool readHeader(GlfHeader &header)
Reads the header section from the file and stores it in the passed in header.
Status
Return value enum for the GlfFile class methods.
GlfFile()
Default Constructor.
GlfStatus::Status getFailure()
Get the Status of the last call that sets status.
bool writeHeader(GlfHeader &header)
Writes the specified header into the file.
This class is used to track the status results of some methods in the GLF classes using the status en...
bool writeRecord(const GlfRecord &record)
Writes the specified record into the file.