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

DtObserverSettingsManager keeps track of the mapping between string and integer keys for observer settings; display names for observer settings; which observer settings are global, projection- specific, and model set-specific; and which settings should appear on the Observer menu and Observer toolbar. More...

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

List of all members.

Public Types

enum  ObserverSetting {
  Global = 0, ShowMainModel = 1, EnableSpeedScaling, EnableTerrainDragging,
  EnableViewControl, ConstrainToTerrain, ShowDustClouds, ShowWakes,
  ShowContrails, ShowFootprints, ShowTreads, ShowFire,
  ShowSmokePlumes, ShowTrackHistories, ShowDetonations, ShowMuzzleFlashes,
  EnableModelScaling, DisplaySky, ForceNorthOrientation, DisplayCompass,
  DisplayGridLines, DisplayFeatures
}
typedef
DtVisualTypeManager::SupportedModelSets 
ModelSetList
typedef std::vector< int > GlobalSettingsList
typedef std::vector< int > ProjectionSettingsList
typedef std::vector< int > ModelSetSettingsList

Public Member Functions

virtual ~DtObserverSettingsManager ()
 DTOR.
int registerGlobalObserverSetting (const std::string &stringKey, const std::string &iconName="")
 Register a setting as global, and generate an integer key.
void registerGlobalObserverSetting (const std::string &stringKey, int intKey, const std::string &iconName="")
 Register a setting as global, specifying the integer key.
int registerProjectionSpecificObserverSetting (const std::string &stringKey, bool is2D, const std::string &iconName="")
 Register a setting as projection-specific, and generate an integer key.
void registerProjectionSpecificObserverSetting (const std::string &stringKey, int intKey, bool is2D, const std::string &iconName="")
 Register a setting as projection-specific, specifying the integer key.
int registerModelSetSpecificObserverSetting (const std::string &stringKey, ModelSetList modelSets, const std::string &iconName="")
 Register a setting as model set-specific, and generate an integer key.
void registerModelSetSpecificObserverSetting (const std::string &stringKey, int intKey, ModelSetList modelSets, const std::string &iconName="")
 Register a setting as model set-specific, specifying the integer key.
int lookupObserverSettingIntKey (const std::string &stringKey) const
 Look up the integer key for this observer setting string key.
const std::string * findObserverSettingStringKey (int intKey) const
 Look up the string key for this observer setting integer key.
const std::string * findObserverSettingDisplayName (int intKey) const
 Look up the specified setting's display name.
const std::string * findObserverSettingToolTip (int intKey) const
 Look up the specified setting's tool tip.
const std::string * findObserverSettingIcon (int intKey) const
 Look up the specified setting's icon to use.
const GlobalSettingsListglobalSettings () const
 Get the list of global settings.
const ProjectionSettingsListprojectionSpecificSettings (bool is2D) const
 Get the list of projection-specific settings.
const ModelSetSettingsListmodelSetSpecificSettings (int modelSet) const
 Get the list of model set-specific settings.
bool isSettingValid (bool projection, int modelSet, int settingKey)
 Returns true if the setting is on the global list, the projection settings list for the projection specified, or the model set settings list for the model set specified.
DtObserverSettingsDisplayNameProviderdisplayNameProvider () const
 Returns the display name provider to add display items to the GUI for menus.

Static Public Member Functions

static DtObserverSettingsManagerinstance (DtDe &de)
 Get an instance used to emit, or to connect.

Protected Types

typedef std::map< bool,
ProjectionSettingsList
ProjectionSettingsMap
typedef std::map< int,
ModelSetSettingsList
ModelSetSettingsMap
typedef std::map< int,
std::string > 
IconNameMap
typedef std::map< int, boolInclusionMap

Protected Member Functions

void registerSettingKey (ModelSetList modelSets, int key)
 DtObserverSettingsManager (DtDe &)
 CTOR.
void registerProjectionSetting (bool projection, int key)
void registerModelSetSetting (int modelSet, int key)
void registerIconName (int key, const std::string &iconName)

Protected Attributes

DtDemyDe
DtSharedVisualizerTypeMappingsManagermyMappingSharer
DtObserverSettingsDisplayNameProvidermyDisplayNameProvider
DtObserverSettingsToolTipProvider * myToolTipProvider
DtStringKeyConverter myKeyConverter
GlobalSettingsList myGlobalSettings
ProjectionSettingsMap myProjectionSpecificSettings
ModelSetSettingsMap myModelSetSpecificSettings
ProjectionSettingsList myEmptyProjectionList
ModelSetSettingsList myEmptyModelSetList
IconNameMap myIconNameMap

Friends

class DtObserverSettingsManagerCreator

Detailed Description

DtObserverSettingsManager keeps track of the mapping between string and integer keys for observer settings; display names for observer settings; which observer settings are global, projection- specific, and model set-specific; and which settings should appear on the Observer menu and Observer toolbar.

Observer Settings Integer keys are used everywhere internally; the string keys are written to and read from files (and the mapping from int to string and vice versa is done at write and/or read time).


Member Typedef Documentation

typedef std::map<int, std::string> makVrv::DtObserverSettingsManager::IconNameMap [protected]
typedef std::map<int, bool> makVrv::DtObserverSettingsManager::InclusionMap [protected]

Member Enumeration Documentation

Enumerator:
Global 
ShowMainModel 
EnableSpeedScaling 
EnableTerrainDragging 
EnableViewControl 
ConstrainToTerrain 
ShowDustClouds 
ShowWakes 
ShowContrails 
ShowFootprints 
ShowTreads 
ShowFire 
ShowSmokePlumes 
ShowTrackHistories 
ShowDetonations 
ShowMuzzleFlashes 
EnableModelScaling 
DisplaySky 
ForceNorthOrientation 
DisplayCompass 
DisplayGridLines 
DisplayFeatures 

Constructor & Destructor Documentation

DTOR.

CTOR.


Member Function Documentation

Get an instance used to emit, or to connect.

int makVrv::DtObserverSettingsManager::registerGlobalObserverSetting ( const std::string &  stringKey,
const std::string &  iconName = "" 
)

Register a setting as global, and generate an integer key.

void makVrv::DtObserverSettingsManager::registerGlobalObserverSetting ( const std::string &  stringKey,
int  intKey,
const std::string &  iconName = "" 
)

Register a setting as global, specifying the integer key.

int makVrv::DtObserverSettingsManager::registerProjectionSpecificObserverSetting ( const std::string &  stringKey,
bool  is2D,
const std::string &  iconName = "" 
)

Register a setting as projection-specific, and generate an integer key.

void makVrv::DtObserverSettingsManager::registerProjectionSpecificObserverSetting ( const std::string &  stringKey,
int  intKey,
bool  is2D,
const std::string &  iconName = "" 
)

Register a setting as projection-specific, specifying the integer key.

int makVrv::DtObserverSettingsManager::registerModelSetSpecificObserverSetting ( const std::string &  stringKey,
ModelSetList  modelSets,
const std::string &  iconName = "" 
)

Register a setting as model set-specific, and generate an integer key.

void makVrv::DtObserverSettingsManager::registerModelSetSpecificObserverSetting ( const std::string &  stringKey,
int  intKey,
ModelSetList  modelSets,
const std::string &  iconName = "" 
)

Register a setting as model set-specific, specifying the integer key.

int makVrv::DtObserverSettingsManager::lookupObserverSettingIntKey ( const std::string &  stringKey) const

Look up the integer key for this observer setting string key.

*Returns -1 if the string key doesn't exist

const std::string* makVrv::DtObserverSettingsManager::findObserverSettingStringKey ( int  intKey) const

Look up the string key for this observer setting integer key.

Returns "" if the integer key doesn't exist

Look up the specified setting's display name.

const std::string* makVrv::DtObserverSettingsManager::findObserverSettingToolTip ( int  intKey) const

Look up the specified setting's tool tip.

If the tool tip does not exist, returns display name

const std::string* makVrv::DtObserverSettingsManager::findObserverSettingIcon ( int  intKey) const

Look up the specified setting's icon to use.

Get the list of global settings.

Get the list of projection-specific settings.

Get the list of model set-specific settings.

bool makVrv::DtObserverSettingsManager::isSettingValid ( bool  projection,
int  modelSet,
int  settingKey 
)

Returns true if the setting is on the global list, the projection settings list for the projection specified, or the model set settings list for the model set specified.

Returns the display name provider to add display items to the GUI for menus.

void makVrv::DtObserverSettingsManager::registerSettingKey ( ModelSetList  modelSets,
int  key 
) [protected]
void makVrv::DtObserverSettingsManager::registerProjectionSetting ( bool  projection,
int  key 
) [protected]
void makVrv::DtObserverSettingsManager::registerModelSetSetting ( int  modelSet,
int  key 
) [protected]
void makVrv::DtObserverSettingsManager::registerIconName ( int  key,
const std::string &  iconName 
) [protected]

Friends And Related Function Documentation

friend class DtObserverSettingsManagerCreator [friend]

Member Data Documentation

DtObserverSettingsToolTipProvider* makVrv::DtObserverSettingsManager::myToolTipProvider [protected]

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)