Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
This class provides facilities to convert Cartesian data to various measurement units. More...
#include <ilviews/maps/unitconv.h>
Public Member Functions | |
IlvUnitConverter (IlDouble toMeters, const char *unit, const char *description=0) | |
This constructor initializes a new instance of IlvUnitConverter using the specified coefficient to convert the measurement unit to meters, and the specified unit name and description. | |
IlvUnitConverter * | copy () const |
Returns a copy of this instance of unit converter. | |
IlDouble | fromMeters (IlDouble meters) const |
This method converts a measurement expressed in meters to the measurement unit. | |
const char * | getDescription () const |
This method returns the description of the measurement unit of this converter. | |
IlDouble | getToMeters () const |
Returns the coefficient used to convert the measurement unit to meters. | |
const char * | getUnit () const |
This method returns the name of the measurement unit of this converter. | |
void | save (IlvOutputFile &file) const |
This method saves an instance of IlvUnitConverter to the specified output file. | |
IlDouble | toMeters (IlDouble units) const |
This method converts the measurement unit units to meters. | |
Static Public Member Functions | |
static const IlvUnitConverter * | FT () |
The unit converter for feet. | |
static const IlvUnitConverter * | GetRegisteredConverter (const char *unit) |
Returns the registered IlvUnitConverter whose name is specified. | |
static const IlvUnitConverter *const * | GetRegisteredConverters (IlUInt &count) |
Returns the list of all registered unit converters. | |
static const IlvUnitConverter * | KILOMETERS () |
The unit converter for kilometers. | |
static const IlvUnitConverter * | KMI () |
The unit converter for international nautical miles. | |
static IlvUnitConverter * | Load (IlvInputFile &file, IlvMapsError *status=0) |
Loads an IlvUnitConverter from the specified input. | |
static const IlvUnitConverter * | METERS () |
The unit converter for meters. | |
static const IlvUnitConverter * | MI () |
The unit converter for international statute miles. |
This class provides facilities to convert Cartesian data to various measurement units.
Library: ilvmaps
IlvUnitConverter::IlvUnitConverter | ( | IlDouble | toMeters, | |
const char * | unit, | |||
const char * | description = 0 | |||
) |
This constructor initializes a new instance of IlvUnitConverter
using the specified coefficient to convert the measurement unit to meters, and the specified unit name and description.
toMeters | The coefficient used to convert the measurement unit to meters. | |
unit | The name of the measurement unit. | |
description | The description of the measurement unit. |
IlvUnitConverter* IlvUnitConverter::copy | ( | ) | const |
Returns a copy of this instance of unit converter.
This method converts a measurement expressed in meters to the measurement unit.
meters | The measurement to be converted, expressed in meters. |
static const IlvUnitConverter* IlvUnitConverter::FT | ( | ) | [static] |
The unit converter for feet.
const char* IlvUnitConverter::getDescription | ( | ) | const |
This method returns the description of the measurement unit of this converter.
static const IlvUnitConverter* IlvUnitConverter::GetRegisteredConverter | ( | const char * | unit | ) | [static] |
Returns the registered IlvUnitConverter
whose name is specified.
This static member method returns the registered unit converter whose name is specified as the unit argument.
unit | The name of the unit converter to be retrieved. |
static const IlvUnitConverter* const* IlvUnitConverter::GetRegisteredConverters | ( | IlUInt & | count | ) | [static] |
Returns the list of all registered unit converters.
This static member function returns an array of count converters that includes all the registered unit converters.
count | Returns the total number of registered unit converters. |
IlDouble IlvUnitConverter::getToMeters | ( | ) | const |
Returns the coefficient used to convert the measurement unit to meters.
const char* IlvUnitConverter::getUnit | ( | ) | const |
This method returns the name of the measurement unit of this converter.
static const IlvUnitConverter* IlvUnitConverter::KILOMETERS | ( | ) | [static] |
The unit converter for kilometers.
static const IlvUnitConverter* IlvUnitConverter::KMI | ( | ) | [static] |
The unit converter for international nautical miles.
static IlvUnitConverter* IlvUnitConverter::Load | ( | IlvInputFile & | file, | |
IlvMapsError * | status = 0 | |||
) | [static] |
Loads an IlvUnitConverter
from the specified input.
This static member method loads an instance of IlvUnitConverter
from the specified input file. It can be used, for example, within the read()
method of a subclass of IlvNamedProperty
.
file | The IlvInputFile to read a converter from. | |
status | A status holder. If this parameter is specified, it will contain IlvMaps::NoError() if no error occurs, an error code otherwise. |
static const IlvUnitConverter* IlvUnitConverter::METERS | ( | ) | [static] |
The unit converter for meters.
static const IlvUnitConverter* IlvUnitConverter::MI | ( | ) | [static] |
The unit converter for international statute miles.
void IlvUnitConverter::save | ( | IlvOutputFile & | file | ) | const |
This method saves an instance of IlvUnitConverter
to the specified output file.
It can be used, for example, within the write()
method of a subclass of IlvNamedProperty
.
file | The IlvOutputFile this converter is to be saved in. |
© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.