VR-Forces Developer's Guide
 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 | Protected Member Functions | Private Member Functions | Private Attributes
makVrv::DtSharedCockpitSettingsManager Class Reference

Settings Manager for GL-Studio cockpits.

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

Public Member Functions

virtual ~DtSharedCockpitSettingsManager ()
 
void loadDefaultMappings (DtEntityTypeMapper &mapper, bool useFactory)
 
void saveDefaultMappings (const DtEntityTypeMapper &mapper)
 
void loadMapFile (const std::string &filePath, DtEntityTypeMapper &mapper)
 
void saveMapFile (const std::string &filePath, const DtEntityTypeMapper &mapper)
 
void saveDefaultMappings ()
 
void loadDefaultMappings (bool useFactory)
 
virtual void mapperChanged (const DtEntityTypeMapper &)
 
virtual void backupMapper (DtEntityTypeMapper &)
 
virtual void entityTypeMappingsRestored (const DtSettingsBackup *)
 
virtual void updateCockpitSettingsState ()
 
Setting persistence methods
void loadDefaultSettings (bool useOnlyFactorySettings)
 
void saveDefaultSettings ()
 
void loadSettings (const std::string &filePath)
 
void saveSettings (const std::string &filePath)
 
void setAutoSaveTypeMapping (bool b)
 
bool autoSaveTypeMapping () const
 
void setAutoSaveSettings (bool b)
 
bool autoSaveSettings () const
 
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)
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Static Public Member Functions

static
DtSharedCockpitSettingsManager
instance (DtDe &de)
 

Protected Member Functions

virtual bool checkCockpitMapper (const std::string &node, DtSettingsChangeObject::UseType t, std::string &inUse)
 
 DtSharedCockpitSettingsManager (DtDe &de)
 

Private Member Functions

void initializeMappings ()
 

Private Attributes

DtDemyDe
 
bool myAutoSaveTypeMappingFlag
 
bool myAutoSaveSettingsFlag
 
DtSignalConnectionManager myConnections
 

Constructor & Destructor Documentation

virtual makVrv::DtSharedCockpitSettingsManager::~DtSharedCockpitSettingsManager ( )
virtual

DTOR.

makVrv::DtSharedCockpitSettingsManager::DtSharedCockpitSettingsManager ( DtDe de)
protected

CTOR.

Member Function Documentation

static DtSharedCockpitSettingsManager& makVrv::DtSharedCockpitSettingsManager::instance ( DtDe de)
static

Static instance method.

void makVrv::DtSharedCockpitSettingsManager::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::DtSharedCockpitSettingsManager::saveDefaultMappings ( const DtEntityTypeMapper mapper)

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.
void makVrv::DtSharedCockpitSettingsManager::saveDefaultMappings ( )

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

void makVrv::DtSharedCockpitSettingsManager::loadDefaultMappings ( bool  useFactory)

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

virtual void makVrv::DtSharedCockpitSettingsManager::mapperChanged ( const DtEntityTypeMapper )
virtual

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

virtual void makVrv::DtSharedCockpitSettingsManager::backupMapper ( DtEntityTypeMapper )
virtual

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

virtual void makVrv::DtSharedCockpitSettingsManager::entityTypeMappingsRestored ( const DtSettingsBackup )
virtual

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

void makVrv::DtSharedCockpitSettingsManager::loadDefaultSettings ( bool  useOnlyFactorySettings)

Load the default settings.

void makVrv::DtSharedCockpitSettingsManager::saveDefaultSettings ( )

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.

void makVrv::DtSharedCockpitSettingsManager::setAutoSaveTypeMapping ( bool  b)

Sets whether the type mappings should autosave.

bool makVrv::DtSharedCockpitSettingsManager::autoSaveTypeMapping ( ) const

Gets whether the type mappings are autosaving.

void makVrv::DtSharedCockpitSettingsManager::setAutoSaveSettings ( bool  b)

Sets whether the settings should autosave.

bool makVrv::DtSharedCockpitSettingsManager::autoSaveSettings ( ) const

Gets whether the settings are autosaving.

virtual void makVrv::DtSharedCockpitSettingsManager::setCockpitsEnabled ( bool  enable)
virtual
virtual void makVrv::DtSharedCockpitSettingsManager::setSmoothingEnabled ( bool  enable)
virtual
virtual void makVrv::DtSharedCockpitSettingsManager::setSmoothingPeriod ( float  period)
virtual
virtual void makVrv::DtSharedCockpitSettingsManager::updateCockpitSettingsState ( )
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,
std::string &  inUse 
)
protectedvirtual

Called to see if model definition is in use by the cockpit mapping with in use message if in use.

void makVrv::DtSharedCockpitSettingsManager::initializeMappings ( )
private

Initializes the cockpit mappings from the settings file.

Member Data Documentation

DtDe& makVrv::DtSharedCockpitSettingsManager::myDe
private
bool makVrv::DtSharedCockpitSettingsManager::myAutoSaveTypeMappingFlag
private
bool makVrv::DtSharedCockpitSettingsManager::myAutoSaveSettingsFlag
private
DtSignalConnectionManager makVrv::DtSharedCockpitSettingsManager::myConnections
private

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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)