3#include <boost/algorithm/string.hpp>
14template<
typename TargetType>
29bool ArgumentBase::convertFromString<bool>(std::string
const& s,
bool&
ok) {
35 std::string
lowerInput = boost::algorithm::to_lower_copy(s);
45 std::istringstream stream(s);
47 ok = (stream >> t) && (stream >> std::ws).eof();
51template<
typename ValueType>
53 std::ostringstream stream;
This class serves as the (untemplated) base class of argument classes.
static TargetType convertFromString(std::string const &valueAsString, bool &conversionSuccessful)
Converts the given value represented as a string to the type of the template parameter.
static std::string convertToString(ValueType const &value)
Converts the given value to a string representation.
SettingsType const & getModule()
Get module.
std::ostream & operator<<(std::ostream &out, ArgumentBase const &argument)