#include <GeoPoint.h>
Public Types | |
| enum | DmsTypeEnum { DMS_DECIMAL, DMS_LATITUDE, DMS_LONGITUDE } |
| typedef EnumWrapper< DmsTypeEnum > | DmsType |
Public Member Functions | |
| DmsPoint (DmsType eType, double dValue=0.0) | |
| DmsPoint (DmsType eType, const std::string &valueText) | |
| ~DmsPoint () | |
| DmsType | getType () const |
| void | setValue (double dValue) |
| void | setValue (const std::string &valueText) |
| double | getValue () const |
| std::string | getValueText (DmsFormatType format=DMS_FULL, int precision=-1) const |
| DmsPoint & | operator= (const DmsPoint &original) |
| bool | operator== (const DmsPoint &rhs) const |
This class provides common formatting to a single latutude or longitude value. When the data value is set, it can be retrieved either in the raw data value format, or in one of several text formats, as defined by the DmsType enum.
Definition at line 28 of file GeoPoint.h.
| typedef EnumWrapper<DmsTypeEnum> DmsPoint::DmsType |
The EnumWrapper contains a given enum value and provides a isValid() method which returns true if the contained enum value is valid.
Please see How To Use EnumWrapper for more information. The wrapped enum values are DmsPoint::DmsTypeEnum.
Definition at line 50 of file GeoPoint.h.
Specifies the text formatting type for the data value.
Definition at line 36 of file GeoPoint.h.
| DmsPoint::DmsPoint | ( | DmsType | eType, | |
| double | dValue = 0.0 | |||
| ) |
Creates a DMS point with an initial raw value.
| eType | The DMS point type. | |
| dValue | The initial value for the DMS point. |
| DmsPoint::DmsPoint | ( | DmsType | eType, | |
| const std::string & | valueText | |||
| ) |
Creates a DMS point with an initial string value.
| eType | The DMS point type. | |
| valueText | A string representing the initial value that can be converted to a numeric raw value. |
| DmsPoint::~DmsPoint | ( | ) |
Destroys the DMS point.
| DmsType DmsPoint::getType | ( | ) | const |
| void DmsPoint::setValue | ( | double | dValue | ) |
Sets the value as a raw value.
| dValue | The new value for the DMS point. |
| void DmsPoint::setValue | ( | const std::string & | valueText | ) |
Sets the value as a string.
| valueText | A string representing the new value that can be converted to a numeric raw value. |
| double DmsPoint::getValue | ( | ) | const |
| std::string DmsPoint::getValueText | ( | DmsFormatType | format = DMS_FULL, |
|
| int | precision = -1 | |||
| ) | const |
Returns the value of the DMS point in a given text format.
| format | The text format for the string. | |
| precision | The number of digits after decimal point. Defaults to three for decimal degrees and seconds and two for decimal minutes. |
Sets the type and value to that of another DMS point.
| original | The point from which to set this point's type and value. |
| bool DmsPoint::operator== | ( | const DmsPoint & | rhs | ) | const |
Compares two DMS points.
| rhs | The point to compare the type and value against this point. |