Public Member Functions |
| | DtMsdlScenarioDescriptionImporterExporter () |
| | CTOR.
|
| virtual | ~DtMsdlScenarioDescriptionImporterExporter () |
| | DTOR.
|
| 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 &) |
| | Loads the scenario description from the specified file into internal structures.
|
| virtual bool | saveScenarioDescription (const DtFilename &file, const DtScenario &) const |
| | Saves the scenario description information to the specified file.
|
virtual
DtScenarioDescriptionImporterExporter * | clone () |
| | Returns a new copy.
|
| virtual bool | importIntoSimulation (DtSimManager *) |
| | Imports into the simulation.
|
| virtual bool | importFromSimulation (DtSimManager *, const std::map< std::string, std::string > &exportData, const DtMsdlHierarchyPropertyMappings &) |
| | Imports from the simulation into internal structures.
|
| virtual const EquipmentPtr & | equipment () const |
| | Returns all the equipment loaded.
|
| virtual const OrganizationPtr & | organizedOrganization () const |
| | Returns map to organized organization.
|
| virtual const OrganizationPtr & | flatOrganization () const |
| | Returns map to flat hierarchy.
|
| virtual const OverlayLayer & | overlayLayers () const |
| | Returns map to overlay layers.
|
| virtual const ForceSides & | forces () const |
| | Returns map to forces.
|
| virtual std::string | findValue (const std::map< std::string, DtMsdlScenarioContentsItem > &, const std::string &path) const |
| | Given a '/' path pattern, find the data in the contents dictionary.
|
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 |
| | Converts a std::map to a single string identifier that can be used in findStdMapValue.
|
| virtual bool | organizationUsesForce (Msdl_UUID) const |
| | Returns true if an organiation (unit) is part of the given force handle.
|
| virtual std::string | supportedExtensions () |
| | Returns a space delimeted list of the extensions supported (i.e. "xml" or "csv txt")
|
| virtual bool | canImportFile (const DtFilename &) |
| | Returns true if the supplied file can be loaded by this importer.
|
| virtual void | clear () |
| | Clears internal structures.
|
| virtual DtObjectParser * | parser () |
| | Returns null, msdl has imbedded its parser into the importer/exporter.
|
| | DtScenarioDescriptionImporterExporter () |
| | CTOR Derived classes will need to create a parser.
|
| virtual | ~DtScenarioDescriptionImporterExporter () |
| | DTOR.
|
| const DtScenario & | scenario () const |
| const std::string & | error () const |
| virtual void | setDesiredForce (int force) |
| virtual bool | complete () const |
| | Return true if import is complete. Default is true.
|
Protected Member Functions |
| virtual std::string | pad (int) const |
| | Returns a string that contains the number of spaces.
|
| virtual bool | parseMilitaryScenario (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| | Parses the miliary scenario.
|
| virtual bool | parseScenarioID (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| | Parses the scenario ID section.
|
| virtual bool | parseOptions (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| | Parses the Options section. Currently unimplemented.
|
| virtual bool | parseEnvironment (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| | Parses the Environment section. Currently unimplemented.
|
| virtual bool | parseForces (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| | Parses the ForcesSides section.
|
| virtual bool | parseForce (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| | Parses the ForceSide section. Will add to the supplied map the new force and id.
|
| virtual bool | parsePOC (xmlNodePtr) |
| | Simply parses the point of contact information and adds it as scenario extra daata.
|
| virtual std::string | content (xmlNodePtr) const |
| | Returns the content of the particular node.
|
| virtual bool | parseAssociations (xmlNodePtr, Associations &) |
| | Parses all associations and fills in the supplied association map.
|
| virtual bool | parseAssociation (xmlNodePtr, Associations &) |
| | Parses a single association and adds it to the map.
|
| virtual bool | parseOrganizations (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| | Parses organization structure and places results in the myOrganization member.
|
| virtual bool | parseUnits (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| | Parses units structure and places results in the myOrganization member.
|
| virtual bool | parseUnit (xmlNodePtr, const std::map< std::string, std::string > &importData, DtMsdlSimulatedElement &unit) |
| | Parses unit structure and places results in the myOrganization member.
|
| virtual bool | parseEquipmentItem (xmlNodePtr, const std::map< std::string, std::string > &importData, DtMsdlSimulatedElement &unit) |
| | Parses the equipment item for relevant information.
|
| virtual void | addUnitToFlatOrganization (const DtMsdlSimulatedElement &) |
| | Places the newly created unit into the flat organization structure.
|
| virtual void | addEquipmentToOrganization (const DtMsdlSimulatedElement &) |
| | Finds the correct superior and adds the equipment to that item. Also adds to the myEquipment member.
|
| virtual bool | parseEquipment (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| | Parses equipment structure and places results in the myOrganization member.
|
| virtual bool | parseContents (xmlNodePtr, DtMsdlScenarioContentsItem &) |
| | Will simply read the contents of the node pointer into the key/value pair.
|
| virtual bool | parseDisposition (xmlNodePtr, DtMsdlSimulatedElement &) |
| | Parses out the location, speed and heading all other items will be placed into the contents member.
|
| virtual bool | parseOverlays (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| | Parses out all the overlays and adds them to the overlay layers member.
|
| virtual bool | parseOverlay (xmlNodePtr, const std::map< std::string, std::string > &importData, DtMsdlOverlayLayer &) |
| | Parses a single overlay and fills out the supplied structure.
|
| virtual bool | parseTacticalGraphics (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| | Parses out all the tactical graphics and adds them to the overlay in question.
|
| virtual bool | parseTacticalGraphic (xmlNodePtr, const std::map< std::string, std::string > &importData, DtMsdlSimulatedTacticalGraphic &) |
| | Parses out all the tactical graphics and adds them to the overlay in question.
|
| virtual std::vector< DtMSDLVector > | parseAnchorPoints (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| | Returns a vector of geocentric locations.
|
| virtual DtMSDLVector | parseAnchorPoint (xmlNodePtr, const std::map< std::string, std::string > &importData) |
| | Returns a vector for the location point.
|
| virtual DtMSDLVector | parseLocation (xmlNodePtr) |
| | Parses out the location and returns a geocentric vector.
|
| virtual DtMSDLVector | parseLocationGCC (xmlNodePtr) |
| | Parses geocentric.
|
| virtual DtMSDLVector | parseLocationMGRS (xmlNodePtr) |
| | Parses MGRS.
|
| virtual DtMSDLVector | parseLocationUTM (xmlNodePtr) |
| | Parses UTM.
|
| virtual DtMSDLVector | parseLocationGDC (xmlNodePtr) |
| | Parses geodetic degree.
|
| virtual void | convertFlatOrganizationToOrganizationHierarchy () |
| | Converts the flat hierarchy to an organization hierarchy of units.
|
| virtual std::string | enumerationForUnit (const std::string &symbolIdentifier, const DtMsdlSimulatedElement &) |
| | Sets the unit enumeration based on symbol identifier and subordinate.
|
| virtual int | forceTypeFromName (const std::string &, int curForce, const std::map< std::string, std::string > &) const |
| | Attempts to rework the force type from the name, given a few keywords (BLU, OP, NEU).
|
| virtual std::string | countryCodeForForce (Msdl_UUID forceHandle) const |
| | Returns the country code for the force (two character) or blank if no country code. Supply the force handle.
|
| virtual void | saveScenarioId (std::ostream &, const DtScenario &) const |
| | Saves out scenario id information.
|
| virtual void | saveAdditionalScenarioInformation (std::ostream &, const DtScenario &) const |
| | Saves out any additional (VRF specific) scenario information. Default is no-op.
|
| virtual void | saveOptions (std::ostream &) const |
| | Saves out Msdl options.
|
| virtual void | saveEnvironment (std::ostream &) const |
| | Saves out Msdl environment.
|
| virtual void | saveForceSides (std::ostream &) const |
| | Saves out force side (myForces) information.
|
| virtual void | saveForceSide (std::ostream &, const Msdl_UUID &, const DtForceSide &) const |
| | Saves out a force side structure.
|
| virtual void | saveOverlayLayers (std::ostream &) const |
| | Saves out overlay layers.
|
| virtual void | saveOverlayLayer (std::ostream &, const DtMsdlOverlayLayer &) const |
| virtual void | saveTacticalGraphics (std::ostream &) const |
| | Saves out tactical graphics.
|
| virtual void | saveTacticalGraphic (std::ostream &, const DtMsdlSimulatedTacticalGraphic &) const |
| virtual void | saveAnchorPoints (std::ostream &, const DtMsdlSimulatedTacticalGraphic &, int indent) const |
| | Saves out tactical graphic locations. Geocentric only.
|
| virtual void | saveAnchorPoint (std::ostream &, const DtVector &, int indent) const |
| virtual void | saveOrganizations (std::ostream &) const |
| | Saves out unit and equipment information.
|
| virtual void | saveUnits (std::ostream &) const |
| | Saves out units (aggregates)
|
| virtual void | saveUnit (std::ostream &, DtMsdlSimulatedElement *) const |
| virtual void | saveDisposition (std::ostream &, DtMsdlSimulatedElement *, int indent) const |
| | Location, speed, direction of movement.
|
| virtual void | saveLocation (std::ostream &, DtMsdlSimulatedElement *, int indent) const |
| | Currently will only save out geocentric (GCC)
|
| virtual void | saveLocation (std::ostream &, const DtMSDLVector &, int indent) const |
| virtual void | saveUnitRelations (std::ostream &, DtMsdlSimulatedElement *) const |
| | Saves out relation (force) information for units.
|
| virtual void | saveEquipmentRelations (std::ostream &, DtMsdlSimulatedElement *) const |
| | Saves out relation (force) information for equipment.
|
| virtual void | saveUnitModel (std::ostream &, DtMsdlSimulatedElement *) const |
| | Saves out model information (resolution and aggregate state) for a unit.
|
| virtual void | saveEquipmentModel (std::ostream &, DtMsdlSimulatedElement *) const |
| | Saves out model information for equipment. Currently only saves "ENHANCED" resolution.
|
| virtual void | saveOneSAFIdentifiers (std::ostream &, const std::string &type, DtMsdlSimulatedElement *, int indent) const |
| | Saves out DIS Enumerations, military hierarchy code, etc.
|
| virtual void | saveEquipment (std::ostream &) const |
| virtual void | saveEquipmentItem (std::ostream &, DtMsdlSimulatedElement *) const |
| virtual void | finalize () |
| | Finalizes structures.
|
| 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 |
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