PROJ C++ API
Public Types | Public Member Functions | Static Public Member Functions | List of all members
osgeo::proj::operation::ParameterValue Class Referencefinal

The value of the coordinate operation parameter. More...

#include <coordinateoperation.hpp>

Inheritance diagram for osgeo::proj::operation::ParameterValue:
Inheritance graph
[legend]
Collaboration diagram for osgeo::proj::operation::ParameterValue:
Collaboration graph
[legend]

Public Types

enum  Type {
  Type::MEASURE, Type::STRING, Type::INTEGER, Type::BOOLEAN,
  Type::FILENAME
}
 
- Public Types inherited from osgeo::proj::util::IComparable
enum  Criterion { Criterion::STRICT, Criterion::EQUIVALENT }
 Comparison criterion. More...
 

Public Member Functions

const Typetype () PROJ_CONST_DECL
 Returns the type of a parameter value. More...
 
const common::Measurevalue () PROJ_CONST_DECL
 Returns the value as a Measure (assumes type() == Type::MEASURE) More...
 
const std::string & stringValue () PROJ_CONST_DECL
 Returns the value as a string (assumes type() == Type::STRING) More...
 
const std::string & valueFile () PROJ_CONST_DECL
 Returns the value as a filename (assumes type() == Type::FILENAME) More...
 
int integerValue () PROJ_CONST_DECL
 Returns the value as a integer (assumes type() == Type::INTEGER) More...
 
bool booleanValue () PROJ_CONST_DECL
 Returns the value as a boolean (assumes type() == Type::BOOLEAN) More...
 
bool isEquivalentTo (const util::IComparable *other, util::IComparable::Criterion criterion=util::IComparable::Criterion::STRICT) const override
 Returns whether an object is equivalent to another one. More...
 
- Public Member Functions inherited from osgeo::proj::io::IWKTExportable
std::string exportToWKT (WKTFormatter *formatter) const
 

Static Public Member Functions

static ParameterValueNNPtr create (const common::Measure &measureIn)
 Instanciate a ParameterValue from a Measure (i.e. a value associated with a unit) More...
 
static ParameterValueNNPtr create (const char *stringValueIn)
 Instanciate a ParameterValue from a string value. More...
 
static ParameterValueNNPtr create (const std::string &stringValueIn)
 Instanciate a ParameterValue from a string value. More...
 
static ParameterValueNNPtr create (int integerValueIn)
 Instanciate a ParameterValue from a integer value. More...
 
static ParameterValueNNPtr create (bool booleanValueIn)
 Instanciate a ParameterValue from a boolean value. More...
 
static ParameterValueNNPtr createFilename (const std::string &stringValueIn)
 Instanciate a ParameterValue from a filename. More...
 

Detailed Description

The value of the coordinate operation parameter.

Most parameter values are numeric, but other types of parameter values are possible.

Remarks
Implements ParameterValue from ISO 19111:2018

Member Enumeration Documentation

Type of the value.

Enumerator
MEASURE 

Measure (i.e. value with a unit)

STRING 

String

INTEGER 

Integer

BOOLEAN 

Boolean

FILENAME 

Filename

Member Function Documentation

bool osgeo::proj::operation::ParameterValue::booleanValue ( )

Returns the value as a boolean (assumes type() == Type::BOOLEAN)

Returns
the value as a boolean.
ParameterValueNNPtr osgeo::proj::operation::ParameterValue::create ( const common::Measure measureIn)
static

Instanciate a ParameterValue from a Measure (i.e. a value associated with a unit)

Returns
a new ParameterValue.
ParameterValueNNPtr osgeo::proj::operation::ParameterValue::create ( const char *  stringValueIn)
static

Instanciate a ParameterValue from a string value.

Returns
a new ParameterValue.
ParameterValueNNPtr osgeo::proj::operation::ParameterValue::create ( const std::string &  stringValueIn)
static

Instanciate a ParameterValue from a string value.

Returns
a new ParameterValue.
ParameterValueNNPtr osgeo::proj::operation::ParameterValue::create ( int  integerValueIn)
static

Instanciate a ParameterValue from a integer value.

Returns
a new ParameterValue.
ParameterValueNNPtr osgeo::proj::operation::ParameterValue::create ( bool  booleanValueIn)
static

Instanciate a ParameterValue from a boolean value.

Returns
a new ParameterValue.
ParameterValueNNPtr osgeo::proj::operation::ParameterValue::createFilename ( const std::string &  stringValueIn)
static

Instanciate a ParameterValue from a filename.

Returns
a new ParameterValue.
int osgeo::proj::operation::ParameterValue::integerValue ( )

Returns the value as a integer (assumes type() == Type::INTEGER)

Returns
the value as a integer.
bool osgeo::proj::operation::ParameterValue::isEquivalentTo ( const util::IComparable other,
util::IComparable::Criterion  criterion = util::IComparable::Criterion::STRICT 
) const
overridevirtual

Returns whether an object is equivalent to another one.

Parameters
otherother object to compare to
criterioncomparaison criterion.
Returns
true if objects are equivalent.

Implements osgeo::proj::util::IComparable.

const std::string & osgeo::proj::operation::ParameterValue::stringValue ( )

Returns the value as a string (assumes type() == Type::STRING)

Returns
the value as a string.
const ParameterValue::Type & osgeo::proj::operation::ParameterValue::type ( )

Returns the type of a parameter value.

Returns
the type.
const common::Measure & osgeo::proj::operation::ParameterValue::value ( )

Returns the value as a Measure (assumes type() == Type::MEASURE)

Returns
the value as a Measure.
const std::string & osgeo::proj::operation::ParameterValue::valueFile ( )

Returns the value as a filename (assumes type() == Type::FILENAME)

Returns
the value as a filename.

The documentation for this class was generated from the following files: