![]() |
VR-Forces 4.0.4 Class Documentation
|
This class is the table that holds a file from the VPF database. More...
Public Member Functions | |
| DtVpfTable (const DtFilename &path) | |
| Constructor takes an absolute path to the table. | |
| virtual | ~DtVpfTable () |
| destructor | |
| virtual std::istream & | file () |
| a file stream of the file used for reading the table in | |
| virtual const DtFilename & | fileName () const |
| the name of the table's file | |
| virtual const DtFilename & | filePath () |
| the path to the table's file | |
| virtual bool | mustSwap () const |
| determines if the byte order of the machine and the file match | |
| virtual const DtVpfColumn * | column (const DtString &columnName) const |
| returns a column with a given name will throw an exception if there is not a column of the given name | |
| virtual const DtColumnList * | columns () const |
| return a pointer to the list of columns | |
| virtual unsigned int | numColumns () const |
| returns the number of columns that this table has loaded | |
| virtual const DtVpfRow * | row (int unsigned rowNumber) const |
| returns a row with the given index with thrown an exception if the row does not exist | |
| virtual const DtVpfRow * | rowById (int unsigned id) const |
| returns a row with the given ID (since all rows have IDs) with thrown an exception if the row does not exist | |
| virtual const DtRowList * | rows () const |
| returns a pointer to the list of rows | |
| virtual unsigned int | numRows () const |
| returns the number of rows that this table has loaded | |
| virtual const DtVpfTable * | intDescriptionTable () const |
| returns the table that contains the integer data descriptions | |
| virtual const DtVpfTable * | charDescriptionTable () const |
| returns the table that contains the character data descriptions | |
Protected Member Functions | |
| virtual bool | readTable () |
| loads the entire table from disk | |
| virtual bool | readHeader () |
| loads the table header from disk | |
| virtual bool | readData () |
| loads the table data from disk | |
| virtual void | calculateByteOrder () |
| determine the byte order of this machine | |
| virtual bool | loadValueDescriptionTable (const DtString &tableName) |
| loads the value description table from disk | |
Protected Attributes | |
| int | myHeaderLength |
| DtByteOrderEnum | myFileByteOrder |
| DtByteOrderEnum | myMachineByteOrder |
| DtString | myTableDescription |
| DtString | myNarrativeTableFileName |
| DtFilename | myFileName |
| DtFilename | myFilePath |
| std::ifstream | myFile |
| std::ifstream::pos_type | myFileSize |
| DtColumnList | myColumns |
| DtRowList | myRows |
| DtVpfTable * | myIntDescriptions |
| DtVpfTable * | myCharDescriptions |
Private Types | |
| enum | DtByteOrderEnum { LSB, MSB } |
| Enumeration for Least Significant Byte or Most Significant byte order. More... | |
Private Member Functions | |
| DtVpfTable (const DtVpfTable &table) | |
| Copy constructor is private to prevent copying. | |
| DtVpfTable & | operator= (const DtVpfTable &table) |
| Assignment operator is private to prevent copying. | |
This class is the table that holds a file from the VPF database.
enum DtVpfTable::DtByteOrderEnum [private] |
| DtVpfTable::DtVpfTable | ( | const DtVpfTable & | table | ) | [private] |
Copy constructor is private to prevent copying.
| DtVpfTable::DtVpfTable | ( | const DtFilename & | path | ) |
Constructor takes an absolute path to the table.
| DtInvalid | Input if path is incorrect |
| virtual DtVpfTable::~DtVpfTable | ( | ) | [virtual] |
destructor
| DtVpfTable& DtVpfTable::operator= | ( | const DtVpfTable & | table | ) | [private] |
Assignment operator is private to prevent copying.
| virtual std::istream& DtVpfTable::file | ( | ) | [virtual] |
a file stream of the file used for reading the table in
| virtual const DtFilename& DtVpfTable::fileName | ( | ) | const [virtual] |
the name of the table's file
| virtual const DtFilename& DtVpfTable::filePath | ( | ) | [virtual] |
the path to the table's file
| virtual bool DtVpfTable::mustSwap | ( | ) | const [virtual] |
determines if the byte order of the machine and the file match
| virtual const DtVpfColumn* DtVpfTable::column | ( | const DtString & | columnName | ) | const [virtual] |
returns a column with a given name will throw an exception if there is not a column of the given name
| DtInvalidInput | if the column name does not exist |
| virtual const DtColumnList* DtVpfTable::columns | ( | ) | const [virtual] |
return a pointer to the list of columns
| virtual unsigned int DtVpfTable::numColumns | ( | ) | const [virtual] |
returns the number of columns that this table has loaded
| virtual const DtVpfRow* DtVpfTable::row | ( | int unsigned | rowNumber | ) | const [virtual] |
returns a row with the given index with thrown an exception if the row does not exist
| DtInvalidInput | if the row index is out of range |
| virtual const DtVpfRow* DtVpfTable::rowById | ( | int unsigned | id | ) | const [virtual] |
returns a row with the given ID (since all rows have IDs) with thrown an exception if the row does not exist
| DtInvalidInput | if the row index is out of range |
| virtual const DtRowList* DtVpfTable::rows | ( | ) | const [virtual] |
returns a pointer to the list of rows
| virtual unsigned int DtVpfTable::numRows | ( | ) | const [virtual] |
returns the number of rows that this table has loaded
| virtual const DtVpfTable* DtVpfTable::intDescriptionTable | ( | ) | const [virtual] |
returns the table that contains the integer data descriptions
| virtual const DtVpfTable* DtVpfTable::charDescriptionTable | ( | ) | const [virtual] |
returns the table that contains the character data descriptions
| virtual bool DtVpfTable::readTable | ( | ) | [protected, virtual] |
loads the entire table from disk
| virtual bool DtVpfTable::readHeader | ( | ) | [protected, virtual] |
loads the table header from disk
| virtual bool DtVpfTable::readData | ( | ) | [protected, virtual] |
loads the table data from disk
| virtual void DtVpfTable::calculateByteOrder | ( | ) | [protected, virtual] |
determine the byte order of this machine
| virtual bool DtVpfTable::loadValueDescriptionTable | ( | const DtString & | tableName | ) | [protected, virtual] |
loads the value description table from disk
int DtVpfTable::myHeaderLength [protected] |
DtByteOrderEnum DtVpfTable::myFileByteOrder [protected] |
DtByteOrderEnum DtVpfTable::myMachineByteOrder [protected] |
DtString DtVpfTable::myTableDescription [protected] |
DtString DtVpfTable::myNarrativeTableFileName [protected] |
DtFilename DtVpfTable::myFileName [protected] |
DtFilename DtVpfTable::myFilePath [protected] |
std::ifstream DtVpfTable::myFile [protected] |
std::ifstream::pos_type DtVpfTable::myFileSize [protected] |
DtColumnList DtVpfTable::myColumns [protected] |
DtRowList DtVpfTable::myRows [protected] |
DtVpfTable* DtVpfTable::myIntDescriptions [protected] |
DtVpfTable* DtVpfTable::myCharDescriptions [protected] |