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 | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes
makVrf::DtVrfModelSetManager Class Reference

The Master Scenario Settings Dialog. More...

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

Public Member Functions

 DtVrfModelSetManager (makVrv::DtDe &)
 
virtual ~DtVrfModelSetManager ()
 
virtual void setVariableBindings (const DtRwVariableBindings *)
 Sets variable bindings to be used for future reads of the platforms and files. More...
 
virtual void setSearchPaths (const DtReaderWriter::SearchPaths &)
 And the search paths to use for entity file loads. More...
 
virtual bool load (const std::string &, bool reset=true, bool signal=true)
 Loads model set file into model set and then signals loaded if successful. More...
 
virtual QString parameterTranslation (const DtString &name) const
 Returns the parameter name (from state or parameter data) translated. More...
 
virtual bool loadFromDirectory (const std::string &dataDirectory, const std::string &guiDirectory, const std::string &platformsDirectory, bool reset=true, bool signal=true, bool preloadParameters=false)
 Loads the model set from the specified directory. More...
 
virtual DtModelSetEntrymodelSetEntry (const DtEntityMapperKey &key) const
 Find exactly or by matching pattern. More...
 
virtual bool canHoldSubordinates (const DtEntityMapperKey &key) const
 Returns true if the given type has the ability to contain subordinates. More...
 
virtual std::vector< DtObjectTypesubordinateObjects (const DtEntityMapperKey &) const
 Returns the subodrinate objects of this model set entry. More...
 
virtual bool isRandomized (const DtEntityMapperKey &) const
 Returns true if this is a randomized model. More...
 
virtual bool hasComponentDescriptor (const DtEntityMapperKey &, const DtString &type)
 Returns true if there are any component descriptors of the given types available. More...
 
virtual DtModelSetEntryexactModelSetEntry (const DtEntityMapperKey &key) const
 Find exactly only. More...
 
virtual void getSupportPoints (const DtEntityType &et, DtVector &left, DtVector &right, DtVector &other)
 Gets the support points of the object. More...
 
virtual Dt3dBoundingVolume getBoundingVolume (const DtEntityMapperKey &et)
 Returns the bounding volume of the given entity. More...
 
virtual DtEntityType nameToType (const DtString &) const
 Give a label return the entity type that has an exact match (case included) for that label. More...
 
virtual DtFilename iconForList (const DtEntityType &, const DtString &list) const
 Returns the path for the icon for the icon list for the entity type if it exists. More...
 
virtual bool isFavorite (const DtEntityMapperKey &key, int force) const
 Returns true if the item/force combination is a favorite. More...
 
virtual std::set< DtStringcategories () const
 Returns all the categories contained in this model set. More...
 
virtual std::set< DtStringcategoriesForPalette (const DtString &palette) const
 Returns all the categories contained in this model set for the given palette. More...
 
virtual DtModelSetEntryfindByLabel (const DtString &) const
 Return the model set entry (if it exists) by the given label. More...
 
virtual DtModelSetEntryaddModelSetEntry (const DtString &label, const DtEntityMapperKey &, const DtRwNLengthStringVector &cats)
 Add a new model set entry. More...
 
virtual std::vector< DtStringtaskGroupsForTask (const DtEntityType &key, const DtSimTaskMessageType &) const
 Looks up the task exclusion rules for the given entity and returns them. More...
 
virtual void addSimulationObjectGroupModelSetEntry (DtSimulationObjectGroupModelSetEntry *entry)
 Adds a new simulation object group model set entry. More...
 
virtual
DtSimulationObjectGroupModelSetEntry 
findSimulationObjectGroup (const std::string &sogName) const
 Returns the entry that has a filename which references the given simulation object group. More...
 
virtual DtObjectType nextAvailableSimulationObjectGroupObjectType () const
 Returns the next object typ that can be used for the simulaton object group model set entry. More...
 
virtual void removeModelSetEntry (const DtEntityMapperKey &e)
 Removes the model set entry. More...
 
virtual std::string nameFor (const DtEntityMapperKey &) const
 Returns the name of the item. Blank if none. More...
 
virtual std::string keywordsFor (const DtEntityMapperKey &) const
 Returns the keywords of the item. Blank if none. More...
 
virtual bool canEmbedIntoTerrain (const DtEntityMapperKey &) const
 Returns true if this entity can embed into the terrain. More...
 
virtual bool canEmbark (const DtEntityMapperKey &) const
 Returns true if this entity can embark. More...
 
virtual bool canAttachTo (const DtEntityMapperKey &) const
 Returns true if this entity can be attached to. By default only kind < 11 can be attached to. More...
 
virtual bool canEmbarkUpon (const DtEntityMapperKey &) const
 Returns true if this entity can be embarked upon. More...
 
virtual bool organized (const DtEntityMapperKey &) const
 Returns whether or not this item is organized by default. More...
 
virtual std::string additionalKeywords (const DtEntityMapperKey &) const
 Set/get additional keywords that will be used with the given entity mapper key (exact match). More...
 
virtual void setAdditionalKeywords (const DtEntityMapperKey &, const std::string &, bool replace=false)
 
virtual void statePropertiesForPlatform (const DtString &, DtRwProperties &) const
 Returns a copy of the state properties for the given platform, if it exists. More...
 
virtual void parameterPropertiesForPlatform (const DtString &, DtRwProperties &) const
 Returns a copy of the parameter properties for the given platform, if it exists. More...
 
virtual void statePropertiesFor (const DtEntityType &, DtRwProperties &) const
 If there are state properties in the .ope file referenced by this entity, return them. More...
 
virtual void parameterPropertiesFor (const DtEntityType &, DtRwProperties &)
 If there is parameter properties in the .ope file referenced by this entity, return them. More...
 
template<class T >
boost::optional< T > parameterPropertyFor (const DtEntityMapperKey &e, const std::string &propertyName) const
 Returns the parameter property for the given entity type and property name. Return NULL object if property does not exist. More...
 
virtual void setModelSet (DtModelSet *)
 Deletes current model set (if owned) and sets new model set. More...
 
virtual void setFavorite (const DtEntityMapperKey &key, bool b)
 Sets the model set entry that matches the mapper key to be a favorite. More...
 
virtual DtModelSetloadFavoritesFor (const std::string &)
 Loads the favorites file for the given model set file. More...
 
virtual void mergeFavoritesInto (DtModelSet *favorite, DtModelSet *modelSet)
 Merges the favorites selection into the given model set. More...
 
virtual void mergeFavorites (DtModelSet *favorites)
 Merge favorites into the shared model set. More...
 
virtual DtModelSetEntryfavoriteFor (DtModelSetEntry *) const
 Returns the favorite that matched the model set entry. More...
 
virtual DtModelSetmodelSet ()
 Returns a model set created from the shared model set. More...
 
virtual DtModelSet modelSet () const
 Returns a copy of the model set. More...
 
virtual DtRwVisualMetaData visualMetaData (const DtEntityType &)
 Visual meta data for the given entity type. More...
 
void setAutoSave (bool b)
 
bool autoSave () const
 
virtual
DtSharedModelSet::EquipmentTypeMap 
baseEquipment (const DtObjectType &)
 Given a particular entity type, return all the Base-Primary-Equipment that the given entity type pattern has. More...
 
virtual bool load (const DtScenarioExplorer &, bool=true)
 Loads all the model sets from the scenario explorer. More...
 
virtual void initializeCountries ()
 Reinitializes countries and adds any countries that are not present in the country list. More...
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor. More...
 
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor. More...
 

Static Public Member Functions

static DtVrfModelSetManagerinstance (makVrv::DtDe &de)
 Returns instance of the messager. More...
 
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 ()
 Clears out all loaded model sets. More...
 

Protected Attributes

makVrv::DtDemyDe
 
bool myAutoSave
 
Favorites myFavorites
 
DtModelSetmyModelSet
 

Detailed Description

The Master Scenario Settings Dialog.

Member Typedef Documentation

typedef std::map<std::string, DtModelSet*> makVrf::DtVrfModelSetManager::Favorites
protected

Constructor & Destructor Documentation

makVrf::DtVrfModelSetManager::DtVrfModelSetManager ( makVrv::DtDe )
virtual makVrf::DtVrfModelSetManager::~DtVrfModelSetManager ( )
virtual

Member Function Documentation

static DtVrfModelSetManager& makVrf::DtVrfModelSetManager::instance ( makVrv::DtDe de)
static

Returns instance of the messager.

Referenced by makVrf::DtSetStatePropertyDialog::setupGui().

static void makVrf::DtVrfModelSetManager::registerInstance ( makVrv::DtDe de,
DtVrfModelSetManager messager 
)
static
virtual void makVrf::DtVrfModelSetManager::setVariableBindings ( const DtRwVariableBindings )
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 void makVrf::DtVrfModelSetManager::setSearchPaths ( const DtReaderWriter::SearchPaths )
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 bool makVrf::DtVrfModelSetManager::load ( const std::string &  ,
bool  reset = true,
bool  signal = true 
)
virtual

Loads model set file into model set and then signals loaded if successful.

virtual QString makVrf::DtVrfModelSetManager::parameterTranslation ( const DtString name) const
virtual

Returns the parameter name (from state or parameter data) translated.

virtual bool makVrf::DtVrfModelSetManager::loadFromDirectory ( const std::string &  dataDirectory,
const std::string &  guiDirectory,
const std::string &  platformsDirectory,
bool  reset = true,
bool  signal = true,
bool  preloadParameters = false 
)
virtual

Loads the model set from the specified directory.

This will scan for all .data files. The gui directory is needed for favorites

virtual DtModelSetEntry* makVrf::DtVrfModelSetManager::modelSetEntry ( const DtEntityMapperKey key) const
virtual

Find exactly or by matching pattern.

virtual bool makVrf::DtVrfModelSetManager::canHoldSubordinates ( const DtEntityMapperKey key) const
virtual

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

virtual std::vector<DtObjectType> makVrf::DtVrfModelSetManager::subordinateObjects ( const DtEntityMapperKey ) const
virtual

Returns the subodrinate objects of this model set entry.

virtual bool makVrf::DtVrfModelSetManager::isRandomized ( const DtEntityMapperKey ) const
virtual

Returns true if this is a randomized model.

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

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

virtual DtModelSetEntry* makVrf::DtVrfModelSetManager::exactModelSetEntry ( const DtEntityMapperKey key) const
virtual

Find exactly only.

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

Gets the support points of the object.

virtual Dt3dBoundingVolume makVrf::DtVrfModelSetManager::getBoundingVolume ( const DtEntityMapperKey et)
virtual

Returns the bounding volume of the given entity.

virtual DtEntityType makVrf::DtVrfModelSetManager::nameToType ( const DtString ) const
virtual

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

virtual DtFilename makVrf::DtVrfModelSetManager::iconForList ( const DtEntityType &  ,
const DtString list 
) const
virtual

Returns the path for the icon for the icon list for the entity type if it exists.

virtual bool makVrf::DtVrfModelSetManager::isFavorite ( const DtEntityMapperKey key,
int  force 
) const
virtual

Returns true if the item/force combination is a favorite.

virtual std::set<DtString> makVrf::DtVrfModelSetManager::categories ( ) const
virtual

Returns all the categories contained in this model set.

virtual std::set<DtString> makVrf::DtVrfModelSetManager::categoriesForPalette ( const DtString palette) const
virtual

Returns all the categories contained in this model set for the given palette.

virtual DtModelSetEntry* makVrf::DtVrfModelSetManager::findByLabel ( const DtString ) const
virtual

Return the model set entry (if it exists) by the given label.

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

Add a new model set entry.

virtual std::vector<DtString> makVrf::DtVrfModelSetManager::taskGroupsForTask ( const DtEntityType &  key,
const DtSimTaskMessageType  
) const
virtual

Looks up the task exclusion rules for the given entity and returns them.

virtual void makVrf::DtVrfModelSetManager::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::DtVrfModelSetManager::findSimulationObjectGroup ( const std::string &  sogName) const
virtual

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

virtual DtObjectType makVrf::DtVrfModelSetManager::nextAvailableSimulationObjectGroupObjectType ( ) const
virtual

Returns the next object typ that can be used for the simulaton object group model set entry.

virtual void makVrf::DtVrfModelSetManager::removeModelSetEntry ( const DtEntityMapperKey e)
virtual

Removes the model set entry.

virtual std::string makVrf::DtVrfModelSetManager::nameFor ( const DtEntityMapperKey ) const
virtual

Returns the name of the item. Blank if none.

virtual std::string makVrf::DtVrfModelSetManager::keywordsFor ( const DtEntityMapperKey ) const
virtual

Returns the keywords of the item. Blank if none.

virtual bool makVrf::DtVrfModelSetManager::canEmbedIntoTerrain ( const DtEntityMapperKey ) const
virtual

Returns true if this entity can embed into the terrain.

virtual bool makVrf::DtVrfModelSetManager::canEmbark ( const DtEntityMapperKey ) const
virtual

Returns true if this entity can embark.

virtual bool makVrf::DtVrfModelSetManager::canAttachTo ( const DtEntityMapperKey ) const
virtual

Returns true if this entity can be attached to. By default only kind < 11 can be attached to.

virtual bool makVrf::DtVrfModelSetManager::canEmbarkUpon ( const DtEntityMapperKey ) const
virtual

Returns true if this entity can be embarked upon.

virtual bool makVrf::DtVrfModelSetManager::organized ( const DtEntityMapperKey ) const
virtual

Returns whether or not this item is organized by default.

virtual std::string makVrf::DtVrfModelSetManager::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::DtVrfModelSetManager::setAdditionalKeywords ( const DtEntityMapperKey ,
const std::string &  ,
bool  replace = false 
)
virtual
virtual void makVrf::DtVrfModelSetManager::statePropertiesForPlatform ( const DtString ,
DtRwProperties  
) const
virtual

Returns a copy of the state properties for the given platform, if it exists.

Referenced by makVrf::DtSetStatePropertyDialog::setupGui().

virtual void makVrf::DtVrfModelSetManager::parameterPropertiesForPlatform ( const DtString ,
DtRwProperties  
) const
virtual

Returns a copy of the parameter properties for the given platform, if it exists.

Referenced by makVrf::DtSetStatePropertyDialog::setupGui().

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

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

Referenced by makVrf::DtSetStatePropertyDialog::setupGui().

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

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

Referenced by makVrf::DtSetStatePropertyDialog::setupGui().

template<class T >
boost::optional<T> makVrf::DtVrfModelSetManager::parameterPropertyFor ( const DtEntityMapperKey e,
const std::string &  propertyName 
) const
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 void makVrf::DtVrfModelSetManager::setModelSet ( DtModelSet )
virtual

Deletes current model set (if owned) and sets new model set.

Does not take ownership

virtual void makVrf::DtVrfModelSetManager::setFavorite ( const DtEntityMapperKey key,
bool  b 
)
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 DtModelSet* makVrf::DtVrfModelSetManager::loadFavoritesFor ( const std::string &  )
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 void makVrf::DtVrfModelSetManager::mergeFavoritesInto ( DtModelSet favorite,
DtModelSet modelSet 
)
virtual

Merges the favorites selection into the given model set.

If there are no matching types no merge will occur for that type

virtual void makVrf::DtVrfModelSetManager::mergeFavorites ( DtModelSet favorites)
virtual

Merge favorites into the shared model set.

virtual DtModelSetEntry* makVrf::DtVrfModelSetManager::favoriteFor ( DtModelSetEntry ) const
virtual

Returns the favorite that matched the model set entry.

virtual DtModelSet* makVrf::DtVrfModelSetManager::modelSet ( )
virtual

Returns a model set created from the shared model set.

virtual DtModelSet makVrf::DtVrfModelSetManager::modelSet ( ) const
virtual

Returns a copy of the model set.

virtual DtRwVisualMetaData makVrf::DtVrfModelSetManager::visualMetaData ( const DtEntityType &  )
virtual

Visual meta data for the given entity type.

Reimplemented in DtSimulationModelSetManager.

void makVrf::DtVrfModelSetManager::setAutoSave ( bool  b)
inline
bool makVrf::DtVrfModelSetManager::autoSave ( ) const
inline
virtual DtSharedModelSet::EquipmentTypeMap makVrf::DtVrfModelSetManager::baseEquipment ( const DtObjectType )
virtual

Given a particular entity type, return all the Base-Primary-Equipment that the given entity type pattern has.

virtual bool makVrf::DtVrfModelSetManager::load ( const DtScenarioExplorer ,
bool  = true 
)
virtual

Loads all the model sets from the scenario explorer.

virtual void makVrf::DtVrfModelSetManager::initializeCountries ( )
virtual

Reinitializes countries and adds any countries that are not present in the country list.

virtual void makVrf::DtVrfModelSetManager::clearModelSets ( )
protectedvirtual

Clears out all loaded model sets.

Member Data Documentation

boost::signals2::signal<void ()> makVrf::DtVrfModelSetManager::signal_modelSetChanged
makVrv::DtDe& makVrf::DtVrfModelSetManager::myDe
protected
bool makVrf::DtVrfModelSetManager::myAutoSave
protected
Favorites makVrf::DtVrfModelSetManager::myFavorites
protected
DtModelSet* makVrf::DtVrfModelSetManager::myModelSet
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)