19 #ifndef PBD_STRING_CONVERT_H
20 #define PBD_STRING_CONVERT_H
76 typename T::TO_STRING_TEMPLATE_NOT_DEFINED_FOR_THIS_TYPE invalid_type;
87 inline bool to_string (int8_t val, std::string& str)
93 inline bool to_string (uint8_t val, std::string& str)
99 inline bool to_string (int16_t val, std::string& str)
151 typename T::TO_STRING_TEMPLATE_NOT_DEFINED_FOR_THIS_TYPE invalid_type;
156 inline bool string_to (
const std::string& str,
bool& val)
162 inline bool string_to (
const std::string& str, int8_t& val)
166 if (!success)
return false;
172 inline bool string_to (
const std::string& str, uint8_t& val)
176 if (!success)
return false;
182 inline bool string_to (
const std::string& str, int16_t& val)
188 inline bool string_to (
const std::string& str, uint16_t& val)
194 inline bool string_to (
const std::string& str, int32_t& val)
200 inline bool string_to (
const std::string& str, uint32_t& val)
206 inline bool string_to (
const std::string& str, int64_t& val)
212 inline bool string_to (
const std::string& str, uint64_t& val)
218 inline bool string_to (
const std::string& str,
float& val)
224 inline bool string_to (
const std::string& str,
double& val)
238 typename T::TO_STRING_TEMPLATE_NOT_DEFINED_FOR_THIS_TYPE invalid_type;
239 return std::string();
331 inline T
string_to (
const std::string& str)
335 typename T::STRING_TO_TEMPLATE_NOT_DEFINED_FOR_THIS_TYPE invalid_type;
340 inline bool string_to (
const std::string& str)
348 inline int8_t
string_to (
const std::string& str)
356 inline uint8_t
string_to (
const std::string& str)
360 return (uint8_t) tmp;
364 inline int16_t
string_to (
const std::string& str)
372 inline uint16_t
string_to (
const std::string& str)
380 inline int32_t
string_to (
const std::string& str)
388 inline uint32_t
string_to (
const std::string& str)
396 inline int64_t
string_to (
const std::string& str)
404 inline uint64_t
string_to (
const std::string& str)
412 inline float string_to (
const std::string& str)
420 inline double string_to (
const std::string& str)
bool float_to_string(float val, std::string &str)
bool string_to_uint64(const std::string &str, uint64_t &val)
bool string_to_uint16(const std::string &str, uint16_t &val)
bool int16_to_string(int16_t val, std::string &str)
bool uint64_to_string(uint64_t val, std::string &str)
bool string_to_int64(const std::string &str, int64_t &val)
bool int64_to_string(int64_t val, std::string &str)
bool string_to_float(const std::string &str, float &val)
bool string_to_int32(const std::string &str, int32_t &val)
bool string_to_uint32(const std::string &str, uint32_t &val)
bool to_string(ARDOUR::AnyTime const &at, std::string &str)
bool string_to_int16(const std::string &str, int16_t &val)
bool string_to_double(const std::string &str, double &val)
bool uint32_to_string(uint32_t val, std::string &str)
bool double_to_string(double val, std::string &str)
bool string_to_bool(const std::string &str, bool &val)
bool int32_to_string(int32_t val, std::string &str)
bool string_to(std::string const &str, ARDOUR::AnyTime &at)
bool bool_to_string(bool val, std::string &str)
bool uint16_to_string(uint16_t val, std::string &str)