Go to the documentation of this file.
46 template <
class InType>
50 std::ostringstream oss;
51 oss.imbue(std::locale::classic());
66 template <
class OutType>
70 std::istringstream stream(s);
71 stream.imbue(std::locale::classic());
74 if (stream.fail() || !stream.eof())
76 throw std::runtime_error(
"Failed converting string to real number");
81 double toDouble(
const std::string& s)
83 return toRealImpl<double>(s);
86 float toFloat(
const std::string& s)
88 return toRealImpl<float>(s);
locale-agnostic conversion functions from floating point numbers to strings
float toFloat(const std::string &s)
Converts a std::string to float using the classic C locale.
std::string toStringImpl(InType t)
OutType toRealImpl(const std::string &s)
Main namespace for MoveIt.
double toDouble(const std::string &s)
Converts a std::string to double using the classic C locale.
std::string toString(double d)
Convert a double to std::string using the classic C locale.
geometry_msgs::TransformStamped t
moveit_core
Author(s): Ioan Sucan
, Sachin Chitta , Acorn Pooley
autogenerated on Thu Nov 21 2024 03:23:41