ORCA: Optimization-based framework for Robotic Control Applications
Public Member Functions | List of all members
orca::common::Parameter< T > Class Template Reference

This class holds the conversion from a string (YAML string) to the data type. More...

#include <Parameter.h>

+ Inheritance diagram for orca::common::Parameter< T >:
+ Collaboration diagram for orca::common::Parameter< T >:

Public Member Functions

 Parameter ()
 
template<class T2 >
 Parameter (const T2 &t)
 
bool onLoadFromString (const std::string &s)
 
void print () const
 
bool isSet () const
 
T & get ()
 
const T & get () const
 
template<class T2 >
Parameter< T > & operator= (T2 val)
 
- Public Member Functions inherited from orca::common::ParameterBase
virtual ~ParameterBase ()
 
bool loadFromString (const std::string &s)
 Load the parameter from a YAML string It calls a callback on success. More...
 
const std::string & getName () const
 
void setName (const std::string &name)
 
void setRequired (bool is_required)
 
bool isRequired () const
 
void onSuccess (std::function< void(void)> f)
 The callback called if loadFromString is successful. More...
 
- Public Member Functions inherited from orca::common::ParameterData< T >
 ParameterData ()
 
virtual ~ParameterData ()
 
 ParameterData (const T &val)
 
template<class T2 >
 ParameterData (const ParameterData< T2 > &v)
 
T & get ()
 
const T & get () const
 
void set (const T &val)
 
bool isSet () const
 

Additional Inherited Members

- Public Types inherited from orca::common::ParameterBase
using Ptr = std::shared_ptr< ParameterBase >
 

Detailed Description

template<class T>
class orca::common::Parameter< T >

This class holds the conversion from a string (YAML string) to the data type.

Constructor & Destructor Documentation

◆ Parameter() [1/2]

template<class T>
orca::common::Parameter< T >::Parameter ( )
inline

◆ Parameter() [2/2]

template<class T>
template<class T2 >
orca::common::Parameter< T >::Parameter ( const T2 &  t)
inline

Member Function Documentation

◆ get() [1/2]

template<class T>
T& orca::common::Parameter< T >::get ( )
inline

◆ get() [2/2]

template<class T>
const T& orca::common::Parameter< T >::get ( ) const
inline

◆ isSet()

template<class T>
bool orca::common::Parameter< T >::isSet ( ) const
inlinevirtual

◆ onLoadFromString()

template<class T>
bool orca::common::Parameter< T >::onLoadFromString ( const std::string &  s)
inlinevirtual

◆ operator=()

template<class T>
template<class T2 >
Parameter<T>& orca::common::Parameter< T >::operator= ( T2  val)
inline

◆ print()

template<class T>
void orca::common::Parameter< T >::print ( ) const
inlinevirtual

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