Kstars
binfilehelper.h
53 * WARNING: This function may not be compatible in other locales, because it calls QString::toAscii
62 * @short Read the header and index table from the file and fill up the QVector s with the entries
123 inline unsigned int getRecordCount(int id) const { return (indexUpdated ? indexCount.at(id) : 0); }
148 * @note To be used to override the guess in case the guess is wrong. This method should be called
208 ERR_INDEX_IDMISMATCH, /*!< Index table has a mismatched ID entry [ID found in the wrong place] */
211 };
This class provides utility functions to handle binary data files in the format prescribed by KStars.
Definition binfilehelper.h:39
static int unsigned_KDE_fseek(FILE *stream, quint32 offset, int whence)
Wrapper around fseek for large offsets.
Definition binfilehelper.cpp:321
struct dataElement getField(const QString &fieldName) const
Get field by name.
Definition binfilehelper.cpp:296
int getFieldCount() const
Returns the number of fields as suggested by the field descriptor in the header.
Definition binfilehelper.h:163
static bool testFileExists(const QString &fileName)
Checks if a file exists.
Definition binfilehelper.cpp:57
FILE * getFileHandle() const
Get the file handle corresponding to the currently open file.
Definition binfilehelper.h:109
long getDataOffset() const
Returns the offset at which the data begins.
Definition binfilehelper.h:175
bool readHeader()
Read the header and index table from the file and fill up the QVector s with the entries.
Definition binfilehelper.cpp:250
bool propertiesUpdated() const
Check whether file properties are real or bogus.
Definition binfilehelper.h:103
unsigned long getRecordCount() const
Returns the total number of records in the file.
Definition binfilehelper.h:129
unsigned int getRecordCount(int id) const
Returns the number of records under the given index ID.
Definition binfilehelper.h:123
long getOffset(int id) const
Returns the offset in the file corresponding to the given index ID.
Definition binfilehelper.h:116
FILE * openFile(const QString &fileName)
WARNING: This function may not be compatible in other locales, because it calls QString::toAscii.
Definition binfilehelper.cpp:72
bool isField(const QString &FieldName) const
Check whether a field exists.
Definition binfilehelper.cpp:311
long getIndexTableOffset() const
Returns the offset at which the index table begins.
Definition binfilehelper.h:181
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:47:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:47:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.