VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Private Attributes
makVrv::DtSharedCigiSettingsManager Class Reference

This class is responsible for saving/loading the CIGI settings (all of the mappings) to/from XML files. More...

Inheritance diagram for makVrv::DtSharedCigiSettingsManager:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~DtSharedCigiSettingsManager ()
 Destructor.
void loadCigiSettingsFile (const std::string &settingsName, const std::string &filePath)
 Reads the CIGI settings from a file and adds the settings to the DtSharedCigiSettings.
void saveCigiSettingsFile (const std::string &settingsName, const std::string &filePath)
 Gets the specified CIGI settings from the DtSharedCigiSettings and write to the specified file.
void loadAllCigiSettings ()
 Finds all CIGI settings in the CIGI settings directory and adds them to the DtSharedCigiSettings.
void saveAllCigiSettings ()
 Saves all of the CIGI settings to the CIGI settings directory.
void addCigiSettings (const std::string &mapperName)
 Creates a new set of CIGI settings in the DtSharedCigiSettings.
void removeCigiSettings (const std::string &mapperName)
 Removes a set of CIGI settings from the DtSharedCigiSettings.
void renameCigiSettings (const std::string &oldName, const std::string &newName)
 Removes the CIGI settings specified by oldName and adds them as newName in the DtSharedCigiSettings.
const std::vector< std::string > & getCigiSettingsNames () const
 Get the list of settings names in the DtSharedCigiSettings.
virtual void setEntityTypeModelMapping (int entType, const std::string &modelName, const std::string &schemaName)
 Sets the model definition and schema type for the CIGI entity type. Wraps shared cigi settings for purposes of auto-saving.
virtual void removeEntityTypeModelMapping (int entType)
 Removes the entity type mapping for the CIGI entity type. Wraps shared cigi settings for purposes of auto-saving.
virtual bool remapEntityType (int oldType, int newType)
 Changes the entity type in the mapping from oldType to newType. Wraps shared cigi settings for purposes of auto-saving.
virtual bool renameModelDefinition (const std::string &oldName, const std::string &newName, std::vector< std::string > &mappersChanged)
 Goes through all the mappers and renames the model definition to the new name.
virtual DtSettingsBackupsettingsBackup (const std::string &)
 Returns settings backup object for specified cigi setting.
virtual void saveCurrentSettings ()
 Saves the currently active settings.
virtual void addModelStateMapping (int cigiId, int stateId)
 Adds a CIGI Component ID to state ID mapping.
virtual void removeModelStateMapping (int cigiId)
 Removes the CIGI Component ID to State ID mapping.
virtual void setArtPartMapping (int entType, int cigiId, int disId)
 Sets the mapping from CIGI ID to DIS ID for the specified entity type.
virtual void removeArtPartMapping (int entType, int cigiId)
 Removes the articulated part mapping for the particular entity type.
virtual void addDatabaseMapping (int databaseNumber, const std::string &filename)
 Adds a database number to filename mapping.
virtual void removeDatabaseMapping (int databaseNumber)
 Removes the database mapping with the specified database number.
virtual void addComponentIdMapping (makArchives::DtCigiComponentClass compClass, int compId, const std::string &compName)
 Adds a mapping of component ID to name for the particular component class.
virtual void removeComponentIdMapping (makArchives::DtCigiComponentClass compClass, int compId)
 Removes the component ID mapping with the specified ID for the particular component class.
virtual void addAnimationMapping (int animationId, const std::string &animationName)
 Adds an animation ID to name mapping.
virtual void removeAnimationMapping (int animationId)
 Removes the animation mapping with the specified ID.
void setAutoSave (bool b)
bool autoSave () const

Static Public Member Functions

static
DtSharedCigiSettingsManager
instance (DtDe &)
 Get the DtSharedCigiSettingsManager instance.

Public Attributes

boost::signal< void(const
std::string &)> 
signal_currentSettingsChanged
 Raise signal when a settings object is made the current one.
boost::signal< void(const
std::string &)> 
signal_settingsToBeDeleted
 Raise signal when a settings object is deleted.

Protected Member Functions

virtual void backup (const std::string &)
 Sent by the shared signaler when an object wants to be backed up.
virtual bool checkCigiMappers (const std::string &node, DtSettingsChangeObject::UseType t)
 Called to see if model definition is in use by any cigi mapper.
void initializeCigiSettings (const std::string &filePath)
 Add the CIGI settings specified by filePath to the DtSharedCigiSettings.
 DtSharedCigiSettingsManager (DtDe &de)
 Use instance() to create.

Private Attributes

DtDemyDe
DtSignalConnectionManager myConnections
std::string myCigiSettingsPath
std::string myCigiFactoryPath
std::vector< std::string > myMapperNames
bool myAutoSave

Detailed Description

This class is responsible for saving/loading the CIGI settings (all of the mappings) to/from XML files.


Constructor & Destructor Documentation

Destructor.

Use instance() to create.


Member Function Documentation

Get the DtSharedCigiSettingsManager instance.

void makVrv::DtSharedCigiSettingsManager::loadCigiSettingsFile ( const std::string &  settingsName,
const std::string &  filePath 
)

Reads the CIGI settings from a file and adds the settings to the DtSharedCigiSettings.

If backup is true, tries to back up settingsName for possible restore

void makVrv::DtSharedCigiSettingsManager::saveCigiSettingsFile ( const std::string &  settingsName,
const std::string &  filePath 
)

Gets the specified CIGI settings from the DtSharedCigiSettings and write to the specified file.

Finds all CIGI settings in the CIGI settings directory and adds them to the DtSharedCigiSettings.

Saves all of the CIGI settings to the CIGI settings directory.

void makVrv::DtSharedCigiSettingsManager::addCigiSettings ( const std::string &  mapperName)

Creates a new set of CIGI settings in the DtSharedCigiSettings.

void makVrv::DtSharedCigiSettingsManager::removeCigiSettings ( const std::string &  mapperName)

Removes a set of CIGI settings from the DtSharedCigiSettings.

void makVrv::DtSharedCigiSettingsManager::renameCigiSettings ( const std::string &  oldName,
const std::string &  newName 
)

Removes the CIGI settings specified by oldName and adds them as newName in the DtSharedCigiSettings.

const std::vector<std::string>& makVrv::DtSharedCigiSettingsManager::getCigiSettingsNames ( ) const

Get the list of settings names in the DtSharedCigiSettings.

virtual void makVrv::DtSharedCigiSettingsManager::setEntityTypeModelMapping ( int  entType,
const std::string &  modelName,
const std::string &  schemaName 
) [virtual]

Sets the model definition and schema type for the CIGI entity type. Wraps shared cigi settings for purposes of auto-saving.

Removes the entity type mapping for the CIGI entity type. Wraps shared cigi settings for purposes of auto-saving.

virtual bool makVrv::DtSharedCigiSettingsManager::remapEntityType ( int  oldType,
int  newType 
) [virtual]

Changes the entity type in the mapping from oldType to newType. Wraps shared cigi settings for purposes of auto-saving.

virtual bool makVrv::DtSharedCigiSettingsManager::renameModelDefinition ( const std::string &  oldName,
const std::string &  newName,
std::vector< std::string > &  mappersChanged 
) [virtual]

Goes through all the mappers and renames the model definition to the new name.

Returns true if any mappers have changed and puts the changed mappers in the vector. Wraps shared cigi settings for purposes of auto-saving

virtual DtSettingsBackup* makVrv::DtSharedCigiSettingsManager::settingsBackup ( const std::string &  ) [virtual]

Returns settings backup object for specified cigi setting.

Saves the currently active settings.

virtual void makVrv::DtSharedCigiSettingsManager::addModelStateMapping ( int  cigiId,
int  stateId 
) [virtual]

Adds a CIGI Component ID to state ID mapping.

virtual void makVrv::DtSharedCigiSettingsManager::removeModelStateMapping ( int  cigiId) [virtual]

Removes the CIGI Component ID to State ID mapping.

virtual void makVrv::DtSharedCigiSettingsManager::setArtPartMapping ( int  entType,
int  cigiId,
int  disId 
) [virtual]

Sets the mapping from CIGI ID to DIS ID for the specified entity type.

virtual void makVrv::DtSharedCigiSettingsManager::removeArtPartMapping ( int  entType,
int  cigiId 
) [virtual]

Removes the articulated part mapping for the particular entity type.

virtual void makVrv::DtSharedCigiSettingsManager::addDatabaseMapping ( int  databaseNumber,
const std::string &  filename 
) [virtual]

Adds a database number to filename mapping.

virtual void makVrv::DtSharedCigiSettingsManager::removeDatabaseMapping ( int  databaseNumber) [virtual]

Removes the database mapping with the specified database number.

virtual void makVrv::DtSharedCigiSettingsManager::addComponentIdMapping ( makArchives::DtCigiComponentClass  compClass,
int  compId,
const std::string &  compName 
) [virtual]

Adds a mapping of component ID to name for the particular component class.

Removes the component ID mapping with the specified ID for the particular component class.

virtual void makVrv::DtSharedCigiSettingsManager::addAnimationMapping ( int  animationId,
const std::string &  animationName 
) [virtual]

Adds an animation ID to name mapping.

virtual void makVrv::DtSharedCigiSettingsManager::removeAnimationMapping ( int  animationId) [virtual]

Removes the animation mapping with the specified ID.

virtual void makVrv::DtSharedCigiSettingsManager::backup ( const std::string &  ) [protected, virtual]

Sent by the shared signaler when an object wants to be backed up.

Get a write lock on the settings and back it up!

virtual bool makVrv::DtSharedCigiSettingsManager::checkCigiMappers ( const std::string &  node,
DtSettingsChangeObject::UseType  t 
) [protected, virtual]

Called to see if model definition is in use by any cigi mapper.

void makVrv::DtSharedCigiSettingsManager::initializeCigiSettings ( const std::string &  filePath) [protected]

Add the CIGI settings specified by filePath to the DtSharedCigiSettings.

Called by loadAllCigiSettings.


Member Data Documentation

Raise signal when a settings object is made the current one.

boost::signal<void (const std::string&)> makVrv::DtSharedCigiSettingsManager::signal_settingsToBeDeleted

Raise signal when a settings object is deleted.

std::vector<std::string> makVrv::DtSharedCigiSettingsManager::myMapperNames [mutable, private]

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)