USRP Hardware Driver and USRP Manual  Version: 4.6.0.0
UHD and USRP Manual
uhd::cast Namespace Reference

Functions

template<typename T >
hexstr_cast (const std::string &in)
 Convert a hexadecimal string into a value. More...
 
template<typename T >
fromstr_cast (const std::string &in)
 
template<typename data_t >
data_t from_str (const std::string &)
 Generic cast-from-string function. More...
 
template<>
UHD_API bool from_str (const std::string &val)
 Specialization of uhd::cast::from_str() for Boolean values. More...
 
template<>
UHD_API double from_str (const std::string &val)
 Specialization of uhd::cast::from_str() for double-precision values. More...
 
template<>
UHD_API int from_str (const std::string &val)
 Specialization of uhd::cast::from_str() for integer values. More...
 
template<>
UHD_API std::string from_str (const std::string &val)
 Specialization of uhd::cast::from_str() for strings. More...
 

Function Documentation

◆ from_str() [1/5]

template<typename data_t >
data_t uhd::cast::from_str ( const std::string &  )

Generic cast-from-string function.

Specialization of uhd::cast::from_str() for strings.

Specialization of uhd::cast::from_str() for integer values.

Specialization of uhd::cast::from_str() for double-precision values.

Specialization of uhd::cast::from_str() for Boolean values.

◆ from_str() [2/5]

template<>
UHD_API bool uhd::cast::from_str ( const std::string &  )

Specialization of uhd::cast::from_str() for Boolean values.

Specialization of uhd::cast::from_str() for Boolean values.

◆ from_str() [3/5]

template<>
UHD_API double uhd::cast::from_str ( const std::string &  )

Specialization of uhd::cast::from_str() for double-precision values.

Specialization of uhd::cast::from_str() for double-precision values.

Specialization of uhd::cast::from_str() for Boolean values.

◆ from_str() [4/5]

template<>
UHD_API int uhd::cast::from_str ( const std::string &  )

Specialization of uhd::cast::from_str() for integer values.

Specialization of uhd::cast::from_str() for integer values.

Specialization of uhd::cast::from_str() for double-precision values.

Specialization of uhd::cast::from_str() for Boolean values.

◆ from_str() [5/5]

template<>
UHD_API std::string uhd::cast::from_str ( const std::string &  )

Specialization of uhd::cast::from_str() for strings.

Specialization of uhd::cast::from_str() for strings.

Specialization of uhd::cast::from_str() for integer values.

Specialization of uhd::cast::from_str() for double-precision values.

Specialization of uhd::cast::from_str() for Boolean values.

◆ fromstr_cast()

template<typename T >
T uhd::cast::fromstr_cast ( const std::string &  in)
inline

Convert hexadecimal, decimal, octal or other strings that support the >> operator into a value depending on the prefix.

◆ hexstr_cast()

template<typename T >
T uhd::cast::hexstr_cast ( const std::string &  in)
inline

Convert a hexadecimal string into a value.