#include <Units.h>

Public Member Functions | |
| virtual const std::string & | getUnitName () const =0 |
| virtual void | setUnitName (const std::string &unitName)=0 |
| virtual UnitType | getUnitType () const =0 |
| virtual void | setUnitType (UnitType myType)=0 |
| virtual double | getRangeMin () const =0 |
| virtual void | setRangeMin (double myRangeMin)=0 |
| virtual double | getRangeMax () const =0 |
| virtual void | setRangeMax (double myRangeMax)=0 |
| virtual double | getScaleFromStandard () const =0 |
| virtual void | setScaleFromStandard (double myScaleFromStandard)=0 |
| virtual void | setUnits (const Units *pUnits)=0 |
| virtual bool | compare (const Units *pUnits) const =0 |
Static Public Member Functions | |
| static const std::string & | signalRenamed () |
| static const std::string & | signalTypeChanged () |
| static const std::string & | signalRangeChanged () |
| static const std::string & | signalScaleChanged () |
Protected Member Functions | |
| virtual | ~Units () |
The units interface serves as a common mechanism for maintaining unit and range information about other data structures.
This subclass of Subject will notify upon the following conditions:
Definition at line 30 of file Units.h.
| virtual Units::~Units | ( | ) | [protected, virtual] |
This should be destroyed by calling ObjectFactory::destroyObject.
| static const std::string& Units::signalRenamed | ( | ) | [static] |
Emitted when the unit name changes with boost::any<std::string> containing the new name.
| static const std::string& Units::signalTypeChanged | ( | ) | [static] |
Emitted when the unit type changes with boost::any<UnitType> containing the new type.
| static const std::string& Units::signalRangeChanged | ( | ) | [static] |
Emitted when the minimum or maximum range value changes.
No value is associated with this signal.
| static const std::string& Units::signalScaleChanged | ( | ) | [static] |
Emitted when the scale value changes with boost::any<double> containing the new scale value.
| virtual const std::string& Units::getUnitName | ( | ) | const [pure virtual] |
| virtual void Units::setUnitName | ( | const std::string & | unitName | ) | [pure virtual] |
Sets the name for the current unit.
| unitName | The new name for the current unit. |
| virtual UnitType Units::getUnitType | ( | ) | const [pure virtual] |
Get the type of the units.
| virtual void Units::setUnitType | ( | UnitType | myType | ) | [pure virtual] |
Set the type of the units.
| myType | An enumeration code indicating the type of the units. |
| virtual double Units::getRangeMin | ( | ) | const [pure virtual] |
Get the minimum range of the units.
| virtual void Units::setRangeMin | ( | double | myRangeMin | ) | [pure virtual] |
Set the minimum range of the units.
| myRangeMin | The minimum range of the units. |
| virtual double Units::getRangeMax | ( | ) | const [pure virtual] |
Get the maximum range of the units.
| virtual void Units::setRangeMax | ( | double | myRangeMax | ) | [pure virtual] |
Set the maximum range of the units.
| myRangeMax | The maximum range of the units. |
| virtual double Units::getScaleFromStandard | ( | ) | const [pure virtual] |
Get the quantity scaled from the standard units.
| virtual void Units::setScaleFromStandard | ( | double | myScaleFromStandard | ) | [pure virtual] |
Set the quantity scaled from the standard units.
Example: For distance, the standard units will be meters. To convert distance values of meter to kilometer, call setScaleFromStandard(1e-3);
| myScaleFromStandard | The quantity scaled from the standard units. |
| virtual void Units::setUnits | ( | const Units * | pUnits | ) | [pure virtual] |
Sets all values in this Units object to those of another Units object.
| pUnits | The Units object from which to set all data values in this Units object. This method does nothing if NULL is passed in. |
| virtual bool Units::compare | ( | const Units * | pUnits | ) | const [pure virtual] |
Compares all values in this Units object with those of another Units object.
| pUnits | The Units object with which to compare values in this Units object. This method does nothing and returns false if NULL is passed in. |
true if all values in pUnits are the same as the values in this Units object; otherwise returns false.