VR-Forces 4.10 Class Documentation
 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 | Protected Attributes | Friends
makVrv::DtDisplayUnitsSettingsManager Class Reference

Manager for the display units settings. More...

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

Public Member Functions

virtual ~DtDisplayUnitsSettingsManager ()
 DTOR. More...
 
void connectInputSignals ()
 Connect to signal indicating settings have been backed up. More...
 
void setSuppressMagneticNorthNotationEnabled (bool isEnabled)
 Set whether or not to suppress the Heading Notation when using Magnetic North. More...
 
bool isSuppressMagneticNorthNotationEnabled () const
 Get whether or not to suppress the Heading Notation when using Magnetic North. More...
 
DtDisplayUnitsConverterconverter ()
 Returns the manager's internal converter. More...
 
void slot_quit ()
 For shutting down the DtDisplayUnitsSettingsManager agents before the de shuts down the agent manager. More...
 
Setters
void setCoordinateSystem (DtDisplayUnitsConverter::CoordSys cs)
 Set the Coordinate System display unit in the 'Application' collection Similar to calling: setDisplayUnitUnit(theApplicationDisplayUnitCollectionName, theCoordinateSystemDisplayUnitName, cs) but uses DtSharedDisplayUnitsSettings::setCoordinateSystem instead of DtSharedDisplayUnitsSettings::setDisplayUnitUnit which has slightly different behavior. More...
 
void setDisplayUnitUnit (const DtUnicode &displayUnitCollectionName, const DtUnicode &displayUnitName, unsigned int unitEnumValue)
 Set the unit of measurement used for a display unit. More...
 
void setDisplayUnitDecimals (const DtUnicode &displayUnitCollectionName, const DtUnicode &displayUnitName, unsigned int decimals)
 Set the unit of measurement used for a display unit. More...
 
Setting persistence methods
virtual void setFromRecord (const makArchives::DtDisplayUnitsSettingsRecord &rec)
 Use the settings from the given settings record. More...
 
- Public Member Functions inherited from makVrv::DtBaseSharedSettingsManager< makArchives::DtDisplayUnitsSettingsRecord, DtSharedDisplayUnitsSettings >
 DtBaseSharedSettingsManager (DtDe &de, const std::string &name, const std::string &displayName, const std::string &ext)
 CTOR. More...
 
virtual ~DtBaseSharedSettingsManager ()
 Virtual DTOR. More...
 
virtual void initializeBackup ()
 Creates a backup of the settings' current state. More...
 
virtual void getRecord (makArchives::DtDisplayUnitsSettingsRecord &record) const
 Store the current settings' state in the given record. More...
 
- Public Member Functions inherited from makVrv::DtCommonBaseSettingsManager< makArchives::DtDisplayUnitsSettingsRecord >
 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. More...
 
virtual ~DtCommonBaseSettingsManager ()
 Virtual DTOR. More...
 
virtual void autoSaveIfNecessary ()
 Saves the current settings as defaults if autosave is enabled. More...
 
virtual void setAutoSave (bool doit)
 Sets whether autosave is enabled for the settings manager. More...
 
virtual bool autoSave () const
 Gets whether autosave is enabled for the settings manager. More...
 
virtual void setUseDefaultSettingsRecord (bool useit)
 Sets whether setting initialization should check for a default record. More...
 
virtual bool useDefaultSettingsRecord () const
 Gets whether setting initialization should check for a default record. More...
 
virtual DtDeSettingssettings ()
 Accessor for the manager's DtDeSettings object. More...
 
virtual const DtDeSettingssettings () const
 Accessor for the manager's DtDeSettings object (const). More...
 
virtual DtSettingsBackupsettingsBackup ()
 Accessor for the manager's settings backup. More...
 
virtual const DtSettingsBackupsettingsBackup () const
 Accessor for the manager's settings backup (const). More...
 
virtual void loadDefaults ()
 Initializes the settings and creates a backup. More...
 
virtual void saveDefaultSettings ()
 Saves the current settings' state as the default (on disk). More...
 
virtual void loadDefaultSettings (bool loadOnlyFactorySettings)
 Loads the default settings from disk. More...
 
virtual void importSettings (const std::string &filePath)
 Load the settings' state from the given file. More...
 
virtual void exportSettings (const std::string &filePath) const
 Save the current settings' state to the given file. More...
 
virtual void getSplitRecord (std::vector< makArchives::DtDisplayUnitsSettingsRecord > &rec, std::vector< std::string > &fileNames)
 For directory support, split the main record into different sub-records and give them each a file name. More...
 
virtual void addRecords (makArchives::DtDisplayUnitsSettingsRecord &rec, makArchives::DtDisplayUnitsSettingsRecord &combinedRec)
 For directory support, when reading in a directory, add the records from each file to the combined record. More...
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor. More...
 
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor. More...
 

Static Public Member Functions

static
DtDisplayUnitsSettingsManager
instance (DtDe &de)
 Get an instance of the settings manager. More...
 

Protected Member Functions

 DtDisplayUnitsSettingsManager (DtDe &de)
 Protected CTOR ( use instance(..) ) More...
 
virtual void slot_initializeSynchronizer ()
 Initializes the synchronizer agent to keep RDE settings in sync. More...
 
virtual void slot_displayEngineAdded (const DtDeRecord &deRec)
 Receives notification that a new De has been connected. More...
 
virtual void slot_backupRestored (const DtSettingsBackup *s)
 Called when the setting is restored, save out if auto save is true. More...
 

Protected Attributes

DtDisplayUnitsConvertermyDisplayUnitsConverter
 
DtDisplayUnitsSettingsSynchronizerAgent * mySettingsSynchronizer
 
- Protected Attributes inherited from makVrv::DtCommonBaseSettingsManager< makArchives::DtDisplayUnitsSettingsRecord >
DtSignalConnectionManager myConnections
 
std::string myName
 
std::string myExtension
 
std::string myDisplayName
 
bool myUseDefaultSettingsRecordFlag
 
bool myAutoSaveFlag
 
DtSettingsBackupmySettingsBackup
 
DtDemyDe
 

Friends

template<typename ManagerClass >
ManagerClass & defaultManagerInstanceFunction (DtDe &, bool)
 Befriend the manager instance functions for instance retrieval/creation. More...
 
template<typename ManagerClass >
void defaultManagerRegisterInstanceFunction (DtDe &, ManagerClass *)
 Befriend the manager instance functions for instance retrieval/creation. More...
 

Additional Inherited Members

- Protected Types inherited from makVrv::DtBaseSharedSettingsManager< makArchives::DtDisplayUnitsSettingsRecord, DtSharedDisplayUnitsSettings >
typedef
DtSharedRecordSettingsBackup
< DtSharedDisplayUnitsSettings,
makArchives::DtDisplayUnitsSettingsRecord
SharedRecordBackupType
 

Detailed Description

Manager for the display units settings.

Constructor & Destructor Documentation

virtual makVrv::DtDisplayUnitsSettingsManager::~DtDisplayUnitsSettingsManager ( )
virtual

DTOR.

makVrv::DtDisplayUnitsSettingsManager::DtDisplayUnitsSettingsManager ( DtDe de)
protected

Protected CTOR ( use instance(..) )

Member Function Documentation

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

Get an instance of the settings manager.

void makVrv::DtDisplayUnitsSettingsManager::connectInputSignals ( )

Connect to signal indicating settings have been backed up.

void makVrv::DtDisplayUnitsSettingsManager::setCoordinateSystem ( DtDisplayUnitsConverter::CoordSys  cs)

Set the Coordinate System display unit in the 'Application' collection Similar to calling: setDisplayUnitUnit(theApplicationDisplayUnitCollectionName, theCoordinateSystemDisplayUnitName, cs) but uses DtSharedDisplayUnitsSettings::setCoordinateSystem instead of DtSharedDisplayUnitsSettings::setDisplayUnitUnit which has slightly different behavior.

void makVrv::DtDisplayUnitsSettingsManager::setDisplayUnitUnit ( const DtUnicode displayUnitCollectionName,
const DtUnicode displayUnitName,
unsigned int  unitEnumValue 
)

Set the unit of measurement used for a display unit.

Parameters
displayUnitCollectionNameThe name of the collection the display unit is in
displayUnitNameThe name of the display unit of interest
unitEnumValueThe unsigned integer value that corresponds to a unit of measurement in a specific Units enumeration, e.g. DtDisplayUnitsSettingsRecord::RotVelocityUnits.
void makVrv::DtDisplayUnitsSettingsManager::setDisplayUnitDecimals ( const DtUnicode displayUnitCollectionName,
const DtUnicode displayUnitName,
unsigned int  decimals 
)

Set the unit of measurement used for a display unit.

Parameters
displayUnitCollectionNameThe name of the collection the display unit is in
displayUnitNameThe name of the display unit of interest
decimalsThe number of decimal places to use for a given display unit
virtual void makVrv::DtDisplayUnitsSettingsManager::setFromRecord ( const makArchives::DtDisplayUnitsSettingsRecord rec)
virtual

Use the settings from the given settings record.

Overridden to perform some validation on the settings in the record.

Reimplemented from makVrv::DtBaseSharedSettingsManager< makArchives::DtDisplayUnitsSettingsRecord, DtSharedDisplayUnitsSettings >.

void makVrv::DtDisplayUnitsSettingsManager::setSuppressMagneticNorthNotationEnabled ( bool  isEnabled)

Set whether or not to suppress the Heading Notation when using Magnetic North.

Parameters
isEnabledWhether or not to suppress Magnetic North Heading Notation
bool makVrv::DtDisplayUnitsSettingsManager::isSuppressMagneticNorthNotationEnabled ( ) const

Get whether or not to suppress the Heading Notation when using Magnetic North.

Returns
Whether or not to suppress Magnetic North Heading Notation
DtDisplayUnitsConverter& makVrv::DtDisplayUnitsSettingsManager::converter ( )

Returns the manager's internal converter.

void makVrv::DtDisplayUnitsSettingsManager::slot_quit ( )

For shutting down the DtDisplayUnitsSettingsManager agents before the de shuts down the agent manager.

virtual void makVrv::DtDisplayUnitsSettingsManager::slot_initializeSynchronizer ( )
protectedvirtual

Initializes the synchronizer agent to keep RDE settings in sync.

Instantiates a synchronizer (DtDisplayUnitsSettingsSynchronizerAgent) to keep remote De's display units settings manager's in sync with the master De's settings manager. Also connects to the IG communicator's clientAdded signal so the synchronizer can be reinitialized when a new De is connected.

virtual void makVrv::DtDisplayUnitsSettingsManager::slot_displayEngineAdded ( const DtDeRecord deRec)
protectedvirtual

Receives notification that a new De has been connected.

Re-initializes the synchronizer so the new De's settings manager can be kept up to date.

See Also
slot_initializeSynchronizer()
virtual void makVrv::DtDisplayUnitsSettingsManager::slot_backupRestored ( const DtSettingsBackup s)
protectedvirtual

Called when the setting is restored, save out if auto save is true.

Friends And Related Function Documentation

template<typename ManagerClass >
ManagerClass& defaultManagerInstanceFunction ( DtDe de,
bool  allowedInSlave 
)
friend

Befriend the manager instance functions for instance retrieval/creation.

Befriend the manager instance functions for instance retreival/creation.

Befriend the manager instance functions for instance retrieval/creation.

Manager requirements: 1) Static instance function 2) Protected DtSignalConnectionManager named myConnections. 3) Member functioned called loadDefaults which takes no arguments. and loads the default settings of the manager or factory from disk. 4) define defaultManagerInstanceFunction as friend. 5) define defaultManagerRegisterInstanceFunction as friend (see below). 5) Protected Constructor which only takes a DtDe reference.

* class Manager
* {
* public:
* static Manager& instance(DtDe& de);
* void loadDefaults();
* protected:
* template <typename ManagerClass>
* friend ManagerClass& defaultManagerInstanceFunction(DtDe& de, bool);
* template <typename ManagerClass>
* friend void defaultManagerRegisterInstanceFunction(DtDe& de, ManagerClass* mgr)
* Manager(DtDe&);
* DtSignalConnectionManager myConnections;
* };
*

Then simply in the implementation of instance call defaultManagerInstanceFunction with the de object and return the return value.

* Manager& Manager::instance(DtDe& de)
* {
* return defaultManagerInstanceFunction<Manager>(de);
* }
*
template<typename ManagerClass >
void defaultManagerRegisterInstanceFunction ( DtDe de,
ManagerClass *  mgr 
)
friend

Befriend the manager instance functions for instance retrieval/creation.

Befriend the manager instance functions for instance retreival/creation.

Befriend the manager instance functions for instance retrieval/creation.

* static void Manager::registerInstance(DtDe& de, Manager* mgr)
* {
* }
* ...else where call.
* // Assuming class NewManager : public Manager
* Manager::registerInstance(de,new NewManager(de));
*

Member Data Documentation

DtDisplayUnitsConverter* makVrv::DtDisplayUnitsSettingsManager::myDisplayUnitsConverter
protected
DtDisplayUnitsSettingsSynchronizerAgent* makVrv::DtDisplayUnitsSettingsManager::mySettingsSynchronizer
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)