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

This class will maintain information about the display units used. More...

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

List of all members.

Classes

struct  CoordinateSystemAttributes
struct  DisplayAttributes
struct  UnitEntry

Public Types

typedef
makArchives::DtDisplayUnitsSettingsRecord::CoordSys 
CoordSys
typedef
makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits 
DistanceUnits
typedef
makArchives::DtDisplayUnitsSettingsRecord::VelocityUnits 
VelocityUnits
typedef
makArchives::DtDisplayUnitsSettingsRecord::AccelerationUnits 
AccelerationUnits
typedef
makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits 
OrientationUnits
typedef
makArchives::DtDisplayUnitsSettingsRecord::RotVelocityUnits 
RotVelocityUnits
typedef boost::unordered_map
< CoordSys, int > 
CoordSysDecimalsMap
typedef boost::unordered_map
< CoordSys, DtUnicode
CoordSysNotationsMap

Public Member Functions

virtual ~DtSharedDisplayUnitsSettings ()
 DTOR.
void coordinateSystemLabels (const DtCoordinateSystem &displayCS, DtUnicode &x, DtUnicode &y, DtUnicode &z) const
void coordinateSystemLabels (const DtCoordinateSystem &displayCS, CoordSys coordSys, DtUnicode &x, DtUnicode &y, DtUnicode &z) const
DtUnicode xyUnitNotation (const DtCoordinateSystem &displayCS) const
DtUnicode xyUnitNotation (const DtCoordinateSystem &displayCS, CoordSys coordSys) const
DtUnicode zUnitNotation (const DtCoordinateSystem &displayCS) const
DtUnicode zUnitNotation (const DtCoordinateSystem &displayCS, CoordSys coordSys) const
std::vector< std::string > convertPositionToStringList (const DtCoordinateSystem &displayCS, CoordSys coordSys, const DtVector &pos) const
 Converts the given position to list of strings in the given units and decimals.
std::vector< std::string > convertPositionToStringList (const DtCoordinateSystem &displayCS, const DtVector &pos) const
 Converts the given position to list of strings in the given units and decimals.
Settings setters and accessors
void setDisplayUnitAttributes (DtUnitConverterCollection::DisplayUnitType attr, const DisplayAttributes &data)
 Retrieves the display attribute data for a given display attribute (speed, distance, altitude, etc.)
bool getDisplayUnitAttributes (DtUnitConverterCollection::DisplayUnitType attr, DisplayAttributes &value) const
 Retrieves the display attribute data for a given display attribute (speed, distance, altitude, etc.)
DisplayAttributesfindDisplayUnitAttributes (DtUnitConverterCollection::DisplayUnitType attr)
 Accessor for attribute data for the given display attribute.
const DisplayAttributesfindDisplayUnitAttributes (DtUnitConverterCollection::DisplayUnitType attr) const
 Accessor for attribute data for the given display attribute (const).
void setCoordinateSystemAttributes (const CoordinateSystemAttributes &data)
 Set the coordinate system attributes.
CoordinateSystemAttributescoordSysAttributes ()
 Get a pointer to the coordinate system attributes.
const CoordinateSystemAttributescoordinateSystemAttributes () const
 Get a const pointer to the coordinate system attributes.
void getCoordinateSystemAttributes (CoordinateSystemAttributes &csAttr) const
 Fill in a CoordinateSystemAttributes object.
Display Unit Info Mutators
void setCoordinateSystem (CoordSys cs)
void setDistanceUnits (DistanceUnits distUnits)
void setAltitudeUnits (DistanceUnits altUnits)
void setVelocityUnits (VelocityUnits velocityUnits)
void setOrientationUnits (OrientationUnits oriUnits)
void setAccelerationUnits (AccelerationUnits accelUnits)
void setRotationalVelocityUnits (RotVelocityUnits wUnits)
void setCoordinateSystemDecimals (CoordSys cs, int decimals)
void setDistanceUnitDecimals (DistanceUnits distUnit, int decimals)
void setAltitudeUnitDecimals (DistanceUnits altUnit, int decimals)
void setVelocityUnitDecimals (VelocityUnits velocityUnit, int decimals)
void setOrientationUnitDecimals (OrientationUnits oriUnit, int decimals)
void setAccelerationUnitDecimals (AccelerationUnits accelUnit, int decimals)
void setRotationalVelocityUnitDecimals (RotVelocityUnits wUnit, int decimals)
Display Unit Info Accessors
int coordinateSystemDecimals (CoordSys cs) const
int distanceUnitDecimals (DistanceUnits distUnit) const
int altitudeUnitDecimals (DistanceUnits altUnit) const
int velocityUnitDecimals (VelocityUnits velocityUnit) const
int orientationUnitDecimals (OrientationUnits oriUnit) const
int accelerationUnitDecimals (AccelerationUnits accelUnit) const
int rotationalVelocityUnitDecimals (RotVelocityUnits wUnit) const
DtUnicode coordinateSystemNotation (CoordSys cs) const
DtUnicode distanceUnitNotation (DistanceUnits distUnit) const
DtUnicode altitudeUnitNotation (DistanceUnits altUnit) const
DtUnicode velocityUnitNotation (VelocityUnits velocityUnit) const
DtUnicode orientationUnitNotation (OrientationUnits oriUnit) const
DtUnicode accelerationUnitNotation (AccelerationUnits accelUnit) const
DtUnicode rotationalVelocityUnitNotation (RotVelocityUnits wUnit) const
Current Display Unit Info Accessors
CoordSys currentCoordinateSystem () const
DistanceUnits currentDistanceUnits () const
DistanceUnits currentAltitudeUnits () const
VelocityUnits currentVelocityUnits () const
OrientationUnits currentOrientationUnits () const
AccelerationUnits currentAccelerationUnits () const
RotVelocityUnits currentRotationalVelocityUnits () const
int currentCoordinateSystemDecimals () const
int currentDistanceUnitDecimals () const
int currentAltitudeUnitDecimals () const
int currentVelocityUnitDecimals () const
int currentOrientationUnitDecimals () const
int currentAccelerationUnitDecimals () const
int currentRotationalVelocityUnitDecimals () const
DtUnicode currentCoordinateSystemNotation () const
DtUnicode currentDistanceUnitNotation () const
DtUnicode currentAltitudeUnitNotation () const
DtUnicode currentVelocityUnitNotation () const
DtUnicode currentOrientationUnitNotation () const
DtUnicode currentAccelerationUnitNotation () const
DtUnicode currentRotationalVelocityUnitNotation () const
Settings record / backup methods
void setFromRecord (const makArchives::DtDisplayUnitsSettingsRecord &rec)
 Restore the settings from a record.
void getRecord (makArchives::DtDisplayUnitsSettingsRecord &rec) const
 Get the settings as a record.
virtual const
DtDisplayUnitsSettingsBackup
settingsBackup () const
 Accessor for the settings backup (const).
virtual
DtDisplayUnitsSettingsBackup
settingsBackup ()
 Accessor for the settings backup.
virtual void backup ()
 Called to back up the settings.

Protected Types

typedef boost::unordered_map
< DtUnitConverterCollection::DisplayUnitType,
DisplayAttributes
EntryMap
 Map type that maps display unit types to its display attributes.

Protected Member Functions

 DtSharedDisplayUnitsSettings (DtSharedSettingsManager &manager)
 Protected CTOR Use DtReadSettingsLock and DtWriteSettingsLock.
CoordSys currentCoordSysIndex () const
 Get the current coordinate system index.
int currentCoordSysDecimals () const
 Get the decimals for the current coordinate system.
std::string valueToText (double value, int decimals) const
void initEntries ()
 Set up the map of attribute data.
Generic Display Unit Info Accessors
int currentDisplayUnitIndex (DtUnitConverterCollection::DisplayUnitType attr) const
int currentDisplayUnitDecimals (DtUnitConverterCollection::DisplayUnitType attr) const
DtUnicode currentDisplayUnitNotation (DtUnitConverterCollection::DisplayUnitType attr) const
DtUnicode currentDisplayUnitName (DtUnitConverterCollection::DisplayUnitType attr) const
void currentDisplayUnitData (DtUnitConverterCollection::DisplayUnitType attr, int &index, DtUnicode &name, DtUnicode &notation, int &decimals) const

Static Protected Member Functions

static std::string className ()

Protected Attributes

EntryMap myEntries
CoordinateSystemAttributes myCoordSysEntries
DtDisplayUnitsSettingsBackupmySettingsBackup

Friends

class DtReadSettingsLock< DtSharedDisplayUnitsSettings >
 Use the DtReadSettingsLock to read the object.
class DtWriteSettingsLock< DtSharedDisplayUnitsSettings >
 Use the DtWriteSettingsLock to write to the object.

Detailed Description

This class will maintain information about the display units used.


Member Typedef Documentation

Map type that maps display unit types to its display attributes.


Constructor & Destructor Documentation

DTOR.

Protected CTOR Use DtReadSettingsLock and DtWriteSettingsLock.


Member Function Documentation

Retrieves the display attribute data for a given display attribute (speed, distance, altitude, etc.)

Returns:
True if the data was successfully retrieved. False otherwise.
Parameters:
DisplayUnitTypeattr Attribute to get the data for
DisplayAttributeData&value Argument in which the data is returned

Retrieves the display attribute data for a given display attribute (speed, distance, altitude, etc.)

Returns:
True if the data was successfully retrieved. False otherwise.
Parameters:
DisplayUnitTypeattr Attribute to get the data for
DisplayAttributeData&value Argument in which the data is returned

Accessor for attribute data for the given display attribute.

Parameters:
DisplayUnitTypeattr
Returns:
Display attribute data associated with the given display attribute (speed, distance, altitude, etc.)

Accessor for attribute data for the given display attribute (const).

Parameters:
DisplayUnitTypeattr
Returns:
Display attribute data associated with the given display attribute (speed, distance, altitude, etc.)

Set the coordinate system attributes.

Get a pointer to the coordinate system attributes.

Get a const pointer to the coordinate system attributes.

Fill in a CoordinateSystemAttributes object.

void makVrv::DtSharedDisplayUnitsSettings::coordinateSystemLabels ( const DtCoordinateSystem displayCS,
CoordSys  coordSys,
DtUnicode x,
DtUnicode y,
DtUnicode z 
) const
std::vector<std::string> makVrv::DtSharedDisplayUnitsSettings::convertPositionToStringList ( const DtCoordinateSystem displayCS,
CoordSys  coordSys,
const DtVector pos 
) const

Converts the given position to list of strings in the given units and decimals.

Performs the conversion for the given coordinate system (coordSys)

std::vector<std::string> makVrv::DtSharedDisplayUnitsSettings::convertPositionToStringList ( const DtCoordinateSystem displayCS,
const DtVector pos 
) const

Converts the given position to list of strings in the given units and decimals.

Performs the conversion for the current coordinate system.

Restore the settings from a record.

Get the settings as a record.

Accessor for the settings backup (const).

Reimplemented from makVrv::DtSharedSettings.

Accessor for the settings backup.

Reimplemented from makVrv::DtSharedSettings.

Called to back up the settings.

Reimplemented from makVrv::DtSharedSettings.

Get the current coordinate system index.

Get the decimals for the current coordinate system.

void makVrv::DtSharedDisplayUnitsSettings::currentDisplayUnitData ( DtUnitConverterCollection::DisplayUnitType  attr,
int &  index,
DtUnicode name,
DtUnicode notation,
int &  decimals 
) const [protected]
std::string makVrv::DtSharedDisplayUnitsSettings::valueToText ( double  value,
int  decimals 
) const [protected]
static std::string makVrv::DtSharedDisplayUnitsSettings::className ( ) [static, protected]

Set up the map of attribute data.

Creates the map of attribute data for storing the different display unit parameters.


Friends And Related Function Documentation

Use the DtReadSettingsLock to read the object.

Use the DtWriteSettingsLock to write to the object.


Member Data Documentation


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)