The shared settings manager handles low level access to the settings.
More...
Private Member Functions |
| void | initializeMappings () |
| | Initializes the cockpit mappings from the settings file.
|
| void | initDefaultMappings (bool useFactory) |
| | Load the default settings, this will acquire a write lock (released at end).
|
Detailed Description
The shared settings manager handles low level access to the settings.
This object is not thread safe. It will auto save changes though. To
access or change settings use the following thread-safe methods:
@code
DtWriteSettingsLock<DtSharedSimulationSettings> settings(DtSharedSettingsManager::instance(myAgentManager.de())); or:
DtReadSettingsLock<DtSharedSimulationSettings>
Constructor & Destructor Documentation
| virtual makVrv::DtSharedSimulationSettingsManager::~DtSharedSimulationSettingsManager |
( |
| ) |
|
|
virtual |
| makVrv::DtSharedSimulationSettingsManager::DtSharedSimulationSettingsManager |
( |
DtDe & |
de | ) |
|
|
protected |
Member Function Documentation
| void makVrv::DtSharedSimulationSettingsManager::connectInputSignals |
( |
| ) |
|
Connects to signals indicating the settings need updating.
Connects to the signal indicating a mapping has changed, and connects to the signal indicating the settings backup has been restored.
| void makVrv::DtSharedSimulationSettingsManager::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).
- Warning
- This function needs a write lock in place to be safe.
| void makVrv::DtSharedSimulationSettingsManager::saveDefaultMappings |
( |
| ) |
|
Save the default settings, this will internally acquire a read lock (released at end).
| void makVrv::DtSharedSimulationSettingsManager::saveDefaultMappings |
( |
const DtEntityTypeMapper & |
mapper | ) |
|
Save a default mapper.
- Warning
- This function needs a read lock in place to be safe.
| void makVrv::DtSharedSimulationSettingsManager::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::DtSharedSimulationSettingsManager::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.
| void makVrv::DtSharedSimulationSettingsManager::setAutoSave |
( |
bool |
b | ) |
|
Sets whether the manager should save settings as they change.
| bool makVrv::DtSharedSimulationSettingsManager::autoSave |
( |
| ) |
const |
Gets whether the manager saves settings as they change.
| virtual void makVrv::DtSharedSimulationSettingsManager::mapperChanged |
( |
const DtEntityTypeMapper & |
| ) |
|
|
protectedvirtual |
Called when a mapper has changed, saves if autosave is true.
| virtual void makVrv::DtSharedSimulationSettingsManager::backupMapper |
( |
DtEntityTypeMapper & |
| ) |
|
|
protectedvirtual |
Called when a mapper wants to be backed up.
Get lock on appropriate objects to back-up.
| virtual void makVrv::DtSharedSimulationSettingsManager::entityTypeMappingsRestored |
( |
const DtSettingsBackup * |
| ) |
|
|
protectedvirtual |
Called when a mapping is restored, save out if auto save is true.
| void makVrv::DtSharedSimulationSettingsManager::initializeMappings |
( |
| ) |
|
|
private |
Initializes the cockpit mappings from the settings file.
| void makVrv::DtSharedSimulationSettingsManager::initDefaultMappings |
( |
bool |
useFactory | ) |
|
|
private |
Load the default settings, this will acquire a write lock (released at end).
This method is intentionally private as it should only be called once, and from the constructor of this class
Member Data Documentation
| bool makVrv::DtSharedSimulationSettingsManager::myAutoSave |
|
private |
| DtDe& makVrv::DtSharedSimulationSettingsManager::myDe |
|
private |
The documentation for this class was generated from the following file: