VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Protected Attributes
makVrv::DtMetaFlightParser Class Reference

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 charcurrentElementType () const
 
const charcurrentElementName () const
 
const charcurrentElementReference () const
 
std::string currentElementNameOrGenerateUnique ()
 
const charcurrentElementText () 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 charattribute (xmlNodePtr node, const std::string &attrName)
 
static const chartext (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
 

Constructor & Destructor Documentation

makVrv::DtMetaFlightParser::DtMetaFlightParser ( )

CTOR.

Member Function Documentation

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 bool makVrv::DtMetaFlightParser::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

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.

bool makVrv::DtMetaFlightParser::getCurrentElementValue ( int value) const

Get the current element value as an integer.

bool makVrv::DtMetaFlightParser::getCurrentElementValue ( unsigned int value) const

Get the current element value as an integer.

bool makVrv::DtMetaFlightParser::getCurrentElementValue ( double value) const

Get the current element value as an integer.

unsigned int makVrv::DtMetaFlightParser::numberOfChildElements ( ) const

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.

static xmlDocPtr makVrv::DtMetaFlightParser::createDocument ( const std::string &  file,
std::string &  parseError 
)
staticprotected
static int makVrv::DtMetaFlightParser::countChildrenWithName ( xmlNodePtr  node,
const std::string &  nodeName 
)
staticprotected
static xmlNodePtr makVrv::DtMetaFlightParser::findChildWithName ( const xmlNodePtr  node,
const std::string &  nodeName,
const int  occurance = 0 
)
staticprotected
static void makVrv::DtMetaFlightParser::replaceAll ( std::string &  result,
const std::string &  replaceWhat,
const std::string &  replaceWithWhat 
)
staticprotected
static xmlNodePtr makVrv::DtMetaFlightParser::findDatabaseNode ( xmlDocPtr  xmlDocument,
std::string &  parseError 
)
staticprotected
static xmlNodePtr makVrv::DtMetaFlightParser::findChildWithAttribute ( xmlNodePtr  node,
const std::string &  nodeName,
const std::string &  attrName,
const std::string &  attrValue 
)
staticprotected
static const char* makVrv::DtMetaFlightParser::attribute ( xmlNodePtr  node,
const std::string &  attrName 
)
staticprotected
static const char* makVrv::DtMetaFlightParser::text ( xmlNodePtr  node)
staticprotected
static bool makVrv::DtMetaFlightParser::setText ( xmlNodePtr  node,
const std::string &  text 
)
staticprotected

Member Data Documentation

std::string makVrv::DtMetaFlightParser::myFileName
protected
std::string makVrv::DtMetaFlightParser::myVirtualTextureFileName
protected
xmlDocPtr makVrv::DtMetaFlightParser::myDocument
protected
xmlNodePtr makVrv::DtMetaFlightParser::myCurrentNode
protected
unsigned int makVrv::DtMetaFlightParser::myUniqueId
protected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)