VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrf::DtVrfVisualsManager Class Reference

The DtVrfVisualsManager class is a class that allows for the loading of visuals (definitions, mappings and model definitions) for a given simulation model set. More...

Inheritance diagram for makVrf::DtVrfVisualsManager:
Inheritance graph
[legend]

Classes

struct  ModelSetVisual
class  Visuals

Public Types

typedef boost::unordered_map
< makVrv::DtSharedSimulationSettings::MapperType,
DtVrfEntityTypeMapper * > 
MappersMap

Public Member Functions

 DtVrfVisualsManager (makVrv::DtDe &)
 CTOR.
virtual ~DtVrfVisualsManager ()
 DTOR.
virtual bool loadVisuals (DtSimulationModelSet *, bool createIfMissing=false, bool editMode=false)
 Loads visuals (definitions, mappings and model defnitions) into the appropriate managers given the simulation model set.
virtual bool loadVisuals (const DtFilename &, const DtString &rootName="")
 Loads visuals from the given directory.
virtual bool createVisuals (const DtSimulationModelSet *, bool andLoad=true, Visuals *visualsToUpgradeFrom=0, const DtFilename &sourceDefinitionsDir=DtFilename::nullFilename())
 Given the simulation model set, and the default model definitions, mappings and visualizers, create a subset of those in the given simulation model set directory based on .entity files in that directory.
virtual bool getSystemVisualizerDefinitionAndElementTypeMap (const DtEntityType &, makVrv::DtUnicode &, makVrv::DtElementDefinitionTypeManager::BuiltInElementTypes &, bool exactMatch=true)
 Given the entity type, return (from system definitions) the element map this entity type belongs to.
virtual bool isUnknown (const std::vector< makVrv::DtUnicode > &entities) const
 Returns true if the models evaluate to "unknown" (given the list of unknown models). If any model is unknown, then all are unknown.
virtual makVrv::DtUnicode unknownString () const
 The default "unknown" string.
virtual void updateUnknowns ()
 Adds/removes/returns unknown strings.
const std::set< makVrv::DtUnicodeunknownStrings () const
virtual void clear ()
 Clears out all visuals for mappers, visualizers and model definitions.
virtual void clearSimulationModelSetVisuals ()
 Clears out only simulation model set visuals.
virtual void setupAdditionalVisualizers ()
 Set up any additional visualizers VR-Forces needs, for example, Range rings.
virtual void upgradeSpotReportsDictionary (const DtFilename &toDirectory, Visuals &, bool force=false, bool mergeAttributes=false)
 Upgrades the spot report dictionary from entity, aggregate and tactical graphic elements.
virtual bool upgradeVisuals (const DtSimulationModelSet &oldSet, const DtSimulationModelSet &newSet)
 Upgrades the visuals to the new format from the old model set to the new model set directory.
virtual bool loadVisuals (const DtScenarioExplorer &explorer, bool createIfMissing=false, bool force=false, bool editMode=false)
 Checks to see if any of the simulation model sets need to be loaded.
virtual const VisualsvisualsFor (const DtSimulationModelSet &) const
 If exists, returns the visuals for the given SMS.
virtual VisualsvisualsFor (const DtSimulationModelSet &)
virtual VisualsvisualsFor (const std::string &)
virtual const VisualsvisualsFor (const std::string &) const
virtual
makVrv::DtElementDefinitionTypeManager::BuiltInElementTypes 
elementTypeFor (const DtEntityType &)
 Given the entity type, return the element manager dictionary type that supports it.
virtual void mergeVisualsIntoSystemVisuals (const Visuals *)
 Merges ths visuals supplied into the system visuals.
virtual void pruneFromSystemVisuals (const Visuals *)
 Prunes from system viasuals the visuals supplied.
virtual void merge (const DtEntityType &, const Visuals *, bool toSystem=true)
 Merges visuals into this visual set for the given type from the supplied visuals. If toSystem us true will also add to system visuals.
virtual bool saveSystemVisualsAsAppData (const DtFilename &directory, bool saveHierarchyData=true)
 Saves system visuals into app data structure, assuming vrfGui as the settings directory, unless the stealth directory is found under appData, in which case that will be used.
virtual void createSpotReportDefinitionFor (const DtEntityType &)
 Finds the visuals for the type and adds a spot report entry (if one does not exist) based on the 2D model set definition of that type.
virtual bool updateAndAddMatchTypeVisuals (const DtEntityType &sourceType, const DtEntityType &matchType, bool andSystem=true)
 Given the source type, if a mapping for that source type exists add it also for the match type.
virtual void updateVisualsFor (const DtEntityType &)
 Finds the visuals and updates the visuals into the system visuals.
virtual void removeVisualsFor (const DtEntityType &, bool andSystem=true)
 Removes the visuals for the given entity type.
virtual bool removeMappingsFor (const DtEntityType &, bool andSystem=true)
 Simply removes the mapping for the given type. If andSystem is true also removes from system. Returns true if removed.
virtual void removeElementDefinition (const DtEntityType &, bool andSystem=true)
 Just removes the element definition for the entity type. If andSystem is true also removes from system.
virtual VisualsvisualsFor (const DtEntityType &)
 Returns the Visuals that contains the exact mapper key. If no visuals exist then it will return 0.
virtual void setDefaultVisuals (const std::string &)
 Sets the visuals to use when no other visuals can be mapped. This should be the filename() of the simulation model set.
const std::string & defaultVisuals () const
virtual void setCoreRootName (const std::string &)
 The root name of the core files. Default is "core".
virtual const std::string & coreRootName () const
virtual void resetStartupCounts (makVrv::DtElementDefinitionTypeManager::BuiltInElementTypes)
VisualssystemDefaulVisuals () const
virtual void initializeSystemVisuals (const DtFilename &definitionsDir=DtFilename::nullFilename(), bool andInstall=true, bool setupSpotReports=true)
 Initialize mappers, visual defs and model defs for system visuals (as exists in appData or as supplied on command line)
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor.
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor.

Static Public Member Functions

static DtVrfVisualsManagerinstance (makVrv::DtDe &)
 Instance helpers.
static void registerInstance (makVrv::DtDe &, DtVrfVisualsManager *)

Protected Types

typedef std::vector
< ModelSetVisual
SimulationModelSetVisuals

Protected Member Functions

virtual void setupAdditionalTacticalGraphicsVisualizers ()
 Set up any additional visualizers VR-Forces needs, for example, sceeario events.
virtual void setupNavigationAreaVisualizer ()
 Set up any necessary navigation area visualizer.
virtual void setupBoundingVolumes ()
 Sets up bounding volumes for entities.
virtual void setupObjectConsoleWarngForTacticalGraphics ()
 Sets up object console warning visualizer for tactical graphics.
virtual void setupBoundingVolumes (const std::string &root)
 Sets up the bounding volumes to be under a particular root node.
virtual void setupRangeRings ()
 Sets up range ring items.
virtual void addRangeRingsFor (int managerType)
virtual void setupSensorContactLines ()
 Sets up sensor contact kines.
virtual void addSensorContactLinesFor (int managerType)
virtual void setupAdditionalAggregateVisualizers ()

Protected Attributes

makVrv::DtDemyDe
VisualsmySystemDefaultVisuals
SimulationModelSetVisuals mySimulationModelSetVisuals
bool myUseNewSystemDataStructure
std::string myDefaultVisuals
std::string myCoreRootName
std::set< DtFilename > mySystemVisuals
std::set< makVrv::DtUnicodemyUnknowns

Detailed Description

The DtVrfVisualsManager class is a class that allows for the loading of visuals (definitions, mappings and model definitions) for a given simulation model set.

It will also provide routines to create visual mappings from a model set

Member Typedef Documentation

Constructor & Destructor Documentation

makVrf::DtVrfVisualsManager::DtVrfVisualsManager ( makVrv::DtDe )

CTOR.

virtual makVrf::DtVrfVisualsManager::~DtVrfVisualsManager ( )
virtual

DTOR.

Member Function Documentation

static DtVrfVisualsManager& makVrf::DtVrfVisualsManager::instance ( makVrv::DtDe )
static

Instance helpers.

static void makVrf::DtVrfVisualsManager::registerInstance ( makVrv::DtDe ,
DtVrfVisualsManager  
)
static
virtual bool makVrf::DtVrfVisualsManager::loadVisuals ( DtSimulationModelSet ,
bool  createIfMissing = false,
bool  editMode = false 
)
virtual

Loads visuals (definitions, mappings and model defnitions) into the appropriate managers given the simulation model set.

Returns true if can load visuals. If edit mode is true, also also SMS level visuals even if they are in the appData structure

virtual bool makVrf::DtVrfVisualsManager::loadVisuals ( const DtFilename &  ,
const DtString rootName = "" 
)
virtual

Loads visuals from the given directory.

virtual bool makVrf::DtVrfVisualsManager::createVisuals ( const DtSimulationModelSet ,
bool  andLoad = true,
Visuals visualsToUpgradeFrom = 0,
const DtFilename &  sourceDefinitionsDir = DtFilename::nullFilename() 
)
virtual

Given the simulation model set, and the default model definitions, mappings and visualizers, create a subset of those in the given simulation model set directory based on .entity files in that directory.

If andLoad flag is true, also load definitions just created and discard those that are not used from the default managers, If visualsToUpgradeFrom is non-zero, and the visuals cannot be found in the current visual set, look in the upgrade

virtual bool makVrf::DtVrfVisualsManager::getSystemVisualizerDefinitionAndElementTypeMap ( const DtEntityType &  ,
makVrv::DtUnicode ,
makVrv::DtElementDefinitionTypeManager::BuiltInElementTypes ,
bool  exactMatch = true 
)
virtual

Given the entity type, return (from system definitions) the element map this entity type belongs to.

Returns false if not found

virtual bool makVrf::DtVrfVisualsManager::isUnknown ( const std::vector< makVrv::DtUnicode > &  entities) const
virtual

Returns true if the models evaluate to "unknown" (given the list of unknown models). If any model is unknown, then all are unknown.

virtual makVrv::DtUnicode makVrf::DtVrfVisualsManager::unknownString ( ) const
virtual

The default "unknown" string.

virtual void makVrf::DtVrfVisualsManager::updateUnknowns ( )
virtual

Adds/removes/returns unknown strings.

const std::set<makVrv::DtUnicode> makVrf::DtVrfVisualsManager::unknownStrings ( ) const
inline
virtual void makVrf::DtVrfVisualsManager::clear ( )
virtual

Clears out all visuals for mappers, visualizers and model definitions.

virtual void makVrf::DtVrfVisualsManager::clearSimulationModelSetVisuals ( )
virtual

Clears out only simulation model set visuals.

virtual void makVrf::DtVrfVisualsManager::setupAdditionalVisualizers ( )
virtual

Set up any additional visualizers VR-Forces needs, for example, Range rings.

virtual void makVrf::DtVrfVisualsManager::upgradeSpotReportsDictionary ( const DtFilename &  toDirectory,
Visuals ,
bool  force = false,
bool  mergeAttributes = false 
)
virtual

Upgrades the spot report dictionary from entity, aggregate and tactical graphic elements.

virtual bool makVrf::DtVrfVisualsManager::upgradeVisuals ( const DtSimulationModelSet oldSet,
const DtSimulationModelSet newSet 
)
virtual

Upgrades the visuals to the new format from the old model set to the new model set directory.

This will overwrite any visual files that happen to be in the new directory. Also, the method for upgrade will be to keep any new visuals (from the new set) and add from the old set (that do not exist in the new set)

virtual bool makVrf::DtVrfVisualsManager::loadVisuals ( const DtScenarioExplorer explorer,
bool  createIfMissing = false,
bool  force = false,
bool  editMode = false 
)
virtual

Checks to see if any of the simulation model sets need to be loaded.

If they do the current visuals are cleared and the new visuals loaded. Returns true if visuals are loaded

virtual const Visuals* makVrf::DtVrfVisualsManager::visualsFor ( const DtSimulationModelSet ) const
virtual

If exists, returns the visuals for the given SMS.

virtual Visuals* makVrf::DtVrfVisualsManager::visualsFor ( const DtSimulationModelSet )
virtual
virtual Visuals* makVrf::DtVrfVisualsManager::visualsFor ( const std::string &  )
virtual
virtual const Visuals* makVrf::DtVrfVisualsManager::visualsFor ( const std::string &  ) const
virtual
virtual makVrv::DtElementDefinitionTypeManager::BuiltInElementTypes makVrf::DtVrfVisualsManager::elementTypeFor ( const DtEntityType &  )
virtual

Given the entity type, return the element manager dictionary type that supports it.

virtual void makVrf::DtVrfVisualsManager::mergeVisualsIntoSystemVisuals ( const Visuals )
virtual

Merges ths visuals supplied into the system visuals.

virtual void makVrf::DtVrfVisualsManager::pruneFromSystemVisuals ( const Visuals )
virtual

Prunes from system viasuals the visuals supplied.

virtual void makVrf::DtVrfVisualsManager::merge ( const DtEntityType &  ,
const Visuals ,
bool  toSystem = true 
)
virtual

Merges visuals into this visual set for the given type from the supplied visuals. If toSystem us true will also add to system visuals.

virtual bool makVrf::DtVrfVisualsManager::saveSystemVisualsAsAppData ( const DtFilename &  directory,
bool  saveHierarchyData = true 
)
virtual

Saves system visuals into app data structure, assuming vrfGui as the settings directory, unless the stealth directory is found under appData, in which case that will be used.

virtual void makVrf::DtVrfVisualsManager::createSpotReportDefinitionFor ( const DtEntityType &  )
virtual

Finds the visuals for the type and adds a spot report entry (if one does not exist) based on the 2D model set definition of that type.

virtual bool makVrf::DtVrfVisualsManager::updateAndAddMatchTypeVisuals ( const DtEntityType &  sourceType,
const DtEntityType &  matchType,
bool  andSystem = true 
)
virtual

Given the source type, if a mapping for that source type exists add it also for the match type.

This is for mapping types only. If andSystem is true also installs into system. Returns true if added

virtual void makVrf::DtVrfVisualsManager::updateVisualsFor ( const DtEntityType &  )
virtual

Finds the visuals and updates the visuals into the system visuals.

virtual void makVrf::DtVrfVisualsManager::removeVisualsFor ( const DtEntityType &  ,
bool  andSystem = true 
)
virtual

Removes the visuals for the given entity type.

If fromSystem is true also removes from system. Since there is no reference count on the usage of the modelDefinition that might be used in an element, that will not be removed. Only the mapping and element definition will be removed

virtual bool makVrf::DtVrfVisualsManager::removeMappingsFor ( const DtEntityType &  ,
bool  andSystem = true 
)
virtual

Simply removes the mapping for the given type. If andSystem is true also removes from system. Returns true if removed.

virtual void makVrf::DtVrfVisualsManager::removeElementDefinition ( const DtEntityType &  ,
bool  andSystem = true 
)
virtual

Just removes the element definition for the entity type. If andSystem is true also removes from system.

virtual Visuals* makVrf::DtVrfVisualsManager::visualsFor ( const DtEntityType &  )
virtual

Returns the Visuals that contains the exact mapper key. If no visuals exist then it will return 0.

virtual void makVrf::DtVrfVisualsManager::setDefaultVisuals ( const std::string &  )
virtual

Sets the visuals to use when no other visuals can be mapped. This should be the filename() of the simulation model set.

const std::string& makVrf::DtVrfVisualsManager::defaultVisuals ( ) const
virtual void makVrf::DtVrfVisualsManager::setCoreRootName ( const std::string &  )
virtual

The root name of the core files. Default is "core".

virtual const std::string& makVrf::DtVrfVisualsManager::coreRootName ( ) const
virtual
virtual void makVrf::DtVrfVisualsManager::resetStartupCounts ( makVrv::DtElementDefinitionTypeManager::BuiltInElementTypes  )
virtual
Visuals* makVrf::DtVrfVisualsManager::systemDefaulVisuals ( ) const
inline
virtual void makVrf::DtVrfVisualsManager::initializeSystemVisuals ( const DtFilename &  definitionsDir = DtFilename::nullFilename(),
bool  andInstall = true,
bool  setupSpotReports = true 
)
virtual

Initialize mappers, visual defs and model defs for system visuals (as exists in appData or as supplied on command line)

virtual void makVrf::DtVrfVisualsManager::setupAdditionalTacticalGraphicsVisualizers ( )
protectedvirtual

Set up any additional visualizers VR-Forces needs, for example, sceeario events.

virtual void makVrf::DtVrfVisualsManager::setupNavigationAreaVisualizer ( )
protectedvirtual

Set up any necessary navigation area visualizer.

virtual void makVrf::DtVrfVisualsManager::setupBoundingVolumes ( )
protectedvirtual

Sets up bounding volumes for entities.

virtual void makVrf::DtVrfVisualsManager::setupObjectConsoleWarngForTacticalGraphics ( )
protectedvirtual

Sets up object console warning visualizer for tactical graphics.

virtual void makVrf::DtVrfVisualsManager::setupBoundingVolumes ( const std::string &  root)
protectedvirtual

Sets up the bounding volumes to be under a particular root node.

virtual void makVrf::DtVrfVisualsManager::setupRangeRings ( )
protectedvirtual

Sets up range ring items.

virtual void makVrf::DtVrfVisualsManager::addRangeRingsFor ( int  managerType)
protectedvirtual
virtual void makVrf::DtVrfVisualsManager::setupSensorContactLines ( )
protectedvirtual

Sets up sensor contact kines.

virtual void makVrf::DtVrfVisualsManager::addSensorContactLinesFor ( int  managerType)
protectedvirtual
virtual void makVrf::DtVrfVisualsManager::setupAdditionalAggregateVisualizers ( )
protectedvirtual

Member Data Documentation

makVrv::DtDe& makVrf::DtVrfVisualsManager::myDe
protected
Visuals* makVrf::DtVrfVisualsManager::mySystemDefaultVisuals
protected
SimulationModelSetVisuals makVrf::DtVrfVisualsManager::mySimulationModelSetVisuals
protected
bool makVrf::DtVrfVisualsManager::myUseNewSystemDataStructure
protected
std::string makVrf::DtVrfVisualsManager::myDefaultVisuals
protected
std::string makVrf::DtVrfVisualsManager::myCoreRootName
protected
std::set<DtFilename> makVrf::DtVrfVisualsManager::mySystemVisuals
protected
std::set<makVrv::DtUnicode> makVrf::DtVrfVisualsManager::myUnknowns
protected

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

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)