VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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 | Static Protected Attributes | Friends
makVrf::DtSharedModelSet Class Reference

Shared information about the current model set and entities/platforms that are available to it.

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

Classes

class  AdditionalKey
 
struct  ObjectTypeAndLabel
 
struct  PlatformStruct
 
class  WriteSettingsLock
 

Public Types

typedef std::pair< DtString,
unsigned > 
EquipmentTypeCountPair
 
typedef std::multimap
< EquipmentTypeCountPair,
ObjectTypeAndLabel > 
EquipmentTypeMap
 

Public Member Functions

virtual ~DtSharedModelSet () override
 
virtual void setModelSet (DtModelSet *)
 
virtual void clearModelSet ()
 
virtual std::string sidc (DtModelSetEntry *entry)
 
virtual void setSidc (DtModelSetEntry *, const std::string &)
 
virtual bool hasSystemNamed (DtModelSetEntry *, const DtString &name)
 
virtual bool load (const DtFilename &, std::set< DtString > &iconLists, bool signal=false)
 
virtual void setVariableBindings (const DtRwVariableBindings *)
 
const DtVariableBindingsSharedPtr & variableBindings () const
 
virtual void setSimulationModelSets (const std::vector< DtSimulationModelSet * > &sets)
 
virtual const std::vector
< DtSimulationModelSet * > & 
simulationModelSets () const
 
virtual void setSearchPaths (const DtReaderWriter::SearchPaths &)
 
const DtReaderWriter::SearchPaths & searchPaths () const
 
virtual void addSimulationObjectGroupModelSetEntry (DtSimulationObjectGroupModelSetEntry *entry)
 
virtual
DtSimulationObjectGroupModelSetEntry 
findSimulationObjectGroup (const std::string &sogName) const
 
virtual void getSupportPoints (const DtEntityType &et, DtVector &left, DtVector &right, DtVector &other)
 
virtual std::string getNavDataPath (const DtEntityType &et)
 
virtual Dt3dBoundingVolume getBoundingVolume (const DtEntityMapperKey &et)
 
virtual double getMaximumSpeed (const DtEntityType &et)
 
virtual double getMinimumSpeed (const DtEntityType &et)
 
virtual double getDefaultOrderedSpeed (const DtEntityType &et)
 
virtual double getMaximumAcceleration (const DtEntityType &et)
 
virtual double getMaximumDeceleration (const DtEntityType &et)
 
virtual bool loadFromDataFiles (const DtFilename &entities, const DtFilename &platforms, std::set< DtString > &iconLists, bool signal=true, DtModelSet *preloadModelSet=0)
 
virtual void mergeFavorites (const DtModelSet *f)
 
virtual bool hasComponentDescriptor (const DtEntityMapperKey &, const DtString &type)
 
virtual std::vector
< DtComponentDescriptor * > 
componentDescriptorsFrom (const DtEntityMapperKey &, const DtString &type)
 
virtual DtEntityType nameToType (const DtString &) const
 
virtual DtModelSetEntry * modelSetEntry (const DtEntityMapperKey &key) const
 
virtual std::string additionalKeywords (const DtEntityMapperKey &) const
 
virtual void setAdditionalKeywords (const DtEntityMapperKey &, const std::string &, bool replace=false)
 
virtual DtModelSetEntry * exactModelSetEntry (const DtEntityMapperKey &key) const
 
virtual bool canHoldSubordinates (const DtEntityMapperKey &key) const
 
virtual DtModelSetEntry * addModelSetEntry (const DtString &label, const DtEntityMapperKey &, const DtRwNLengthStringVector &cats)
 
virtual void removeModelSetEntry (const DtEntityMapperKey &e)
 
virtual std::string nameFor (const DtEntityMapperKey &) const
 
virtual std::string keywordsFor (const DtEntityMapperKey &) const
 
virtual DtModelSet * modelSet () const
 
virtual void statePropertiesFor (const DtEntityType &, DtRwProperties &) const
 
virtual void parameterPropertiesFor (const DtEntityType &, DtRwProperties &)
 
virtual void statePropertiesForPlatform (const DtString &, DtRwProperties &) const
 
virtual void parameterPropertiesForPlatform (const DtString &, DtRwProperties &) const
 
virtual void parameterPropertiesFor (const std::set< DtSimObjectReference > &states, DtRwProperties &)
 
virtual void parameterPropertiesFor (const std::set< const makVrf::DtStateDataWrapper * > &states, DtRwProperties &)
 
virtual std::shared_ptr
< DtReaderWriter > 
rwProperty (const DtEntityType &, const std::string &prop) const
 
bool addStateProperty (const DtEntityType &key, DtPropertyInterface *prop) const
 
virtual void loadPlatforms (const DtString &)
 
virtual void clearPlatforms ()
 
virtual DtRwDIGuyCharacterInfo getDIGuyCharacterInformation (const DtEntityMapperKey &)
 
virtual DtVrfObjectParameters * lookupParametersFor (DtModelSetEntry *entry)
 
virtual DtVrfObjectParameters * lookupParametersFor (const DtEntityType &)
 
virtual DtEntityType nextAvailableSimulationObjectGroupObjectType () const
 
virtual bool enabledRadarCoverageDescriptors (const DtEntityMapperKey &, std::vector< DtObjectSensorDescriptor * > &)
 
virtual EquipmentTypeMap baseEquipment (const DtEntityType &)
 
virtual void signalLoaded ()
 
- Public Member Functions inherited from makVrv::DtSharedSettings
 DtSharedSettings (const DtSharedSettingsManager &manager)
 
virtual ~DtSharedSettings ()
 
boost::shared_mutex & mutex ()
 
virtual const DtSettingsBackup * settingsBackup () const
 
virtual DtSettingsBackup * settingsBackup ()
 
virtual void backup ()
 
virtual std::vector
< std::function< void()> > & 
eventSignalsToEmit ()
 
virtual const std::vector
< std::function< void()> > & 
eventSignalsToEmit () const
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Static Public Member Functions

static std::string className ()
 

Protected Types

typedef std::map< std::string,
std::shared_ptr
< DtReaderWriter > > 
PropertiesMap
 
typedef std::map< DtString,
PlatformStruct > 
PlatformsMap
 
typedef std::map
< DtModelSetEntry
*, std::string > 
Sidcs
 
typedef std::map
< DtModelSetEntry
*, DtVrfObjectParameters * > 
ParameterData
 
typedef DtOrderedKeyList
< AdditionalKey * > 
AdditionalKeywords
 

Protected Member Functions

 DtSharedModelSet (makVrv::DtSharedSettingsManager &)
 
virtual
PlatformsMap::const_iterator 
availablePlatform (const DtString &str) const
 
virtual void clearSimulationModelSets ()
 

Protected Attributes

DtModelSet * myModelSet
 
PlatformsMap myAvailablePlatforms
 
Sidcs mySidcs
 
tbb::spin_mutex theAvailablePlatformMutex
 
ParameterData myParameterData
 
DtReaderWriter::SearchPaths mySearchPaths
 
AdditionalKeywords myAdditionalKeywords
 
std::vector
< DtSimulationModelSet * > 
mySimulationModelSets
 
DtVariableBindingsSharedPtr myVariableBindings
 
- Protected Attributes inherited from makVrv::DtSharedSettings
const DtSharedSettingsManager & myManager
 
boost::shared_mutex myMutex
 
std::vector< std::function
< void()> > 
myEventSignalsToEmit
 

Static Protected Attributes

static std::mutex theSafetyMutex
 

Friends

class makVrv::DtReadSettingsLock< DtSharedModelSet >
 
class makVrv::DtWriteSettingsLock< DtSharedModelSet >
 
class makVrv::DtSharedSettingsManager
 

Member Typedef Documentation

typedef std::map<std::string, std::shared_ptr<DtReaderWriter> > makVrf::DtSharedModelSet::PropertiesMap
protected
typedef std::map<DtModelSetEntry*, std::string> makVrf::DtSharedModelSet::Sidcs
protected

Constructor & Destructor Documentation

virtual makVrf::DtSharedModelSet::~DtSharedModelSet ( )
overridevirtual

DTOR.

makVrf::DtSharedModelSet::DtSharedModelSet ( makVrv::DtSharedSettingsManager &  )
protected

Member Function Documentation

static std::string makVrf::DtSharedModelSet::className ( )
static

Get an instance of the settings object. Also protected, use the DtReadSettingsLock and DtWriteSettingsLock to access the object.

virtual void makVrf::DtSharedModelSet::setModelSet ( DtModelSet *  )
virtual

Sets the model set into this manager. Replaces existing model set.

virtual void makVrf::DtSharedModelSet::clearModelSet ( )
virtual

Creates a new model set.

virtual std::string makVrf::DtSharedModelSet::sidc ( DtModelSetEntry *  entry)
virtual

Because Sidc codes are in the .entity file and the parameter loading is a lengthy operation, this routine will parse the .entity file's XML to see if it has an symbol-id variable and use that instead of loading the whole file.

virtual void makVrf::DtSharedModelSet::setSidc ( DtModelSetEntry *  ,
const std::string &   
)
virtual
virtual bool makVrf::DtSharedModelSet::hasSystemNamed ( DtModelSetEntry *  ,
const DtString &  name 
)
virtual

Returns true if there is a system with the "systemName" parameter of name.

virtual bool makVrf::DtSharedModelSet::load ( const DtFilename &  ,
std::set< DtString > &  iconLists,
bool  signal = false 
)
virtual

Loads model set from file.

virtual void makVrf::DtSharedModelSet::setVariableBindings ( const DtRwVariableBindings *  )
virtual

Sets variable bindings to be used for future reads of the platforms and files. Once set these are duplicated and then owned by this class. When reset the original bindings are destroyed.

const DtVariableBindingsSharedPtr& makVrf::DtSharedModelSet::variableBindings ( ) const
inline
virtual void makVrf::DtSharedModelSet::setSimulationModelSets ( const std::vector< DtSimulationModelSet * > &  sets)
virtual
virtual const std::vector<DtSimulationModelSet*>& makVrf::DtSharedModelSet::simulationModelSets ( ) const
virtual
virtual void makVrf::DtSharedModelSet::setSearchPaths ( const DtReaderWriter::SearchPaths &  )
virtual

And the search paths to use for entity file loads.

const DtReaderWriter::SearchPaths& makVrf::DtSharedModelSet::searchPaths ( ) const
inline
virtual void makVrf::DtSharedModelSet::addSimulationObjectGroupModelSetEntry ( DtSimulationObjectGroupModelSetEntry *  entry)
virtual

Adds a new simulation object group model set entry. Will take ownership of this passed in memory so do not delete. If entry does not have a valid simulation object group object type will assign it.

virtual DtSimulationObjectGroupModelSetEntry makVrf::DtSharedModelSet::findSimulationObjectGroup ( const std::string &  sogName) const
virtual

Returns the entry that has a filename which references the given simulation object group.

virtual void makVrf::DtSharedModelSet::getSupportPoints ( const DtEntityType &  et,
DtVector &  left,
DtVector &  right,
DtVector &  other 
)
virtual

Gets the support points of the object.

virtual std::string makVrf::DtSharedModelSet::getNavDataPath ( const DtEntityType &  et)
virtual
virtual Dt3dBoundingVolume makVrf::DtSharedModelSet::getBoundingVolume ( const DtEntityMapperKey &  et)
virtual

Returns the bounding volume of the given entity.

virtual double makVrf::DtSharedModelSet::getMaximumSpeed ( const DtEntityType &  et)
virtual

Returns the maximum movement speed (in m/s) of the given entity type.

virtual double makVrf::DtSharedModelSet::getMinimumSpeed ( const DtEntityType &  et)
virtual

Returns the minimum movement speed (in m/s) of the given entity type. Only applicable to fixed wing aircraft.

virtual double makVrf::DtSharedModelSet::getDefaultOrderedSpeed ( const DtEntityType &  et)
virtual

Returns the default ordered movement speed (in m/s) of the given entity type.

virtual double makVrf::DtSharedModelSet::getMaximumAcceleration ( const DtEntityType &  et)
virtual

Returns the maximum acceleration (in m/s^2) of the given entity type.

virtual double makVrf::DtSharedModelSet::getMaximumDeceleration ( const DtEntityType &  et)
virtual

Returns the maximum deceleration (in m/s^2) of the given entity type.

virtual bool makVrf::DtSharedModelSet::loadFromDataFiles ( const DtFilename &  entities,
const DtFilename &  platforms,
std::set< DtString > &  iconLists,
bool  signal = true,
DtModelSet *  preloadModelSet = 0 
)
virtual

Loads models from data files in given directory for entities and platforms.

virtual void makVrf::DtSharedModelSet::mergeFavorites ( const DtModelSet *  f)
virtual

Merges favorites into this model set.

virtual bool makVrf::DtSharedModelSet::hasComponentDescriptor ( const DtEntityMapperKey &  ,
const DtString &  type 
)
virtual

Returns true if there are any component descriptors of the given types available.

virtual std::vector<DtComponentDescriptor*> makVrf::DtSharedModelSet::componentDescriptorsFrom ( const DtEntityMapperKey &  ,
const DtString &  type 
)
virtual

Returns true if there are any component descriptors of the given types available.

virtual DtEntityType makVrf::DtSharedModelSet::nameToType ( const DtString &  ) const
virtual

Give a label return the entity type that has an exact match (case included) for that label.

virtual DtModelSetEntry* makVrf::DtSharedModelSet::modelSetEntry ( const DtEntityMapperKey &  key) const
virtual

Find exactly or by matching pattern.

virtual std::string makVrf::DtSharedModelSet::additionalKeywords ( const DtEntityMapperKey &  ) const
virtual

Set/get additional keywords that will be used with the given entity mapper key (exact match). If replace is false then the keywords will be appended to the current keywords.

virtual void makVrf::DtSharedModelSet::setAdditionalKeywords ( const DtEntityMapperKey &  ,
const std::string &  ,
bool  replace = false 
)
virtual
virtual DtModelSetEntry* makVrf::DtSharedModelSet::exactModelSetEntry ( const DtEntityMapperKey &  key) const
virtual

Find exactly only.

virtual bool makVrf::DtSharedModelSet::canHoldSubordinates ( const DtEntityMapperKey &  key) const
virtual

Returns true if the given type has the ability to contain subordinates.

virtual DtModelSetEntry* makVrf::DtSharedModelSet::addModelSetEntry ( const DtString &  label,
const DtEntityMapperKey &  ,
const DtRwNLengthStringVector &  cats 
)
virtual

Add a new model set entry.

virtual void makVrf::DtSharedModelSet::removeModelSetEntry ( const DtEntityMapperKey &  e)
virtual

Removes the model set entry.

virtual std::string makVrf::DtSharedModelSet::nameFor ( const DtEntityMapperKey &  ) const
virtual

Returns the name of the item. Blank if none.

virtual std::string makVrf::DtSharedModelSet::keywordsFor ( const DtEntityMapperKey &  ) const
virtual

Returns the keywords of the item. Blank if none.

virtual DtModelSet* makVrf::DtSharedModelSet::modelSet ( ) const
virtual

Returns the model set.

virtual void makVrf::DtSharedModelSet::statePropertiesFor ( const DtEntityType &  ,
DtRwProperties &   
) const
virtual

If there are state properties in the .ope file referenced by this entity, return them.

virtual void makVrf::DtSharedModelSet::parameterPropertiesFor ( const DtEntityType &  ,
DtRwProperties &   
)
virtual

If there is parameter properties in the .ope file referenced by this entity, return them.

virtual void makVrf::DtSharedModelSet::statePropertiesForPlatform ( const DtString &  ,
DtRwProperties &   
) const
virtual

If there are state properties in the .ope file referenced by this platform.

virtual void makVrf::DtSharedModelSet::parameterPropertiesForPlatform ( const DtString &  ,
DtRwProperties &   
) const
virtual

If there is parameter properties in the .ope file referenced by this platform.

virtual void makVrf::DtSharedModelSet::parameterPropertiesFor ( const std::set< DtSimObjectReference > &  states,
DtRwProperties &   
)
virtual

Given the states, return a total of all the parameter properties for numerical items found within. Boolean and string values that have the same value will be kept. Those that have differing values will be marked as read only.

virtual void makVrf::DtSharedModelSet::parameterPropertiesFor ( const std::set< const makVrf::DtStateDataWrapper * > &  states,
DtRwProperties &   
)
virtual
virtual std::shared_ptr<DtReaderWriter> makVrf::DtSharedModelSet::rwProperty ( const DtEntityType &  ,
const std::string &  prop 
) const
virtual

Returns the property for the given item.

bool makVrf::DtSharedModelSet::addStateProperty ( const DtEntityType &  key,
DtPropertyInterface *  prop 
) const

Adds a new state property dynamically. Will then listen for updates for this property that may come in over the network.

virtual void makVrf::DtSharedModelSet::loadPlatforms ( const DtString &  )
virtual

Loads platforms from the given directory.

virtual void makVrf::DtSharedModelSet::clearPlatforms ( )
virtual

Clears out all platforms.

virtual DtRwDIGuyCharacterInfo makVrf::DtSharedModelSet::getDIGuyCharacterInformation ( const DtEntityMapperKey &  )
virtual

Gets the DI Guy Character information (if it exists) for the specified entity.

virtual DtVrfObjectParameters* makVrf::DtSharedModelSet::lookupParametersFor ( DtModelSetEntry *  entry)
virtual

Looks up parameter entry.

virtual DtVrfObjectParameters* makVrf::DtSharedModelSet::lookupParametersFor ( const DtEntityType &  )
virtual
virtual DtEntityType makVrf::DtSharedModelSet::nextAvailableSimulationObjectGroupObjectType ( ) const
virtual

Returns the next object type that can be used for the simulation object group model set entry.

virtual bool makVrf::DtSharedModelSet::enabledRadarCoverageDescriptors ( const DtEntityMapperKey &  ,
std::vector< DtObjectSensorDescriptor * > &   
)
virtual

Returns sensor fan enabled sensors that are part of this entity type.

virtual EquipmentTypeMap makVrf::DtSharedModelSet::baseEquipment ( const DtEntityType &  )
virtual
virtual void makVrf::DtSharedModelSet::signalLoaded ( )
virtual
virtual PlatformsMap::const_iterator makVrf::DtSharedModelSet::availablePlatform ( const DtString &  str) const
protectedvirtual

If the entry is not loaded will lock and load the available platform.

virtual void makVrf::DtSharedModelSet::clearSimulationModelSets ( )
protectedvirtual

Friends And Related Function Documentation

Also protected, use the DtReadSettingsLock and DtWriteSettingsLock to access the object.

friend class makVrv::DtSharedSettingsManager
friend

Member Data Documentation

DtModelSet* makVrf::DtSharedModelSet::myModelSet
protected
PlatformsMap makVrf::DtSharedModelSet::myAvailablePlatforms
mutableprotected
Sidcs makVrf::DtSharedModelSet::mySidcs
protected
tbb::spin_mutex makVrf::DtSharedModelSet::theAvailablePlatformMutex
mutableprotected
ParameterData makVrf::DtSharedModelSet::myParameterData
protected

Parameter data is mutable so that we can cache retrieved data in paramegerDataFor().

DtReaderWriter::SearchPaths makVrf::DtSharedModelSet::mySearchPaths
protected
AdditionalKeywords makVrf::DtSharedModelSet::myAdditionalKeywords
protected
std::vector<DtSimulationModelSet*> makVrf::DtSharedModelSet::mySimulationModelSets
protected
DtVariableBindingsSharedPtr makVrf::DtSharedModelSet::myVariableBindings
protected
std::mutex makVrf::DtSharedModelSet::theSafetyMutex
staticprotected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)