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 | Protected Attributes
DtVrfOsgEarthFilePseudoLoader Class Reference

This class replaces the osgearth earth file loader and then calls into it It's purpose is to do xml processing on the earth file for the sim This is where the "vrfsim:" xml prefix is processed The XML DOM data structures turn the xml document into a node tree with each element being a node. The general idea is that if is something like this: <section> value

<vrfsim:param>othervalue</vrfsim:param> </section> Then this will be parsed as a section node with two children. The processing will then find the one with the vrfsim prefix, remove the prefix and replace the non-prefix version. If there is no non-prefix version it will just create it. Either way, the actual parameter ("param" in this example) will only exist as "param" in the sim after this parsing, and since the gui will not ever try to read anything that has the vrfsim prefix it will be ignored there. There is some extra processing for model elements b/c we want those disabled by default in the sim and you need to explicitly supply vrfsim:enabled="true".

Inheritance diagram for DtVrfOsgEarthFilePseudoLoader:
Inheritance graph
[legend]

Public Member Functions

 DtVrfOsgEarthFilePseudoLoader (osgDB::ReaderWriter *impl)
 
virtual const charclassName ()
 
virtual bool acceptsExtension (const std::string &ext) const override
 
virtual ReadResult readObject (const std::string &file_name, const osgDB::Options *options) const override
 
virtual ReadResult readNode (const std::string &fileName, const Options *opts) const override
 
virtual ReadResult readNode (std::istream &stream, const Options *options) const override
 
void processAttributes (osgEarth::XmlElement &element) const
 
void processModelElement (osgEarth::XmlElement &element) const
 
void processXmlElement (osgEarth::XmlElement &element) const
 

Static Public Member Functions

static void SetupLoader ()
 
static void RemoveLoader ()
 
static void SetOrCreateSetting (osgEarth::XmlElement &element, const std::string &name, bool def)
 
static std::string ProcessName (std::string &name)
 

Protected Attributes

osg::ref_ptr< osgDB::ReaderWriter > myImpl
 

Constructor & Destructor Documentation

DtVrfOsgEarthFilePseudoLoader::DtVrfOsgEarthFilePseudoLoader ( osgDB::ReaderWriter *  impl)

Member Function Documentation

static void DtVrfOsgEarthFilePseudoLoader::SetupLoader ( )
static

Install global singleton into osgDB.

static void DtVrfOsgEarthFilePseudoLoader::RemoveLoader ( )
static
virtual const char* DtVrfOsgEarthFilePseudoLoader::className ( )
virtual
virtual bool DtVrfOsgEarthFilePseudoLoader::acceptsExtension ( const std::string &  ext) const
overridevirtual
virtual ReadResult DtVrfOsgEarthFilePseudoLoader::readObject ( const std::string &  file_name,
const osgDB::Options *  options 
) const
overridevirtual
virtual ReadResult DtVrfOsgEarthFilePseudoLoader::readNode ( const std::string &  fileName,
const Options opts 
) const
overridevirtual
virtual ReadResult DtVrfOsgEarthFilePseudoLoader::readNode ( std::istream &  stream,
const Options options 
) const
overridevirtual
void DtVrfOsgEarthFilePseudoLoader::processAttributes ( osgEarth::XmlElement &  element) const
static void DtVrfOsgEarthFilePseudoLoader::SetOrCreateSetting ( osgEarth::XmlElement &  element,
const std::string &  name,
bool  def 
)
static
void DtVrfOsgEarthFilePseudoLoader::processModelElement ( osgEarth::XmlElement &  element) const
void DtVrfOsgEarthFilePseudoLoader::processXmlElement ( osgEarth::XmlElement &  element) const
static std::string DtVrfOsgEarthFilePseudoLoader::ProcessName ( std::string &  name)
static

Member Data Documentation

osg::ref_ptr<osgDB::ReaderWriter> DtVrfOsgEarthFilePseudoLoader::myImpl
protected

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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)