![]() |
VR-Forces 5.0.3 Developer's Guide
|
The main class that is used to import/export values from/to an Msdl file. This class will not actually place the object into the simulation. That will be handled by subclasses of this class. This class is only responsible for importing/exporting from/to the msdl .xml file.

Public Types | |
| typedef std::map< Msdl_UUID, DtForceSide > | ForceSides |
| typedef std::map< Msdl_UUID, DtMsdlSimulatedElement * > | OrganizationPtr |
| typedef std::map< Msdl_UUID, DtMsdlSimulatedElement * > | EquipmentPtr |
| typedef std::map< Msdl_UUID, DtMsdlOverlayLayer > | OverlayLayer |
Public Member Functions | |
| DtMsdlScenarioDescriptionImporterExporter () | |
| virtual | ~DtMsdlScenarioDescriptionImporterExporter () |
| virtual bool | loadScenarioDescription (const DtFilename &file, const std::map< std::string, std::string > &importData) |
| virtual bool | loadScenarioDescription (const DtFilename &file, const std::map< std::string, std::string > &importData, const DtMsdlHierarchyPropertyMappings &) |
| virtual bool | saveScenarioDescription (const DtFilename &file, const DtScenario &) const |
| virtual DtScenarioDescriptionImporterExporter * | clone () |
| virtual bool | importIntoSimulation (DtSimulationServices *) |
| virtual bool | importFromSimulation (DtSimulationServices *, const std::map< std::string, std::string > &exportData, const DtMsdlHierarchyPropertyMappings &) |
| virtual const EquipmentPtr & | equipment () const |
| virtual const OrganizationPtr & | organizedOrganization () const |
| virtual const OrganizationPtr & | flatOrganization () const |
| virtual const OverlayLayer & | overlayLayers () const |
| virtual const ForceSides & | forces () const |
| virtual std::string | findValue (const std::map< std::string, DtMsdlScenarioContentsItem > &, const std::string &path) const |
| virtual std::map< std::string, std::string > | findStdMapValue (const std::map< std::string, DtMsdlScenarioContentsItem > &, const std::string &path, const std::set< std::string > &ignore=std::set< std::string >()) const |
| virtual bool | hasValue (const std::map< std::string, DtMsdlScenarioContentsItem > &, const std::string &path) const |
| virtual std::string | convertMapToString (const std::map< std::string, std::string > &) const |
| virtual bool | organizationUsesForce (Msdl_UUID) const |
| virtual std::string | supportedExtensions () |
| virtual bool | canImportFile (const DtFilename &) |
| virtual void | clear () |
| virtual DtObjectParser * | parser () |
Public Member Functions inherited from DtScenarioDescriptionImporterExporter | |
| DtScenarioDescriptionImporterExporter () | |
| virtual | ~DtScenarioDescriptionImporterExporter () |
| const DtScenario & | scenario () const |
| const std::string & | error () const |
| virtual void | setDesiredForce (int force) |
| virtual bool | complete () const |
Protected Member Functions | |
| virtual std::string | pad (int) const |
| virtual bool | parseMilitaryScenario (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| virtual bool | parseScenarioID (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| virtual bool | parseOptions (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| virtual bool | parseEnvironment (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| virtual bool | parseForces (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| virtual bool | parseForce (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| virtual bool | parsePOC (xmlNodePtr) |
| virtual std::string | content (xmlNodePtr) const |
| virtual bool | parseAssociations (xmlNodePtr, Associations &) |
| virtual bool | parseAssociation (xmlNodePtr, Associations &) |
| virtual bool | parseOrganizations (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| virtual bool | parseUnits (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| virtual bool | parseUnit (xmlNodePtr, const std::map< std::string, std::string > &importData, DtMsdlSimulatedElement &unit) |
| virtual bool | parseEquipmentItem (xmlNodePtr, const std::map< std::string, std::string > &importData, DtMsdlSimulatedElement &unit) |
| virtual void | addUnitToFlatOrganization (const DtMsdlSimulatedElement &) |
| virtual void | addEquipmentToOrganization (const DtMsdlSimulatedElement &) |
| virtual bool | parseEquipment (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| virtual bool | parseContents (xmlNodePtr, DtMsdlScenarioContentsItem &) |
| virtual bool | parseDisposition (xmlNodePtr, DtMsdlSimulatedElement &) |
| virtual bool | parseOverlays (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| virtual bool | parseOverlay (xmlNodePtr, const std::map< std::string, std::string > &importData, DtMsdlOverlayLayer &) |
| virtual bool | parseTacticalGraphics (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| virtual bool | parseTacticalGraphic (xmlNodePtr, const std::map< std::string, std::string > &importData, DtMsdlSimulatedTacticalGraphic &) |
| virtual std::vector< DtMSDLVector > | parseAnchorPoints (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| virtual DtMSDLVector | parseAnchorPoint (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| virtual DtMSDLVector | parseLocation (xmlNodePtr) |
| virtual DtMSDLVector | parseLocationGCC (xmlNodePtr) |
| virtual DtMSDLVector | parseLocationMGRS (xmlNodePtr) |
| virtual DtMSDLVector | parseLocationUTM (xmlNodePtr) |
| virtual DtMSDLVector | parseLocationGDC (xmlNodePtr) |
| virtual void | convertFlatOrganizationToOrganizationHierarchy () |
| virtual std::string | enumerationForUnit (const std::string &symbolIdentifier, const DtMsdlSimulatedElement &) |
| virtual int | forceTypeFromName (const std::string &, int curForce, const std::map< std::string, std::string > &) const |
| virtual std::string | countryCodeForForce (Msdl_UUID forceHandle) const |
| virtual void | saveScenarioId (std::ostream &, const DtScenario &) const |
| virtual void | saveAdditionalScenarioInformation (std::ostream &, const DtScenario &) const |
| virtual void | saveOptions (std::ostream &) const |
| virtual void | saveEnvironment (std::ostream &) const |
| virtual void | saveForceSides (std::ostream &) const |
| virtual void | saveForceSide (std::ostream &, const Msdl_UUID &, const DtForceSide &) const |
| virtual void | saveOverlayLayers (std::ostream &) const |
| virtual void | saveOverlayLayer (std::ostream &, const DtMsdlOverlayLayer &) const |
| virtual void | saveTacticalGraphics (std::ostream &) const |
| virtual void | saveTacticalGraphic (std::ostream &, const DtMsdlSimulatedTacticalGraphic &) const |
| virtual void | saveAnchorPoints (std::ostream &, const DtMsdlSimulatedTacticalGraphic &, int indent) const |
| virtual void | saveAnchorPoint (std::ostream &, const DtVector &, int indent) const |
| virtual void | saveOrganizations (std::ostream &) const |
| virtual void | saveUnits (std::ostream &) const |
| virtual void | saveUnit (std::ostream &, DtMsdlSimulatedElement *) const |
| virtual void | saveDisposition (std::ostream &, DtMsdlSimulatedElement *, int indent) const |
| virtual void | saveLocation (std::ostream &, DtMsdlSimulatedElement *, int indent) const |
| virtual void | saveLocation (std::ostream &, const DtMSDLVector &, int indent) const |
| virtual void | saveUnitRelations (std::ostream &, DtMsdlSimulatedElement *) const |
| virtual void | saveEquipmentRelations (std::ostream &, DtMsdlSimulatedElement *) const |
| virtual void | saveUnitModel (std::ostream &, DtMsdlSimulatedElement *) const |
| virtual void | saveEquipmentModel (std::ostream &, DtMsdlSimulatedElement *) const |
| virtual void | saveOneSAFIdentifiers (std::ostream &, const std::string &type, DtMsdlSimulatedElement *, int indent) const |
| virtual void | saveEquipment (std::ostream &) const |
| virtual void | saveEquipmentItem (std::ostream &, DtMsdlSimulatedElement *) const |
| virtual void | finalize () |
| virtual int | nextForceType () const |
| virtual void | saveUnitSymbolModifiers (std::ostream &, DtMsdlSimulatedElement *) const |
| virtual void | saveFormationPosition (std::ostream &, DtMsdlSimulatedElement *, int indent) const |
| virtual void | saveOwnFormation (std::ostream &, DtMsdlSimulatedElement *, int indent) const |
| virtual void | saveEquipmentSymbolModifiers (std::ostream &, DtMsdlSimulatedElement *) const |
| virtual void | saveOneSAFBasicLoadInformation (std::ostream &, DtMsdlSimulatedElement *) const |
| virtual void | saveSymbolClassData (std::ostream &, const DtMsdlSimulatedTacticalGraphic &) const |
Protected Attributes | |
| xmlDocPtr | myDoc |
| ForceSides | myForces |
| OrganizationPtr | myOrganizedOrganization |
| OrganizationPtr | myFlatOrganization |
| EquipmentPtr | myEquipment |
| OverlayLayer | myOverlayLayers |
| OrganizationPtr | myPendingMatches |
| DtMsdlHierarchyPropertyMappings | myHierarchyPropertyMappings |
| DtExtent | myAreaOfInterest |
Protected Attributes inherited from DtScenarioDescriptionImporterExporter | |
| DtScenario | myScenario |
| std::string | myError |
| DtObjectParser * | myParser |
| DtForceType | myDesiredForce |
| typedef std::map<Msdl_UUID, DtForceSide> DtMsdlScenarioDescriptionImporterExporter::ForceSides |
| typedef std::map<Msdl_UUID, DtMsdlSimulatedElement*> DtMsdlScenarioDescriptionImporterExporter::OrganizationPtr |
| typedef std::map<Msdl_UUID, DtMsdlSimulatedElement*> DtMsdlScenarioDescriptionImporterExporter::EquipmentPtr |
| typedef std::map<Msdl_UUID, DtMsdlOverlayLayer> DtMsdlScenarioDescriptionImporterExporter::OverlayLayer |
| DtMsdlScenarioDescriptionImporterExporter::DtMsdlScenarioDescriptionImporterExporter | ( | ) |
CTOR.
|
virtual |
DTOR.
|
virtual |
Implements DtScenarioDescriptionImporterExporter.
|
virtual |
Loads the scenario description from the specified file into internal structures.
|
virtual |
Saves the scenario description information to the specified file.
Implements DtScenarioDescriptionImporterExporter.
|
virtual |
Returns a new copy.
Implements DtScenarioDescriptionImporterExporter.
Reimplemented in makVrf::DtVrfMsdlOrbatImporterExporter, and DtVrfMsdlScenarioDescriptionImporterExporter.
|
virtual |
Imports into the simulation. DtSimulationServices is not defined at this level, so subclasses at vrfobjcore level must implement.
Implements DtScenarioDescriptionImporterExporter.
Reimplemented in DtVrfMsdlScenarioDescriptionImporterExporter.
|
virtual |
Imports from the simulation into internal structures. DtSimulationServices is not defined at this level, so subclasses at vrfobjcore level must implement.
Implements DtScenarioDescriptionImporterExporter.
Reimplemented in DtVrfMsdlScenarioDescriptionImporterExporter.
|
virtual |
Returns all the equipment loaded.
|
virtual |
Returns map to organized organization.
|
virtual |
Returns map to flat hierarchy.
|
virtual |
Returns map to overlay layers.
|
virtual |
Returns map to forces.
|
virtual |
Given a '/' path pattern, find the data in the contents dictionary.
|
virtual |
|
virtual |
|
virtual |
Converts a std::map to a single string identifier that can be used in findStdMapValue.
|
virtual |
Returns true if an organiation (unit) is part of the given force handle.
|
virtual |
Returns a space delimeted list of the extensions supported (i.e. "xml" or "csv txt")
Implements DtScenarioDescriptionImporterExporter.
|
virtual |
Returns true if the supplied file can be loaded by this importer.
Implements DtScenarioDescriptionImporterExporter.
|
virtual |
Clears internal structures.
Reimplemented in makVrf::DtVrfMsdlOrbatImporterExporter.
|
virtual |
Returns null, msdl has imbedded its parser into the importer/exporter.
Implements DtScenarioDescriptionImporterExporter.
|
protectedvirtual |
Returns a string that contains the number of spaces.
|
protectedvirtual |
Parses the miliary scenario.
|
protectedvirtual |
Parses the scenario ID section.
|
protectedvirtual |
Parses the Options section. Currently unimplemented.
|
protectedvirtual |
Parses the Environment section. Currently unimplemented.
|
protectedvirtual |
Parses the ForcesSides section. Will add to the force hostility matrix any forces that are new. Note that each new force will, in order, start at force 4 if it is not one of the known force types.
|
protectedvirtual |
Parses the ForceSide section. Will add to the supplied map the new force and id.
|
protectedvirtual |
Simply parses the point of contact information and adds it as scenario extra daata.
|
protectedvirtual |
Returns the content of the particular node.
|
protectedvirtual |
Parses all associations and fills in the supplied association map.
|
protectedvirtual |
Parses a single association and adds it to the map.
|
protectedvirtual |
Parses organization structure and places results in the myOrganization member. All items are stored in the structure, however, only some items might be used in the creation of a VRF entity/aggregate/tactical graphic.
|
protectedvirtual |
Parses units structure and places results in the myOrganization member. All items are stored in the structure, however, only some items might be used in the creation of a VRF entity/aggregate/tactical graphic. The myOrganization member will be in hierarchy organization.
|
protectedvirtual |
Parses unit structure and places results in the myOrganization member. All items are stored in the structure, however, only some items might be used in the creation of a VRF entity/aggregate/tactical graphic. The myOrganization member will be in hierarchy organization.
|
protectedvirtual |
Parses the equipment item for relevant information.
|
protectedvirtual |
Places the newly created unit into the flat organization structure. Will be organized once all units are read in.
|
protectedvirtual |
Finds the correct superior and adds the equipment to that item. Also adds to the myEquipment member.
|
protectedvirtual |
Parses equipment structure and places results in the myOrganization member. All items are stored in the structure, however, only some items might be used in the creation of a VRF entity/aggregate/tactical graphic. The myOrganization member will be in hierarchy organization.
|
protectedvirtual |
Will simply read the contents of the node pointer into the key/value pair. If the item has children the children will be part of the "myChildren" member, else that member will be blank and only the "value" member will be filled in.
|
protectedvirtual |
Parses out the location, speed and heading all other items will be placed into the contents member.
|
protectedvirtual |
Parses out all the overlays and adds them to the overlay layers member.
|
protectedvirtual |
Parses a single overlay and fills out the supplied structure.
|
protectedvirtual |
Parses out all the tactical graphics and adds them to the overlay in question. Even if there are multiple overlays this is assigned to, it will only be assigned to the first overlay.
|
protectedvirtual |
Parses out all the tactical graphics and adds them to the overlay in question. Even if there are multiple overlays this is assigned to, it will only be assigned to the first overlay.
|
protectedvirtual |
Returns a vector of geocentric locations.
|
protectedvirtual |
Returns a vector for the location point.
|
protectedvirtual |
Parses out the location and returns a geocentric vector.
|
protectedvirtual |
Parses geocentric.
|
protectedvirtual |
Parses MGRS.
|
protectedvirtual |
Parses UTM.
|
protectedvirtual |
Parses geodetic degree.
|
protectedvirtual |
Converts the flat hierarchy to an organization hierarchy of units.
|
protectedvirtual |
Sets the unit enumeration based on symbol identifier and subordinate.
|
protectedvirtual |
Attempts to rework the force type from the name, given a few keywords (BLU, OP, NEU). If not recognized will return current force passed in, else will return new force (friendly, opposing, neutral) based on current force number.
|
protectedvirtual |
Returns the country code for the force (two character) or blank if no country code. Supply the force handle.
|
protectedvirtual |
Saves out scenario id information.
|
protectedvirtual |
Saves out any additional (VRF specific) scenario information. Default is no-op.
Reimplemented in makVrf::DtVrfMsdlOrbatImporterExporter.
|
protectedvirtual |
Saves out Msdl options.
|
protectedvirtual |
Saves out Msdl environment.
|
protectedvirtual |
Saves out force side (myForces) information.
|
protectedvirtual |
Saves out a force side structure.
|
protectedvirtual |
Saves out overlay layers.
|
protectedvirtual |
|
protectedvirtual |
Saves out tactical graphics.
|
protectedvirtual |
|
protectedvirtual |
Saves out tactical graphic locations. Geocentric only.
|
protectedvirtual |
|
protectedvirtual |
Saves out unit and equipment information.
|
protectedvirtual |
Saves out units (aggregates)
|
protectedvirtual |
|
protectedvirtual |
Location, speed, direction of movement.
|
protectedvirtual |
Currently will only save out geocentric (GCC)
|
protectedvirtual |
|
protectedvirtual |
Saves out relation (force) information for units.
|
protectedvirtual |
Saves out relation (force) information for equipment.
|
protectedvirtual |
Saves out model information (resolution and aggregate state) for a unit.
|
protectedvirtual |
Saves out model information for equipment. Currently only saves "ENHANCED" resolution.
|
protectedvirtual |
Saves out DIS Enumerations, military hierarchy code, etc. that is specific to OneSAF. type is "Unit" or "Equipment".
|
protectedvirtual |
Unimplemented methods, however, stubbed out for future use.
|
protectedvirtual |
Unimplemented methods, however, stubbed out for future use.
|
protectedvirtual |
Unimplemented methods, however, stubbed out for future use.
|
protectedvirtual |
Unimplemented methods, however, stubbed out for future use.
|
protectedvirtual |
Unimplemented methods, however, stubbed out for future use.
|
protectedvirtual |
Unimplemented methods, however, stubbed out for future use.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Finalizes structures. This code currently assigns country codes to forces based on highest level unit country code.
|
protectedvirtual |
Reimplemented in makVrf::DtVrfMsdlOrbatImporterExporter.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Matches, that during reading, have not been made for units as of yet.
|
protected |
|
protected |
Corners must be in geocentric.