VR-Forces 4.0.4 Class Documentation
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
makVrv::DtSharedCigiSettings Class Reference

The shared CIGI settings. More...

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

List of all members.

Public Types

typedef std::pair
< makArchives::DtCigiSettingsRecord
*, DtCigiSettingsBackup * > 
DtCigiSettingsPair
typedef std::map< std::string,
DtCigiSettingsPair
StringToSettingsMap

Public Member Functions

virtual ~DtSharedCigiSettings ()
 Destructor.
virtual void addCigiSettings (const std::string &settingsName)
 Create new settings with the specified name.
virtual void setCigiSettings (const std::string &settingsName, const makArchives::DtCigiSettingsRecord &record)
 Set the specified settings with the name.
virtual void removeCigiSettings (const std::string &settingsName)
 Remove the settings with the specified name.
virtual void setCurrentSettingsName (const std::string &settingsName)
 Sets the name of the current settings being used.
virtual const
makArchives::DtCigiSettingsRecord
currentSettings () const
 Returns the current settings.
virtual const std::string & currentSettingsName () const
 Returns the name of the current settings.
virtual
makArchives::DtCigiSettingsRecord
findCigiSettingsByName (const std::string &settingsName)
 Returns a pointer of the settings of the given name.
virtual const
makArchives::DtCigiSettingsRecord
findCigiSettingsByName (const std::string &settingsName) const
 Const version of the above method.
virtual bool definitionInUse (const std::string &def) const
 Returns true if any of the mappers use the given definition.
virtual const std::string & mapEntityModelDefinition (int entType) const
 Returns the model definition that the CIGI entity type maps to for the particular settings.
virtual const std::string & mapEntityModelSchemaName (int entType) const
 Returns the schema type that the CIGI entity type maps to for the particular settings.
virtual
StringToSettingsMap::const_iterator 
begin () const
 Iterators that point to the beginning and end of the settings map.
virtual
StringToSettingsMap::const_iterator 
end () const
virtual unsigned int settingsCount () const
 Returns the number of settings contained in the settings map.
virtual const std::string & findDatabaseFilename (int databaseNumber)
 Returns the filename that corresponds to the database number.
virtual const std::string & findAnimationName (int animationId)
 Returns the animation that corresponds to the specified ID.
virtual const std::vector
< std::string > & 
componentStrings (makArchives::DtCigiComponentClass compClass) const
 Returns a list of all the possible components for the specified component class.
virtual const DtSettingsBackupsettingsBackup (const std::string &name) const
 Returns a backup object by cigi settings name.
virtual DtSettingsBackupsettingsBackup (const std::string &name)
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.
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.
virtual void removeEntityTypeModelMapping (int entType)
 Removes the entity type mapping for the CIGI entity type.
virtual bool remapEntityType (int oldType, int newType)
 Changes the entity type in the mapping from oldType to newType.
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.

Static Public Member Functions

static std::string className ()
 Get an instance of the settings object.

Protected Member Functions

 DtSharedCigiSettings (DtSharedSettingsManager &manager)
 CTOR.

Protected Attributes

std::string myEmptyMapping
 Empty string, for returning the reference which will always be empty.
StringToSettingsMap mySettingsByName
std::string myCurrentSettingsName
makArchives::DtCigiSettingsRecordmyCurrentSettings
std::vector< std::string > myEntityComponentStrings
std::vector< std::string > myViewComponentStrings
std::vector< std::string > mySystemComponentStrings

Friends

class DtReadSettingsLock< DtSharedCigiSettings >
 Also protected, use the DtReadSettingsLock and DtWriteSettingsLock to access the object.
class DtWriteSettingsLock< DtSharedCigiSettings >
class DtSharedSettingsManager

Detailed Description

The shared CIGI settings.

This class contains all of the settings, and each has a name. The current settings should be set, and then all of the add/set/remove/find methods will act on the current settings. This class also emits thread-safe signals via the DtCigiSettingsSignaler so that the settings contained within the DtCigiConnection can be updated while running.


Member Typedef Documentation


Constructor & Destructor Documentation

Destructor.

CTOR.


Member Function Documentation

static std::string makVrv::DtSharedCigiSettings::className ( ) [static]

Get an instance of the settings object.

Also protected, use the DtReadSettingsLock and DtWriteSettingsLock to access the object.

virtual void makVrv::DtSharedCigiSettings::addCigiSettings ( const std::string &  settingsName) [virtual]

Create new settings with the specified name.

virtual void makVrv::DtSharedCigiSettings::setCigiSettings ( const std::string &  settingsName,
const makArchives::DtCigiSettingsRecord record 
) [virtual]

Set the specified settings with the name.

Creates the settings if they do not exist, and overwrites the settings if they do.

virtual void makVrv::DtSharedCigiSettings::removeCigiSettings ( const std::string &  settingsName) [virtual]

Remove the settings with the specified name.

virtual void makVrv::DtSharedCigiSettings::setCurrentSettingsName ( const std::string &  settingsName) [virtual]

Sets the name of the current settings being used.

Returns the current settings.

virtual const std::string& makVrv::DtSharedCigiSettings::currentSettingsName ( ) const [virtual]

Returns the name of the current settings.

virtual makArchives::DtCigiSettingsRecord* makVrv::DtSharedCigiSettings::findCigiSettingsByName ( const std::string &  settingsName) [virtual]

Returns a pointer of the settings of the given name.

Returns:
0 if none exists.
virtual const makArchives::DtCigiSettingsRecord* makVrv::DtSharedCigiSettings::findCigiSettingsByName ( const std::string &  settingsName) const [virtual]

Const version of the above method.

virtual bool makVrv::DtSharedCigiSettings::definitionInUse ( const std::string &  def) const [virtual]

Returns true if any of the mappers use the given definition.

virtual const std::string& makVrv::DtSharedCigiSettings::mapEntityModelDefinition ( int  entType) const [virtual]

Returns the model definition that the CIGI entity type maps to for the particular settings.

Returns:
The empty string if none exists.
virtual const std::string& makVrv::DtSharedCigiSettings::mapEntityModelSchemaName ( int  entType) const [virtual]

Returns the schema type that the CIGI entity type maps to for the particular settings.

Returns:
The empty string if none exists.
virtual StringToSettingsMap::const_iterator makVrv::DtSharedCigiSettings::begin ( ) const [virtual]

Iterators that point to the beginning and end of the settings map.

virtual StringToSettingsMap::const_iterator makVrv::DtSharedCigiSettings::end ( ) const [virtual]
virtual unsigned int makVrv::DtSharedCigiSettings::settingsCount ( ) const [virtual]

Returns the number of settings contained in the settings map.

virtual const std::string& makVrv::DtSharedCigiSettings::findDatabaseFilename ( int  databaseNumber) [virtual]

Returns the filename that corresponds to the database number.

Returns:
The empty string if no mapping is found.
virtual const std::string& makVrv::DtSharedCigiSettings::findAnimationName ( int  animationId) [virtual]

Returns the animation that corresponds to the specified ID.

Returns:
The empty string if the mapping is not found.
virtual const std::vector<std::string>& makVrv::DtSharedCigiSettings::componentStrings ( makArchives::DtCigiComponentClass  compClass) const [virtual]

Returns a list of all the possible components for the specified component class.

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

Returns a backup object by cigi settings name.

virtual DtSettingsBackup* makVrv::DtSharedCigiSettings::settingsBackup ( const std::string &  name) [virtual]
virtual void makVrv::DtSharedCigiSettings::addModelStateMapping ( int  cigiId,
int  stateId 
) [virtual]

Adds a CIGI Component ID to state ID mapping.

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

Removes the CIGI Component ID to State ID mapping.

virtual void makVrv::DtSharedCigiSettings::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::DtSharedCigiSettings::removeArtPartMapping ( int  entType,
int  cigiId 
) [virtual]

Removes the articulated part mapping for the particular entity type.

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

Adds a database number to filename mapping.

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

Removes the database mapping with the specified database number.

virtual void makVrv::DtSharedCigiSettings::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::DtSharedCigiSettings::removeComponentIdMapping ( makArchives::DtCigiComponentClass  compClass,
int  compId 
) [virtual]

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

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

Adds an animation ID to name mapping.

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

Removes the animation mapping with the specified ID.

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

Sets the model definition and schema type for the CIGI entity type.

virtual void makVrv::DtSharedCigiSettings::removeEntityTypeModelMapping ( int  entType) [virtual]

Removes the entity type mapping for the CIGI entity type.

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

Changes the entity type in the mapping from oldType to newType.

virtual bool makVrv::DtSharedCigiSettings::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


Friends And Related Function Documentation

friend class DtReadSettingsLock< DtSharedCigiSettings > [friend]

Also protected, use the DtReadSettingsLock and DtWriteSettingsLock to access the object.

friend class DtWriteSettingsLock< DtSharedCigiSettings > [friend]
friend class DtSharedSettingsManager [friend]

Member Data Documentation

Empty string, for returning the reference which will always be empty.

std::vector<std::string> makVrv::DtSharedCigiSettings::myEntityComponentStrings [protected]
std::vector<std::string> makVrv::DtSharedCigiSettings::myViewComponentStrings [protected]
std::vector<std::string> makVrv::DtSharedCigiSettings::mySystemComponentStrings [protected]

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)