YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarp::conf::numeric Namespace Reference

Functions

template<typename IntegerType , std::enable_if_t< std::is_integral< IntegerType >::value &&!std::is_same< IntegerType, bool >::value, bool > = true>
std::string to_string (IntegerType x)
 
template<typename BoolType , std::enable_if_t< std::is_same< BoolType, bool >::value, bool > = true>
std::string to_string (BoolType x)
 
template<typename FloatingType , std::enable_if_t< std::is_floating_point< FloatingType >::value, bool > = true>
std::string to_string (FloatingType x)
 
template<typename IntegerType , std::enable_if_t< std::is_integral< IntegerType >::value &&std::is_signed< IntegerType >::value &&!std::is_same< IntegerType, bool >::value, bool > = true>
IntegerType from_string (const std::string &src, IntegerType defaultValue=static_cast< IntegerType >(0))
 
template<typename BoolType , std::enable_if_t< std::is_same< BoolType, bool >::value, bool > = true>
BoolType from_string (const std::string &src, BoolType defaultValue=false)
 
template<typename FloatingType , std::enable_if_t< std::is_floating_point< FloatingType >::value, bool > = true>
FloatingType from_string (const std::string &src, FloatingType defaultValue=static_cast< FloatingType >(0.0))
 
template<typename IntegerType , std::enable_if_t< std::is_integral< IntegerType >::value &&sizeof(IntegerType) !=1 &&!std::is_same< IntegerType, bool >::value, bool > = true>
std::string to_hex_string (IntegerType i)
 

Function Documentation

◆ from_string() [1/3]

template<typename BoolType , std::enable_if_t< std::is_same< BoolType, bool >::value, bool > = true>
BoolType yarp::conf::numeric::from_string ( const std::string &  src,
BoolType  defaultValue = false 
)
inline

Definition at line 247 of file numeric.h.

◆ from_string() [2/3]

template<typename FloatingType , std::enable_if_t< std::is_floating_point< FloatingType >::value, bool > = true>
FloatingType yarp::conf::numeric::from_string ( const std::string &  src,
FloatingType  defaultValue = static_cast<FloatingType>(0.0) 
)
inline

Definition at line 279 of file numeric.h.

◆ from_string() [3/3]

template<typename IntegerType , std::enable_if_t< std::is_integral< IntegerType >::value &&std::is_signed< IntegerType >::value &&!std::is_same< IntegerType, bool >::value, bool > = true>
IntegerType yarp::conf::numeric::from_string ( const std::string &  src,
IntegerType  defaultValue = static_cast<IntegerType>(0) 
)
inline

Definition at line 164 of file numeric.h.

◆ to_hex_string()

template<typename IntegerType , std::enable_if_t< std::is_integral< IntegerType >::value &&sizeof(IntegerType) !=1 &&!std::is_same< IntegerType, bool >::value, bool > = true>
std::string yarp::conf::numeric::to_hex_string ( IntegerType  i)

Definition at line 321 of file numeric.h.

◆ to_string() [1/3]

template<typename BoolType , std::enable_if_t< std::is_same< BoolType, bool >::value, bool > = true>
std::string yarp::conf::numeric::to_string ( BoolType  x)
inline

Definition at line 125 of file numeric.h.

◆ to_string() [2/3]

template<typename FloatingType , std::enable_if_t< std::is_floating_point< FloatingType >::value, bool > = true>
std::string yarp::conf::numeric::to_string ( FloatingType  x)
inline

Definition at line 135 of file numeric.h.

◆ to_string() [3/3]

template<typename IntegerType , std::enable_if_t< std::is_integral< IntegerType >::value &&!std::is_same< IntegerType, bool >::value, bool > = true>
std::string yarp::conf::numeric::to_string ( IntegerType  x)
inline

Definition at line 115 of file numeric.h.