![]() |
VR-Forces 5.0.1 Developer's Guide
|
The DtVrfModelSetManager class is the main entry point to find parameter data for objects in the simulation. When the simulation model set is loaded, or, a new simulation model set set on the network, this class will be used to load the simulation model set and all .entity files in all simulation model sets included. It will use the makVrf::DtSharedModelSet class to store the actual information. The shared model set class is used in both the main thread and the network thread to query parameter information for an entity type. You can either use the makVrv::DtReadSettingsLock around the makVrf::DtSharedModelSet to query for information (in the network thread), or, in the main thread, use this class to query the information requested for parameter data.

Public Member Functions | |
| DtVrfModelSetManager (makVrv::DtDe &) | |
| virtual | ~DtVrfModelSetManager () |
| virtual void | setVariableBindings (const DtRwVariableBindings *) |
| virtual void | setSearchPaths (const DtReaderWriter::SearchPaths &) |
| virtual bool | load (const std::string &, bool reset=true, bool signal=true) |
| virtual QString | parameterTranslation (const DtString &name) const |
| virtual bool | loadFromDirectory (const std::string &dataDirectory, const std::string &guiDirectory, const std::string &platformsDirectory, bool reset=true, bool signal=true, bool preloadParameters=false) |
| virtual DtModelSetEntry * | modelSetEntry (const DtEntityMapperKey &key) const |
| virtual bool | canHoldSubordinates (const DtEntityMapperKey &key) const |
| virtual std::vector< DtFilename > | searchPaths () const |
| virtual std::vector< DtObjectType > | subordinateObjects (const DtEntityMapperKey &) const |
| virtual bool | isRandomized (const DtEntityMapperKey &) const |
| virtual bool | hasComponentDescriptor (const DtEntityMapperKey &, const DtString &type) |
| virtual DtModelSetEntry * | exactModelSetEntry (const DtEntityMapperKey &key) const |
| virtual void | getSupportPoints (const DtEntityType &et, DtVector &left, DtVector &right, DtVector &other) |
| virtual Dt3dBoundingVolume | getBoundingVolume (const DtEntityMapperKey &et) |
| virtual DtEntityType | nameToType (const DtString &) const |
| virtual DtFilename | iconForList (const DtEntityType &, const DtString &list) const |
| virtual bool | isFavorite (const DtEntityMapperKey &key, int force) const |
| virtual std::set< DtString > | categories () const |
| virtual std::set< DtString > | categoriesForPalette (const DtString &palette) const |
| virtual DtModelSetEntry * | findByLabel (const DtString &) const |
| virtual DtModelSetEntry * | addModelSetEntry (const DtString &label, const DtEntityMapperKey &, const DtRwNLengthStringVector &cats) |
| virtual std::vector< DtString > | taskGroupsForTask (const DtEntityType &key, const DtSimTaskMessageType &) const |
| virtual void | addSimulationObjectGroupModelSetEntry (DtSimulationObjectGroupModelSetEntry *entry) |
| virtual DtSimulationObjectGroupModelSetEntry | findSimulationObjectGroup (const std::string &sogName) const |
| virtual DtObjectType | nextAvailableSimulationObjectGroupObjectType () const |
| virtual void | removeModelSetEntry (const DtEntityMapperKey &e) |
| virtual std::string | nameFor (const DtEntityMapperKey &) const |
| virtual std::string | keywordsFor (const DtEntityMapperKey &) const |
| virtual bool | canEmbedIntoTerrain (const DtEntityMapperKey &) const |
| virtual bool | canEmbark (const DtEntityMapperKey &) const |
| virtual bool | canAttachTo (const DtEntityMapperKey &) const |
| virtual bool | canEmbarkUpon (const DtEntityMapperKey &) const |
| virtual bool | organized (const DtEntityMapperKey &) const |
| virtual std::string | additionalKeywords (const DtEntityMapperKey &) const |
| virtual void | setAdditionalKeywords (const DtEntityMapperKey &, const std::string &, bool replace=false) |
| virtual void | statePropertiesForPlatform (const DtString &, DtRwProperties &) const |
| virtual void | parameterPropertiesForPlatform (const DtString &, DtRwProperties &) const |
| virtual void | statePropertiesFor (const DtEntityType &, DtRwProperties &) const |
| virtual void | parameterPropertiesFor (const DtEntityType &, DtRwProperties &) |
| template<class T > | |
| boost::optional< T > | parameterPropertyFor (const DtEntityMapperKey &e, const std::string &propertyName) const |
| virtual void | setModelSet (DtModelSet *) |
| virtual void | setFavorite (const DtEntityMapperKey &key, bool b) |
| virtual DtModelSet * | loadFavoritesFor (const std::string &) |
| virtual void | mergeFavoritesInto (DtModelSet *favorite, DtModelSet *modelSet) |
| virtual void | mergeFavorites (DtModelSet *favorites) |
| virtual DtModelSetEntry * | favoriteFor (DtModelSetEntry *) const |
| virtual DtModelSet * | modelSet () |
| virtual DtModelSet | modelSet () const |
| virtual DtRwVisualMetaData | visualMetaData (const DtEntityType &) |
| void | setAutoSave (bool b) |
| bool | autoSave () const |
| virtual DtSharedModelSet::EquipmentTypeMap | baseEquipment (const DtObjectType &) |
| virtual bool | load (const DtScenarioExplorer &, bool=true) |
| virtual void | initializeCountries () |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtVrfModelSetManager & | instance (makVrv::DtDe &de) |
| static void | registerInstance (makVrv::DtDe &de, DtVrfModelSetManager *messager) |
Public Attributes | |
| boost::signals2::signal< void()> | signal_modelSetChanged |
Protected Types | |
| typedef std::map< std::string, DtModelSet * > | Favorites |
Protected Member Functions | |
| virtual void | clearModelSets () |
Protected Attributes | |
| makVrv::DtDe & | myDe |
| bool | myAutoSave |
| Favorites | myFavorites |
| DtModelSet * | myModelSet |
|
protected |
| makVrf::DtVrfModelSetManager::DtVrfModelSetManager | ( | makVrv::DtDe & | ) |
|
virtual |
|
static |
Returns instance of the messager.
Referenced by makVrf::DtSetStatePropertyDialog::setupGui().
|
static |
|
virtual |
Sets variable bindings to be used for future reads of the platforms and files. This will call down to the shared model set to set, so use that class to retrieve.
|
virtual |
And the search paths to use for entity file loads. This will call down to the shared model set to set, so, use that class (with appropriate locking) to retrieve.
|
virtual |
Loads model set file into model set and then signals loaded if successful.
|
virtual |
Returns the parameter name (from state or parameter data) translated.
|
virtual |
Loads the model set from the specified directory. This will scan for all .data files. The gui directory is needed for favorites.
|
virtual |
Find exactly or by matching pattern.
|
virtual |
Returns true if the given type has the ability to contain subordinates.
|
virtual |
The search paths used by the shared model set to load the parameter database.
|
virtual |
Returns the subodrinate objects of this model set entry.
|
virtual |
Returns true if this is a randomized model.
|
virtual |
Returns true if there are any component descriptors of the given types available.
|
virtual |
Find exactly only.
|
virtual |
Gets the support points of the object.
|
virtual |
Returns the bounding volume of the given entity.
|
virtual |
Give a label return the entity type that has an exact match (case included) for that label.
|
virtual |
Returns the path for the icon for the icon list for the entity type if it exists.
|
virtual |
Returns true if the item/force combination is a favorite.
|
virtual |
Returns all the categories contained in this model set.
|
virtual |
Returns all the categories contained in this model set for the given palette.
|
virtual |
Return the model set entry (if it exists) by the given label.
|
virtual |
Add a new model set entry.
|
virtual |
Looks up the task exclusion rules for the given entity and returns them.
|
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 |
Returns the entry that has a filename which references the given simulation object group.
|
virtual |
Returns the next object typ that can be used for the simulaton object group model set entry.
|
virtual |
Removes the model set entry.
|
virtual |
Returns the name of the item. Blank if none.
|
virtual |
Returns the keywords of the item. Blank if none.
|
virtual |
Returns true if this entity can embed into the terrain.
|
virtual |
Returns true if this entity can embark.
|
virtual |
Returns true if this entity can be attached to. By default only kind < 11 can be attached to.
|
virtual |
Returns true if this entity can be embarked upon.
|
virtual |
Returns whether or not this item is organized by default.
|
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 |
|
virtual |
Returns a copy of the state properties for the given platform, if it exists.
Referenced by makVrf::DtSetStatePropertyDialog::setupGui().
|
virtual |
Returns a copy of the parameter properties for the given platform, if it exists.
Referenced by makVrf::DtSetStatePropertyDialog::setupGui().
|
virtual |
If there are state properties in the .ope file referenced by this entity, return them.
Referenced by makVrf::DtSetStatePropertyDialog::setupGui().
|
virtual |
If there is parameter properties in the .ope file referenced by this entity, return them.
Referenced by makVrf::DtSetStatePropertyDialog::setupGui().
|
inline |
Returns the parameter property for the given entity type and property name. Return NULL object if property does not exist.
References makVrv::DtSharedSettingsManager::instance().
|
virtual |
Deletes current model set (if owned) and sets new model set. Does not take ownership.
|
virtual |
Sets the model set entry that matches the mapper key to be a favorite. If auto-save is true also saves out the model set file.
|
virtual |
Loads the favorites file for the given model set file. Assumes there is a file called favorites.mst in the ame directory referenced for the entity.mst file.
|
virtual |
Merges the favorites selection into the given model set. If there are no matching types no merge will occur for that type.
|
virtual |
Merge favorites into the shared model set.
|
virtual |
Returns the favorite that matched the model set entry.
|
virtual |
Returns a model set created from the shared model set.
|
virtual |
Returns a copy of the model set.
|
virtual |
Visual meta data for the given entity type.
Reimplemented in DtSimulationModelSetManager.
|
inline |
|
inline |
|
virtual |
Given a particular entity type, return all the Base-Primary-Equipment that the given entity type pattern has.
|
virtual |
Loads all the model sets from the scenario explorer.
|
virtual |
Reinitializes countries and adds any countries that are not present in the country list.
|
protectedvirtual |
Clears out all loaded model sets.
| boost::signals2::signal<void ()> makVrf::DtVrfModelSetManager::signal_modelSetChanged |
|
protected |
|
protected |
|
protected |
|
protected |