hpp-core 7.0.0
Implement basic classes for canonical path planning for kinematic chains.
Loading...
Searching...
No Matches
hpp::core::Parameter Class Reference

#include <hpp/core/parameter.hh>

Public Types

enum  Type {
  NONE , BOOL , INT , FLOAT ,
  STRING , VECTOR , MATRIX , NB_TYPES
}

Public Member Functions

 ~Parameter ()
void deleteValue ()
 Parameter (const bool &value)
 Parameter (const size_type &value)
 Parameter (const value_type &value)
 Parameter (const std::string &value)
 Parameter (const vector_t &value)
 Parameter (const matrix_t &value)
 Parameter (const Parameter &value)
 Copy constructor.
 Parameter ()
 Construct an empty parameter (None)
Parameter operator= (const Parameter &value)
Type type () const
 Return the type of the value.
bool boolValue () const
size_type intValue () const
value_type floatValue () const
std::string stringValue () const
vector_t vectorValue () const
matrix_t matrixValue () const

Static Public Member Functions

static std::string typeName (Type type)
 Return the name of the type.

Public Attributes

Type type_
const void *const value_

Member Enumeration Documentation

◆ Type

Enumerator
NONE 
BOOL 
INT 

as size_type

FLOAT 

as value_type

STRING 
VECTOR 

as vector_t

MATRIX 

as matrix_t

NB_TYPES 

Constructor & Destructor Documentation

◆ ~Parameter()

hpp::core::Parameter::~Parameter()

◆ Parameter() [1/8]

hpp::core::Parameter::Parameter(const bool &value)
explicit

◆ Parameter() [2/8]

hpp::core::Parameter::Parameter(const size_type &value)
explicit

◆ Parameter() [3/8]

hpp::core::Parameter::Parameter(const value_type &value)
explicit

◆ Parameter() [4/8]

hpp::core::Parameter::Parameter(const std::string &value)
explicit

◆ Parameter() [5/8]

hpp::core::Parameter::Parameter(const vector_t &value)
explicit

◆ Parameter() [6/8]

hpp::core::Parameter::Parameter(const matrix_t &value)
explicit

◆ Parameter() [7/8]

hpp::core::Parameter::Parameter(const Parameter &value)

Copy constructor.

◆ Parameter() [8/8]

hpp::core::Parameter::Parameter()
explicit

Construct an empty parameter (None)

Member Function Documentation

◆ boolValue()

bool hpp::core::Parameter::boolValue()const

◆ deleteValue()

void hpp::core::Parameter::deleteValue()

◆ floatValue()

value_type hpp::core::Parameter::floatValue()const

◆ intValue()

size_type hpp::core::Parameter::intValue()const

◆ matrixValue()

matrix_t hpp::core::Parameter::matrixValue()const

◆ operator=()

Parameter hpp::core::Parameter::operator=(const Parameter &value)

◆ stringValue()

std::string hpp::core::Parameter::stringValue()const

◆ type()

Type hpp::core::Parameter::type()const

Return the type of the value.

◆ typeName()

std::string hpp::core::Parameter::typeName(Typetype)
static

Return the name of the type.

Return the value as a castable value into the approriate type

For instance,

Parameter v1(5.0); // v1 is of type double
Parameter v2(3); // v2 is of type int
double x1 = v1.value();
double x2 = v2.value();
Parameter(const bool &value)

The first assignment will succeed, while the second one will throw an exception.

◆ vectorValue()

vector_t hpp::core::Parameter::vectorValue()const

Member Data Documentation

◆ type_

Type hpp::core::Parameter::type_

◆ value_

const void* const hpp::core::Parameter::value_

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