VR-Forces 4.6 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 bool load (const std::string &, bool reset=true, bool signal=true)
 Loads model set file into model set and then signals loaded if successful.
virtual bool loadFromDirectory (const std::string &dataDirectory, const std::string &guiDirectory, const std::string &platformsDirectory, bool reset=true, bool signal=true)
 Loads the model set from the specified directory.
virtual DtModelSetEntrymodelSetEntry (const DtEntityMapperKey &key) const
 Find exactly or by matching pattern.
virtual bool canHoldSubordinates (const DtEntityMapperKey &key) const
 Returns true if the given type has the ability to contain subordinates.
virtual std::vector< DtObjectTypesubordinateObjects (const DtEntityMapperKey &) const
 Returns the subodrinate objects of this model set entry.
virtual bool isRandomized (const DtEntityMapperKey &) const
 Returns true if this is a randomized model.
virtual DtModelSetEntryexactModelSetEntry (const DtEntityMapperKey &key) const
 Find exactly only.
virtual void getSupportPoints (const DtEntityType &et, DtVector &left, DtVector &right, DtVector &other)
 Gets the support points of the object.
virtual Dt3dBoundingVolume getBoundingVolume (const DtEntityMapperKey &et)
 Returns the bounding volume of the given entity.
virtual DtEntityType nameToType (const DtString &) const
 Give a label return the entity type that has an exact match (case included) for that label.
virtual bool isFavorite (const DtEntityMapperKey &key, int force) const
 Returns true if the item/force combination is a favorite.
virtual std::set< DtStringcategories () const
 Returns all the categories contained in this model set.
virtual std::set< DtStringcategoriesForPalette (const DtString &palette) const
 Returns all the categories contained in this model set for the given palette.
virtual DtModelSetEntryfindByLabel (const DtString &) const
 Return the model set entry (if it exists) by the given label.
virtual DtModelSetEntryaddModelSetEntry (const DtString &label, const DtEntityMapperKey &, const DtRwNLengthStringVector &cats)
 Add a new model set entry.
virtual void addSimulationObjectGroupModelSetEntry (DtSimulationObjectGroupModelSetEntry *entry)
 Adds a new simulation object group model set entry.
virtual
DtSimulationObjectGroupModelSetEntry 
findSimulationObjectGroup (const std::string &sogName) const
 Returns the entry that has a filename which references the given simulation object group.
virtual DtObjectType nextAvailableSimulationObjectGroupObjectType () const
 Returns the next object typ that can be used for the simulaton object group model set entry.
virtual void removeModelSetEntry (const DtEntityMapperKey &e)
 Removes the model set entry.
virtual std::string nameFor (const DtEntityMapperKey &) const
 Returns the name of the item. Blank if none.
virtual std::string keywordsFor (const DtEntityMapperKey &) const
 Returns the keywords of the item. Blank if none.
virtual bool canEmbedIntoTerrain (const DtEntityMapperKey &) const
 Returns true if this entity can embed into the terrain.
virtual bool canEmbark (const DtEntityMapperKey &) const
 Returns true if this entity can embark.
virtual bool canAttachTo (const DtEntityMapperKey &) const
 Returns true if this entity can be attached to. By default only kind < 11 can be attached to.
virtual bool canEmbarkUpon (const DtEntityMapperKey &) const
 Returns true if this entity can be embarked upon.
virtual bool organized (const DtEntityMapperKey &) const
 Returns whether or not this item is organized by default.
virtual std::string additionalKeywords (const DtEntityMapperKey &) const
 Set/get additional keywords that will be used with the given entity mapper key (exact match).
virtual void setAdditionalKeywords (const DtEntityMapperKey &, const std::string &, bool replace=false)
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.
virtual void setModelSet (DtModelSet *)
 Deletes current model set (if owned) and sets new model set.
virtual void setFavorite (const DtEntityMapperKey &key, bool b)
 Sets the model set entry that matches the mapper key to be a favorite.
virtual DtModelSetloadFavoritesFor (const std::string &)
 Loads the favorites file for the given model set file.
virtual void mergeFavoritesInto (DtModelSet *favorite, DtModelSet *modelSet)
 Merges the favorites selection into the given model set.
virtual void mergeFavorites (DtModelSet *favorites)
 Merge favorites into the shared model set.
virtual DtModelSetEntryfavoriteFor (DtModelSetEntry *) const
 Returns the favorite that matched the model set entry.
virtual DtModelSetmodelSet ()
 Returns a model set created from the shared model set.
virtual DtModelSet modelSet () const
 Returns a copy of the model set.
void setAutoSave (bool b)
bool autoSave () const
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor.
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor.

Static Public Member Functions

static DtVrfModelSetManagerinstance (makVrv::DtDe &de)
 Returns instance of the messager.

Public Attributes

boost::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.

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.

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 bool makVrf::DtVrfModelSetManager::loadFromDirectory ( const std::string &  dataDirectory,
const std::string &  guiDirectory,
const std::string &  platformsDirectory,
bool  reset = true,
bool  signal = true 
)
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 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 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 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
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.

void makVrf::DtVrfModelSetManager::setAutoSave ( bool  b)
inline
bool makVrf::DtVrfModelSetManager::autoSave ( ) const
inline
virtual void makVrf::DtVrfModelSetManager::clearModelSets ( )
protectedvirtual

Clears out all loaded model sets.

Member Data Documentation

boost::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 Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)