VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 DtModelSetEntryexactModelSetEntry (const DtEntityMapperKey &key) const
 Find exactly only.
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 DtModelSetEntryaddModelSetEntry (const DtString &label, const DtEntityMapperKey &, const DtRwNLengthStringVector &cats)
 Add a new 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.
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 DtModelSetEntry* makVrf::DtVrfModelSetManager::exactModelSetEntry ( const DtEntityMapperKey key) const
virtual

Find exactly only.

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 DtModelSetEntry* makVrf::DtVrfModelSetManager::addModelSetEntry ( const DtString label,
const DtEntityMapperKey ,
const DtRwNLengthStringVector cats 
)
virtual

Add a new 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.

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 Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)