VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
DtVrfCsvScenarioDescriptionImporterExporter Class Reference

This class is the interface for import from or export to CSV files. More...

Inheritance diagram for DtVrfCsvScenarioDescriptionImporterExporter:
Inheritance graph
[legend]

Public Member Functions

 DtVrfCsvScenarioDescriptionImporterExporter ()
 DtVrfCSVScenarioDescriptionImporterExporter. More...
 
virtual ~DtVrfCsvScenarioDescriptionImporterExporter ()
 DTOR. More...
 
virtual
DtScenarioDescriptionImporterExporter
clone ()
 Clone to create a new copy of the object. Will be used as a "clean" version for import. More...
 
virtual bool importIntoSimulation (DtSimManager *)
 Imports into the simulation. More...
 
virtual bool importFromSimulation (DtSimManager *, const std::map< std::string, std::string > &exportData, const DtMsdlHierarchyPropertyMappings &)
 Imports from the simulation into internal structures. More...
 
- Public Member Functions inherited from DtCsvScenarioDescriptionImporterExporter
 DtCsvScenarioDescriptionImporterExporter ()
 CTOR. More...
 
virtual ~DtCsvScenarioDescriptionImporterExporter ()
 DTOR. More...
 
virtual bool loadScenarioDescription (const DtFilename &file, const std::map< std::string, std::string > &importData)
 Loads information from the supplied ACO file into internal structures. More...
 
virtual bool saveScenarioDescription (const DtFilename &file, const DtScenario &) const
 Saves the scenario description information to the specified file. More...
 
virtual std::string supportedExtensions ()
 Returns a space delimeted list of the extensions supported ("ACO txt") More...
 
virtual bool canImportFile (const DtFilename &)
 Returns true if the supplied file can be loaded by this importer. More...
 
virtual void setAltInAGL (const bool agl)
 
virtual void setOptionalName (const std::string &name)
 
virtual DtObjectParserparser ()
 Returns parser, if doesn't exist yet will create it. More...
 
- Public Member Functions inherited from DtScenarioDescriptionImporterExporter
 DtScenarioDescriptionImporterExporter ()
 CTOR Derived classes will need to create a parser. More...
 
virtual ~DtScenarioDescriptionImporterExporter ()
 DTOR. More...
 
const DtScenarioscenario () const
 
const std::string & error () const
 
virtual void setDesiredForce (int force)
 

Protected Member Functions

virtual bool exportOrganization (DtSimManager *, const std::map< std::string, std::string > &exportData, const DtMsdlHierarchyPropertyMappings &)
 Exports the entities and aggregates into internal structures. More...
 
virtual void determineAltitude (const DtVector &local, DtGeodeticCoord &geod, bool useAGL)
 
virtual bool exportTacticalGraphics (DtSimManager *, const std::map< std::string, std::string > &exportData, const DtMsdlHierarchyPropertyMappings &)
 Exports the tactical graphics into internal structures. More...
 
virtual bool complete () const
 Returns true if myOrganizationCreationOrder is 0 length. More...
 
virtual bool importOrganization (DtSimManager *)
 Schedule aggregates/entities for creation. More...
 
virtual bool importTacticalGraphics (DtSimManager *)
 Schedule tactical graphics for creation. More...
 
virtual bool prepareOrganizationCreationOrder (DtSimManager *mgr, ObjectInformation *element)
 Recursively add elements in order to be created – entities then containing superiors. More...
 
virtual void processCreateObjects ()
 
virtual void createEntity (ObjectInformation *)
 Creates an entity or an aggregate. If an aggregate will also aggregate entities into the hierarchy. More...
 
virtual void createTacticalGraphic (ObjectInformation *)
 Creates a tactical graphic object. More...
 
virtual DtString deconflictName (DtSimManager *, const DtString &, int kind)
 Deconflicts duplicate names if they appear in the object manager. Will simply prepend a <n>_ to the name. More...
 

Static Protected Member Functions

static void createObjectsCallback (void *)
 Creates objects. More...
 

Protected Attributes

std::vector< ObjectInformation * > myOrganizedHierarchy
 Hierarchy with top level nodes and tactical graphics only. More...
 
std::vector< ObjectInformation * > myOrganizationCreationOrder
 Order in which to create organization items or tactical graphics. More...
 
DtSimManagermySimManager
 
- Protected Attributes inherited from DtCsvScenarioDescriptionImporterExporter
bool myIsAgl
 
std::string myOptionalName
 
- Protected Attributes inherited from DtScenarioDescriptionImporterExporter
DtScenario myScenario
 
std::string myError
 
DtObjectParsermyParser
 
DtForceType myDesiredForce
 

Detailed Description

This class is the interface for import from or export to CSV files.

This class will not interact with the simulation engine directory. The subclass vrfCSVScenarioDescriptionImporterExporter will perform that action based on what this class reads in from the file

This CSV file will contain the following information (in column format): NAME - The name of the object ENUMERATION - The DIS enumeration FORCE - The object's FORCE SUPERIOR OR OVERLAY - The name of the superior or overlay this object is on, or blank if none POINTS - Triplets of points in DDS (degrees) LAT/LON/ALT

This file will extend the import/export class by interfacing with the simulation engine to incorporate scenario information

Constructor & Destructor Documentation

DtVrfCsvScenarioDescriptionImporterExporter::DtVrfCsvScenarioDescriptionImporterExporter ( )
virtual DtVrfCsvScenarioDescriptionImporterExporter::~DtVrfCsvScenarioDescriptionImporterExporter ( )
virtual

DTOR.

Member Function Documentation

virtual DtScenarioDescriptionImporterExporter* DtVrfCsvScenarioDescriptionImporterExporter::clone ( )
virtual

Clone to create a new copy of the object. Will be used as a "clean" version for import.

Reimplemented from DtCsvScenarioDescriptionImporterExporter.

virtual bool DtVrfCsvScenarioDescriptionImporterExporter::importIntoSimulation ( DtSimManager )
virtual

Imports into the simulation.

Reimplemented from DtCsvScenarioDescriptionImporterExporter.

virtual bool DtVrfCsvScenarioDescriptionImporterExporter::importFromSimulation ( DtSimManager ,
const std::map< std::string, std::string > &  exportData,
const DtMsdlHierarchyPropertyMappings  
)
virtual

Imports from the simulation into internal structures.

Reimplemented from DtCsvScenarioDescriptionImporterExporter.

virtual bool DtVrfCsvScenarioDescriptionImporterExporter::exportOrganization ( DtSimManager ,
const std::map< std::string, std::string > &  exportData,
const DtMsdlHierarchyPropertyMappings  
)
protectedvirtual

Exports the entities and aggregates into internal structures.

virtual void DtVrfCsvScenarioDescriptionImporterExporter::determineAltitude ( const DtVector local,
DtGeodeticCoord &  geod,
bool  useAGL 
)
protectedvirtual
virtual bool DtVrfCsvScenarioDescriptionImporterExporter::exportTacticalGraphics ( DtSimManager ,
const std::map< std::string, std::string > &  exportData,
const DtMsdlHierarchyPropertyMappings  
)
protectedvirtual

Exports the tactical graphics into internal structures.

virtual bool DtVrfCsvScenarioDescriptionImporterExporter::complete ( ) const
protectedvirtual

Returns true if myOrganizationCreationOrder is 0 length.

Reimplemented from DtScenarioDescriptionImporterExporter.

virtual bool DtVrfCsvScenarioDescriptionImporterExporter::importOrganization ( DtSimManager )
protectedvirtual

Schedule aggregates/entities for creation.

virtual bool DtVrfCsvScenarioDescriptionImporterExporter::importTacticalGraphics ( DtSimManager )
protectedvirtual

Schedule tactical graphics for creation.

virtual bool DtVrfCsvScenarioDescriptionImporterExporter::prepareOrganizationCreationOrder ( DtSimManager mgr,
ObjectInformation element 
)
protectedvirtual

Recursively add elements in order to be created – entities then containing superiors.

Once all elements from a hierarchy have been scheduled to be create, set marker to wait until next tick to create other elements

static void DtVrfCsvScenarioDescriptionImporterExporter::createObjectsCallback ( void *  )
staticprotected

Creates objects.

virtual void DtVrfCsvScenarioDescriptionImporterExporter::processCreateObjects ( )
protectedvirtual
virtual void DtVrfCsvScenarioDescriptionImporterExporter::createEntity ( ObjectInformation )
protectedvirtual

Creates an entity or an aggregate. If an aggregate will also aggregate entities into the hierarchy.

virtual void DtVrfCsvScenarioDescriptionImporterExporter::createTacticalGraphic ( ObjectInformation )
protectedvirtual

Creates a tactical graphic object.

virtual DtString DtVrfCsvScenarioDescriptionImporterExporter::deconflictName ( DtSimManager ,
const DtString ,
int  kind 
)
protectedvirtual

Deconflicts duplicate names if they appear in the object manager. Will simply prepend a <n>_ to the name.

Member Data Documentation

std::vector<ObjectInformation*> DtVrfCsvScenarioDescriptionImporterExporter::myOrganizedHierarchy
protected

Hierarchy with top level nodes and tactical graphics only.

This is what will be used to create the objects in the simulation

std::vector<ObjectInformation*> DtVrfCsvScenarioDescriptionImporterExporter::myOrganizationCreationOrder
protected

Order in which to create organization items or tactical graphics.

Empty elements will signal to stop the creation for this tick and continue next tick

DtSimManager* DtVrfCsvScenarioDescriptionImporterExporter::mySimManager
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)