VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types
makVrv::DtBaseSharedSettingsManager< RecordType, SettingsType > Class Template Reference

Base class for shared settings managers. More...

Inheritance diagram for makVrv::DtBaseSharedSettingsManager< RecordType, SettingsType >:
Inheritance graph
[legend]

Public Member Functions

 DtBaseSharedSettingsManager (DtDe &de, const std::string &name, const std::string &displayName, const std::string &ext)
 CTOR.
virtual ~DtBaseSharedSettingsManager ()
 Virtual DTOR.
Setting Persistence Methods
virtual void initializeBackup ()
 Creates a backup of the settings' current state.
virtual void setFromRecord (const RecordType &record)
 Set the current settings' state from the given record.
virtual void getRecord (RecordType &record) const
 Store the current settings' state in the given record.
- Public Member Functions inherited from makVrv::DtCommonBaseSettingsManager< RecordType >
 DtCommonBaseSettingsManager (DtDe &de, const std::string &name, const std::string &displayName, const std::string &ext)
 CTOR The name, displayName, and extension parameters are used for creating the settings object (DtDeSettings) and backup, and for constructing the filename when readin/writing the records to disk.
virtual ~DtCommonBaseSettingsManager ()
 Virtual DTOR.
virtual void autoSaveIfNecessary ()
 Saves the current settings as defaults if autosave is enabled.
virtual void setAutoSave (bool doit)
 Sets whether autosave is enabled for the settings manager.
virtual bool autoSave () const
 Gets whether autosave is enabled for the settings manager.
virtual void setUseDefaultSettingsRecord (bool useit)
 Sets whether setting initialization should check for a default record.
virtual bool useDefaultSettingsRecord () const
 Gets whether setting initialization should check for a default record.
virtual DtDeSettingssettings ()
 Accessor for the manager's DtDeSettings object.
virtual const DtDeSettingssettings () const
 Accessor for the manager's DtDeSettings object (const).
virtual DtSettingsBackupsettingsBackup ()
 Accessor for the manager's settings backup.
virtual const DtSettingsBackupsettingsBackup () const
 Accessor for the manager's settings backup (const).
virtual void loadDefaults ()
 Initializes the settings and creates a backup.
virtual void saveDefaultSettings ()
 Saves the current settings' state as the default (on disk).
virtual void loadDefaultSettings (bool loadOnlyFactorySettings)
 Loads the default settings from disk.
virtual void importSettings (const std::string &filePath)
 Load the settings' state from the given file.
virtual void exportSettings (const std::string &filePath) const
 Save the current settings' state to the given file.
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor.
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor.

Protected Types

typedef
DtSharedRecordSettingsBackup
< SettingsType, RecordType > 
SharedRecordBackupType

Additional Inherited Members

- Protected Attributes inherited from makVrv::DtCommonBaseSettingsManager< RecordType >
DtSignalConnectionManager myConnections
std::string myName
std::string myExtension
std::string myDisplayName
bool myUseDefaultSettingsRecordFlag
bool myAutoSaveFlag
DtSettingsBackupmySettingsBackup
DtDemyDe

Detailed Description

template<typename RecordType, typename SettingsType>
class makVrv::DtBaseSharedSettingsManager< RecordType, SettingsType >

Base class for shared settings managers.

Extends the functionality provided by the DtCommonBaseSettingsManager, by implementing the initializeBackup, setFromRecord, and getRecord methods. Since creating backups and setting/getting the settings' state with a record works the same for all shared settings managers, new shared settings managers should use DtBaseSharedSettingsManager as its base class to make use of the common code. The SettingsType template parameter must be a DtSharedSettings object with methods settingsBackup() (both const and non-const versions) and backup(), returning DtSettingsBackup* and void respectively. The settings object must also implement a void setFromRecord( const RecType& ) and a void getRecord( RecType& ) const method as well.

Member Typedef Documentation

template<typename RecordType, typename SettingsType>
typedef DtSharedRecordSettingsBackup<SettingsType,RecordType> makVrv::DtBaseSharedSettingsManager< RecordType, SettingsType >::SharedRecordBackupType
protected

Constructor & Destructor Documentation

template<typename RecordType, typename SettingsType>
makVrv::DtBaseSharedSettingsManager< RecordType, SettingsType >::DtBaseSharedSettingsManager ( DtDe de,
const std::string &  name,
const std::string &  displayName,
const std::string &  ext 
)
inline
template<typename RecordType, typename SettingsType>
virtual makVrv::DtBaseSharedSettingsManager< RecordType, SettingsType >::~DtBaseSharedSettingsManager ( )
inlinevirtual

Virtual DTOR.

Member Function Documentation

template<typename RecordType, typename SettingsType>
virtual void makVrv::DtBaseSharedSettingsManager< RecordType, SettingsType >::initializeBackup ( )
inlinevirtual

Creates a backup of the settings' current state.

Implements makVrv::DtCommonBaseSettingsManager< RecordType >.

template<typename RecordType, typename SettingsType>
virtual void makVrv::DtBaseSharedSettingsManager< RecordType, SettingsType >::setFromRecord ( const RecordType &  record)
inlinevirtual

Set the current settings' state from the given record.

Implements makVrv::DtCommonBaseSettingsManager< RecordType >.

Reimplemented in makVrv::DtDisplayUnitsSettingsManager.

template<typename RecordType, typename SettingsType>
virtual void makVrv::DtBaseSharedSettingsManager< RecordType, SettingsType >::getRecord ( RecordType &  record) const
inlinevirtual

Store the current settings' state in the given record.

Implements makVrv::DtCommonBaseSettingsManager< RecordType >.


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

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)