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

Settings Manager for GL-Studio cockpits. More...

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

List of all members.

Public Member Functions

virtual ~DtSharedCockpitSettingsManager ()
 DTOR.
void loadDefaultMappings (DtEntityTypeMapper &mapper, bool useFactory)
 Saving and loading is NOT thread save, these functions must be called in the main thread (because they use DtDe).
void saveDefaultMappings (const DtEntityTypeMapper &mapper)
 Save a default mapper.
void loadMapFile (const std::string &filePath, DtEntityTypeMapper &mapper)
 Load an entity type mapper from a file.
void saveMapFile (const std::string &filePath, const DtEntityTypeMapper &mapper)
 Save an entity type mapper to a file.
void saveDefaultMappings ()
 Save the default settings, this will internally acquire a read lock (released at end).
void loadDefaultMappings (bool useFactory)
 Load the default settings, this will acquire a write lock (released at end).
virtual void mapperChanged (const DtEntityTypeMapper &)
 Called when a mapper has changed, saves if autosave is true.
virtual void backupMapper (DtEntityTypeMapper &)
 Called when a mapper wants to be backed up. Get lock on appropriate objects to back-up.
virtual void entityTypeMappingsRestored (const DtSettingsBackup *)
 Called when a mapping is restored, save out if auto save it true.
virtual void updateCockpitSettingsState ()
 Call to automaticall save (if set) cockpit settings record as well as reset values in cockpit to send out signals.
Setting persistence methods
void loadDefaultSettings (bool useOnlyFactorySettings)
 Load the default settings.
void saveDefaultSettings ()
 Save the current settings as the defaults.
void loadSettings (const std::string &filePath)
 Import settings from the named file.
void saveSettings (const std::string &filePath)
 Export settings to the named file.
void setAutoSave (bool b)
 Sets whether the settings should autosave.
bool autoSave () const
 Gets whether the settings are autosaving.
Routines to set items in the shared cockpit settings.

Will auto save record if auto save is true.

virtual void setCockpitsEnabled (bool enable)
virtual void setSmoothingEnabled (bool enable)
virtual void setSmoothingPeriod (float period)

Static Public Member Functions

static
DtSharedCockpitSettingsManager
instance (DtDe &de)
 Static instance method.

Protected Member Functions

virtual bool checkCockpitMapper (const std::string &node, DtSettingsChangeObject::UseType t)
 Called to see if model definition is in use.
 DtSharedCockpitSettingsManager (DtDe &de)
 CTOR.

Private Member Functions

void initializeMappings ()
 Initializes the cockpit mappings from the settings file.

Private Attributes

DtDemyDe
bool myAutoSaveFlag
DtSignalConnectionManager myConnections

Detailed Description

Settings Manager for GL-Studio cockpits.


Constructor & Destructor Documentation

DTOR.

CTOR.


Member Function Documentation

Static instance method.

Saving and loading is NOT thread save, these functions must be called in the main thread (because they use DtDe).

Warning:
This function needs a write lock in place to be safe.

Save a default mapper.

Warning:
This function needs a read lock in place to be safe.
void makVrv::DtSharedCockpitSettingsManager::loadMapFile ( const std::string &  filePath,
DtEntityTypeMapper mapper 
)

Load an entity type mapper from a file.

Warning:
This function needs a write lock in place to be safe.
void makVrv::DtSharedCockpitSettingsManager::saveMapFile ( const std::string &  filePath,
const DtEntityTypeMapper mapper 
)

Save an entity type mapper to a file.

Warning:
This function needs a read lock in place to be safe.

Save the default settings, this will internally acquire a read lock (released at end).

Load the default settings, this will acquire a write lock (released at end).

Called when a mapper has changed, saves if autosave is true.

Called when a mapper wants to be backed up. Get lock on appropriate objects to back-up.

Called when a mapping is restored, save out if auto save it true.

Load the default settings.

Save the current settings as the defaults.

void makVrv::DtSharedCockpitSettingsManager::loadSettings ( const std::string &  filePath)

Import settings from the named file.

void makVrv::DtSharedCockpitSettingsManager::saveSettings ( const std::string &  filePath)

Export settings to the named file.

Sets whether the settings should autosave.

Gets whether the settings are autosaving.

virtual void makVrv::DtSharedCockpitSettingsManager::setSmoothingPeriod ( float  period) [virtual]

Call to automaticall save (if set) cockpit settings record as well as reset values in cockpit to send out signals.

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

Called to see if model definition is in use.

Initializes the cockpit mappings from the settings file.


Member Data Documentation


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)