VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends
makVrv::DtDistributedEnvironmentSettingsManager Class Reference

Example Settings Manager. More...

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

List of all members.

Public Member Functions

virtual ~DtDistributedEnvironmentSettingsManager ()
 DTOR.
Setters/getters for settings
virtual void setAllowSimEnvironmentEffectMessages (bool val)
 Sets whether to listen to sim environment effect messages or not.
virtual bool allowSimEnvironmentEffectMessages () const
 Gets whether listening to sim environment effect messages or not.
Setting persistence methods
virtual void setFromRecord (const makArchives::DtDistributedEnvironmentSettingsRecord &rec)
 Use the settings from the given settings record.
virtual void getRecord (makArchives::DtDistributedEnvironmentSettingsRecord &rec) const
 Populate the given record with the current settings.

Static Public Member Functions

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

Public Attributes

boost::signal< void(bool)> signal_allowSimMessagesSet
 Boost signals for changed settings.

Protected Member Functions

 DtDistributedEnvironmentSettingsManager (DtDe &)
 Protected CTOR ( use instance(..) )

Protected Attributes

bool myAllowSimEnvironmentEffectMessages

Friends

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

Detailed Description

Example Settings Manager.


Constructor & Destructor Documentation

DTOR.

Protected CTOR ( use instance(..) )


Member Function Documentation

Get an instance of the settings manager.

Sets whether to listen to sim environment effect messages or not.

Gets whether listening to sim environment effect messages or not.

Use the settings from the given settings record.

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

Populate the given record with the current settings.

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


Friends And Related Function Documentation

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

Befriend the manager instance functions for instance retreival/creation.

Befriend the manager instance functions for instance retreival/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 retreival/creation.

Befriend the manager instance functions for instance retreival/creation.

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

Member Data Documentation

Boost signals for changed settings.


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)