43 #ifndef __OPENFLUID_TOOLS_DATAHELPERS_HPP__
44 #define __OPENFLUID_TOOLS_DATAHELPERS_HPP__
54 #include <openfluid/config.hpp>
71 [[deprecated]]
inline bool convertString(
const std::string& StrToConvert, T* Converted)
73 std::istringstream iss(StrToConvert);
75 return ((iss >> (*Converted)) && !iss.get(c));
116 [[deprecated]]
inline bool convertValue(
const T& ValueToConvert, std::string* StrConverted)
118 std::ostringstream oss;
119 bool IsOK = !(oss << ValueToConvert).fail();
123 (*StrConverted) = oss.str();
134 inline bool convertValue(
const double& ValueToConvert, std::string* StrConverted,
135 int Precision=openfluid::config::DEFAULT_INTERNAL_DOUBLE_PRECISION)
137 std::ostringstream oss;
140 oss << std::setprecision(Precision);
142 bool IsOK = !(oss << ValueToConvert).fail();
146 (*StrConverted) = oss.str();
165 [[deprecated]]
inline std::string
convertValue(
const T& ValueToConvert)
167 std::string Converted;
183 int Precision=openfluid::config::DEFAULT_INTERNAL_DOUBLE_PRECISION)
185 std::string Converted;
208 std::vector<std::string>& Tokens,
209 const std::string& Delimiters);
221 const std::string& Separators,
222 bool ReturnsEmpty =
false);
235 bool ReturnsEmpty =
false);
246 const std::string& ToSearch,
const std::string& ReplaceStr);
Definition: FrameworkException.hpp:51
#define OPENFLUID_API
Definition: dllexport.hpp:86
Definition: ApplicationException.hpp:47