Namespaces | |
| namespace | detail |
Template implementations for uhd::cast::to_str() for common types. | |
Functions | |
| template<typename T > | |
| T | hexstr_cast (const std::string &in) |
| Convert a hexadecimal string into a value. | |
| template<typename T > | |
| T | fromstr_cast (const std::string &in) |
| template<typename data_t > | |
| data_t | from_str (const std::string &val) |
| Generic cast-from-string function. | |
| template<> | |
| UHD_API bool | from_str (const std::string &val) |
Specialization of uhd::cast::from_str() for Boolean values. | |
| template<> | |
| UHD_API double | from_str (const std::string &val) |
Specialization of uhd::cast::from_str() for double-precision values. | |
| template<> | |
| UHD_API int | from_str (const std::string &val) |
Specialization of uhd::cast::from_str() for integer values. | |
| template<> | |
| UHD_API uint8_t | from_str (const std::string &val) |
Specialization of uhd::cast::from_str() for uint8_t values. | |
| template<> | |
| UHD_API uint16_t | from_str (const std::string &val) |
Specialization of uhd::cast::from_str() for uint16_t values. | |
| template<> | |
| UHD_API uint32_t | from_str (const std::string &val) |
Specialization of uhd::cast::from_str() for uint32_t values. | |
| template<> | |
| UHD_API uint64_t | from_str (const std::string &val) |
Specialization of uhd::cast::from_str() for uint64_t values. | |
| template<> | |
| UHD_API std::string | from_str (const std::string &val) |
Specialization of uhd::cast::from_str() for strings. | |
| UHD_API std::string | to_ordinal_string (int val) |
| Create an ordinal string from a number. | |
| template<typename T > | |
| auto | to_str (const T &val) -> std::enable_if_t< std::is_arithmetic_v< T > &&!std::is_floating_point_v< T > &&!std::is_same_v< T, int8_t > &&!std::is_same_v< T, uint8_t > &&!std::is_enum_v< T > &&!detail::has_to_string_method< T >::value, decltype(std::to_string(val))> |
| SFINAE-based template for integer types that std::to_string can handle. | |
| template<typename T > | |
| std::string | to_str (const std::complex< T > &val) |
| SFINAE-based template for std::complex<T> types. | |
| std::string | to_str (const std::string &val) |
| Overload for std::string and C-style strings. | |
| std::string | to_str (const char *val) |
| data_t uhd::cast::from_str | ( | const std::string & | val | ) |
Generic cast-from-string function.
|
inline |
Specialization of uhd::cast::from_str() for Boolean values.
Specialization of uhd::cast::from_str() for Boolean values.
|
inline |
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.
|
inline |
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.
|
inline |
Specialization of uhd::cast::from_str() for uint8_t values.
Specialization of uhd::cast::from_str() for uint8_t 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.
|
inline |
Specialization of uhd::cast::from_str() for uint16_t values.
Specialization of uhd::cast::from_str() for uint16_t values.
Specialization of uhd::cast::from_str() for uint8_t 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.
|
inline |
Specialization of uhd::cast::from_str() for uint32_t values.
Specialization of uhd::cast::from_str() for uint32_t values.
Specialization of uhd::cast::from_str() for uint16_t values.
Specialization of uhd::cast::from_str() for uint8_t 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.
|
inline |
Specialization of uhd::cast::from_str() for uint64_t values.
Specialization of uhd::cast::from_str() for uint64_t values.
Specialization of uhd::cast::from_str() for uint32_t values.
Specialization of uhd::cast::from_str() for uint16_t values.
Specialization of uhd::cast::from_str() for uint8_t 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.
|
inline |
Specialization of uhd::cast::from_str() for strings.
Specialization of uhd::cast::from_str() for uint64_t values.
Specialization of uhd::cast::from_str() for uint32_t values.
Specialization of uhd::cast::from_str() for uint16_t values.
Specialization of uhd::cast::from_str() for uint8_t 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.
|
inline |
Convert hexadecimal, decimal, octal or other strings that support the >> operator into a value depending on the prefix.
|
inline |
Convert a hexadecimal string into a value.
| UHD_API std::string uhd::cast::to_ordinal_string | ( | int | val | ) |
Create an ordinal string from a number.
|
inline |
| std::string uhd::cast::to_str | ( | const std::complex< T > & | val | ) |
SFINAE-based template for std::complex<T> types.
|
inline |
Overload for std::string and C-style strings.
| auto uhd::cast::to_str | ( | const T & | val | ) | -> std::enable_if_t< std::is_arithmetic_v< T> && !std::is_floating_point_v<T> && !std::is_same_v<T, int8_t> && !std::is_same_v<T, uint8_t> && !std::is_enum_v<T> && !detail::has_to_string_method<T>::value, decltype(std::to_string(val))> |
SFINAE-based template for integer types that std::to_string can handle.
SFINAE-based template for any type that has a to_string() method.
Template specialization for uint8_t.
Template specialization for int8_t.
Template for floating-point types with round-trip safe precision.
SFINAE-based template for enum types.