![]() |
VR-Forces Developer's Guide
|
File responsible for parsing and traversing a metaflight xml file.
Public Member Functions | |
| DtMetaFlightParser () | |
| bool | openFile (const std::string &fileName, const std::string &virtualTextureFilename, std::string &parseError) |
| const std::string & | fileName () const |
| const std::string & | virtualTextureFileName () const |
| const char * | currentElementType () const |
| const char * | currentElementName () const |
| const char * | currentElementReference () const |
| std::string | currentElementNameOrGenerateUnique () |
| const char * | currentElementText () const |
| bool | getCurrentElementValue (std::string &value) const |
| bool | getCurrentElementValue (int &value) const |
| bool | getCurrentElementValue (unsigned int &value) const |
| bool | getCurrentElementValue (double &value) const |
| unsigned int | numberOfChildElements () const |
| bool | readFirstChildElement () |
| bool | readNextElement () |
| bool | readPreviousElement () |
| bool | readParentElement () |
Static Public Member Functions | |
| static bool | publish (const std::string &fileName, const std::string &virtualTextureFilename, const std::string &outputFileName, bool encryptingData, bool removeVT, std::string &parseError, bool extendGridLevelZero, float extendGridLevelZeroTo) |
Static Protected Member Functions | |
| static xmlDocPtr | createDocument (const std::string &file, std::string &parseError) |
| static int | countChildrenWithName (xmlNodePtr node, const std::string &nodeName) |
| static xmlNodePtr | findChildWithName (const xmlNodePtr node, const std::string &nodeName, const int occurance=0) |
| static void | replaceAll (std::string &result, const std::string &replaceWhat, const std::string &replaceWithWhat) |
| static xmlNodePtr | findDatabaseNode (xmlDocPtr xmlDocument, std::string &parseError) |
| static xmlNodePtr | findChildWithAttribute (xmlNodePtr node, const std::string &nodeName, const std::string &attrName, const std::string &attrValue) |
| static const char * | attribute (xmlNodePtr node, const std::string &attrName) |
| static const char * | text (xmlNodePtr node) |
| static bool | setText (xmlNodePtr node, const std::string &text) |
Protected Attributes | |
| std::string | myFileName |
| std::string | myVirtualTextureFileName |
| xmlDocPtr | myDocument |
| xmlNodePtr | myCurrentNode |
| unsigned int | myUniqueId |
| makVrv::DtMetaFlightParser::DtMetaFlightParser | ( | ) |
CTOR.
| bool makVrv::DtMetaFlightParser::openFile | ( | const std::string & | fileName, |
| const std::string & | virtualTextureFilename, | ||
| std::string & | parseError | ||
| ) |
Open a file.
| const std::string& makVrv::DtMetaFlightParser::fileName | ( | ) | const |
Get the fileName of the master mft file.
| const std::string& makVrv::DtMetaFlightParser::virtualTextureFileName | ( | ) | const |
Get the fileName of the virtual texture mft file. If no vtfile name was specified this will return the same value as fileName.
|
static |
Utility function for writing out a MetaFlight XML file which VRV can load. This function only writes out a single XML file.
| const char* makVrv::DtMetaFlightParser::currentElementType | ( | ) | const |
Intentionally using char *, to minimize data copying.
| const char* makVrv::DtMetaFlightParser::currentElementName | ( | ) | const |
Get the current element name.
| const char* makVrv::DtMetaFlightParser::currentElementReference | ( | ) | const |
Get the current element refTo value.
| std::string makVrv::DtMetaFlightParser::currentElementNameOrGenerateUnique | ( | ) |
Get the current element name, if the element does not have a name generate a unique name.
| const char* makVrv::DtMetaFlightParser::currentElementText | ( | ) | const |
Get the current element text.
| bool makVrv::DtMetaFlightParser::getCurrentElementValue | ( | std::string & | value | ) | const |
Get the current element value as an string.
Get the current element value as an integer.
Get the current element value as an integer.
Get the current element value as an integer.
Get the number of child elements.
| bool makVrv::DtMetaFlightParser::readFirstChildElement | ( | ) |
Move the internal point to the first child. false if there are no children of the current element.
| bool makVrv::DtMetaFlightParser::readNextElement | ( | ) |
Move the internal pointer to the next element (aka it's sibling).
| bool makVrv::DtMetaFlightParser::readPreviousElement | ( | ) |
Move the internal pointer to the next element (aka it's sibling).
| bool makVrv::DtMetaFlightParser::readParentElement | ( | ) |
Move the pointer back to the parent element.
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |