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 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]

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 addObserverModeMapping (int observerModeNumber, const std::string &observerModeName)
 Adds an observer mode to observer mode name mapping.
virtual void removeObserverModeMapping (int observerModeNumber)
 Removes the observer mode mapping with the specified observer mode 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.
virtual void addActiveRegionMapping (int regionId, const std::string &regionName)
 Adds an active sensor region ID to name mapping.
virtual void removeActiveRegionMapping (int regionId)
 Removes the active sensor region mapping with the specified ID.
virtual void addLightPointGroupMapping (int groupId, const std::string &groupName)
 Adds an active sensor region ID to name mapping.
virtual void removeLightPointGroupMapping (int groupId)
 Removes the active sensor region mapping with the specified ID.
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
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

virtual makVrv::DtSharedCigiSettingsManager::~DtSharedCigiSettingsManager ( )
virtual

Destructor.

makVrv::DtSharedCigiSettingsManager::DtSharedCigiSettingsManager ( DtDe de)
protected

Use instance() to create.

Member Function Documentation

static DtSharedCigiSettingsManager& makVrv::DtSharedCigiSettingsManager::instance ( DtDe )
static

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.

void makVrv::DtSharedCigiSettingsManager::loadAllCigiSettings ( )

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

void makVrv::DtSharedCigiSettingsManager::saveAllCigiSettings ( )

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.

virtual void makVrv::DtSharedCigiSettingsManager::removeEntityTypeModelMapping ( int  entType)
virtual

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.

virtual void makVrv::DtSharedCigiSettingsManager::saveCurrentSettings ( )
virtual

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::addObserverModeMapping ( int  observerModeNumber,
const std::string &  observerModeName 
)
virtual

Adds an observer mode to observer mode name mapping.

virtual void makVrv::DtSharedCigiSettingsManager::removeObserverModeMapping ( int  observerModeNumber)
virtual

Removes the observer mode mapping with the specified observer mode 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.

virtual void makVrv::DtSharedCigiSettingsManager::removeComponentIdMapping ( makArchives::DtCigiComponentClass  compClass,
int  compId 
)
virtual

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::addActiveRegionMapping ( int  regionId,
const std::string &  regionName 
)
virtual

Adds an active sensor region ID to name mapping.

virtual void makVrv::DtSharedCigiSettingsManager::removeActiveRegionMapping ( int  regionId)
virtual

Removes the active sensor region mapping with the specified ID.

virtual void makVrv::DtSharedCigiSettingsManager::addLightPointGroupMapping ( int  groupId,
const std::string &  groupName 
)
virtual

Adds an active sensor region ID to name mapping.

virtual void makVrv::DtSharedCigiSettingsManager::removeLightPointGroupMapping ( int  groupId)
virtual

Removes the active sensor region mapping with the specified ID.

void makVrv::DtSharedCigiSettingsManager::setAutoSave ( bool  b)
inline
bool makVrv::DtSharedCigiSettingsManager::autoSave ( ) const
inline
virtual void makVrv::DtSharedCigiSettingsManager::backup ( const std::string &  )
protectedvirtual

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 
)
protectedvirtual

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

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

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.

DtDe& makVrv::DtSharedCigiSettingsManager::myDe
private
DtSignalConnectionManager makVrv::DtSharedCigiSettingsManager::myConnections
private
std::string makVrv::DtSharedCigiSettingsManager::myCigiSettingsPath
private
std::string makVrv::DtSharedCigiSettingsManager::myCigiFactoryPath
private
std::vector<std::string> makVrv::DtSharedCigiSettingsManager::myMapperNames
mutableprivate
bool makVrv::DtSharedCigiSettingsManager::myAutoSave
private

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)