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 Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
makVrv::DtCloudLayerSettingsManager Class Reference

A singleton settings manager, rooted in the display engine, that maintains default values for some cloud layer properties, by cloud type. More...

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

Public Types

typedef std::map
< DtCloudTypeMapper::CloudType,
makArchives::DtCloudLayerRecord
DtCloudTypeToCloudLayerRecordMap
 

Public Member Functions

 DtCloudLayerSettingsManager ()=delete
 CTOR. More...
 
 DtCloudLayerSettingsManager (const DtCloudLayerSettingsManager &orig)=delete
 Copy CTOR. More...
 
DtCloudLayerSettingsManageroperator= (const DtCloudLayerSettingsManager &orig)=delete
 Assignment OP. More...
 
virtual ~DtCloudLayerSettingsManager ()
 Virtual DTOR. More...
 
Setting Mutator/Accessor Methods
void setDefaultLengthForCloudType (DtCloudTypeMapper::CloudType type, float defaultLength)
 
float defaultLengthForCloudType (DtCloudTypeMapper::CloudType type) const
 
void setDefaultWidthForCloudType (DtCloudTypeMapper::CloudType type, float defaultWidth)
 
float defaultWidthForCloudType (DtCloudTypeMapper::CloudType type) const
 
Setting Persistence Methods
void setFromRecord (const makArchives::DtCloudLayerListRecord &rec)
 Set the current settings' state from the given record. More...
 
void getRecord (makArchives::DtCloudLayerListRecord &rec) const
 Store the current settings' state in the given record. More...
 
- Public Member Functions inherited from makVrv::DtBaseSettingsManager< makArchives::DtCloudLayerListRecord >
 DtBaseSettingsManager (DtDe &de, const std::string &name, const std::string &displayName, const std::string &ext)
 CTOR. More...
 
virtual ~DtBaseSettingsManager ()
 Virtual DTOR. More...
 
virtual void initializeBackup ()
 Creates a backup of the settings' current state. More...
 
- Public Member Functions inherited from makVrv::DtCommonBaseSettingsManager< makArchives::DtCloudLayerListRecord >
 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::DtCloudLayerListRecord > &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::DtCloudLayerListRecord &rec, makArchives::DtCloudLayerListRecord &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
DtCloudLayerSettingsManager
instance (DtDe &de)
 Get an instance of the settings manager. More...
 

Protected Member Functions

 DtCloudLayerSettingsManager (DtDe &de)
 Protected CTOR ( use instance(..) ). More...
 

Protected Attributes

DtCloudTypeToCloudLayerRecordMap myCloudTypeToCloudLayerRecordMap
 
- Protected Attributes inherited from makVrv::DtCommonBaseSettingsManager< makArchives::DtCloudLayerListRecord >
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::DtBaseSettingsManager< makArchives::DtCloudLayerListRecord >
typedef DtRecordSettingsBackup
< DtBaseSettingsManager
< makArchives::DtCloudLayerListRecord >
, makArchives::DtCloudLayerListRecord
RecordBackupType
 

Detailed Description

A singleton settings manager, rooted in the display engine, that maintains default values for some cloud layer properties, by cloud type.

The properties the manager maintains default values for are length and width. This settings manager is used by the global environment to initialize these properties to their defaults whenever a cloud layer is added or when the cloud layer's type changes. These defaults are needed because clouds created in the global environment are visualized to appear 'infinite'. This effect is achieved by creating cloud layer(s) of some length and width, determined by these default settings, and rendering the cloud layer(s) in every scene view based on the position of the observer(s) we are rendering the scene view(s) for. The cloud layer being rendered with respect to the observer's in the scene make it appear as if clouds are present globally since it appears in every observer's scene view no matter where they are on the globe. Changing the default properties modifies the dimensions of the cloud layers being rendered making them either 1) appear at further distances from the observer (if increasing the dimensions) or 2) reduce the vicinity around the observer the cloud layers appear (if decreasing the dimensions).

See Also
makArchives::DtCloudLayerListRecord
vrvCore::DtEnvironment

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtCloudLayerSettingsManager::DtCloudLayerSettingsManager ( )
delete

CTOR.

makVrv::DtCloudLayerSettingsManager::DtCloudLayerSettingsManager ( const DtCloudLayerSettingsManager orig)
delete

Copy CTOR.

virtual makVrv::DtCloudLayerSettingsManager::~DtCloudLayerSettingsManager ( )
virtual

Virtual DTOR.

makVrv::DtCloudLayerSettingsManager::DtCloudLayerSettingsManager ( DtDe de)
protected

Protected CTOR ( use instance(..) ).

Member Function Documentation

DtCloudLayerSettingsManager& makVrv::DtCloudLayerSettingsManager::operator= ( const DtCloudLayerSettingsManager orig)
delete

Assignment OP.

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

Get an instance of the settings manager.

Parameters
[in]deis the display engine root for the singleton.
void makVrv::DtCloudLayerSettingsManager::setDefaultLengthForCloudType ( DtCloudTypeMapper::CloudType  type,
float  defaultLength 
)
float makVrv::DtCloudLayerSettingsManager::defaultLengthForCloudType ( DtCloudTypeMapper::CloudType  type) const
void makVrv::DtCloudLayerSettingsManager::setDefaultWidthForCloudType ( DtCloudTypeMapper::CloudType  type,
float  defaultWidth 
)
float makVrv::DtCloudLayerSettingsManager::defaultWidthForCloudType ( DtCloudTypeMapper::CloudType  type) const
void makVrv::DtCloudLayerSettingsManager::setFromRecord ( const makArchives::DtCloudLayerListRecord rec)
virtual

Set the current settings' state from the given record.

Implements makVrv::DtBaseSettingsManager< makArchives::DtCloudLayerListRecord >.

void makVrv::DtCloudLayerSettingsManager::getRecord ( makArchives::DtCloudLayerListRecord rec) const
virtual

Store the current settings' state in the given record.

Implements makVrv::DtBaseSettingsManager< makArchives::DtCloudLayerListRecord >.

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

DtCloudTypeToCloudLayerRecordMap makVrv::DtCloudLayerSettingsManager::myCloudTypeToCloudLayerRecordMap
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)