9#include <kernel/util/string.hpp>
30 template<
typename ValueType_>
96 if(!(is >> str).fail())
101 is.setstate(std::ios::failbit);
112 if(!(is >> str).fail())
117 is.setstate(std::ios::failbit);
138 return (os << (val.
_value));
144 return (os << (val._value));
161 template<
typename ValueType_>
182 template<
typename ValueType_>
String class implementation.
String-Mapped class template.
const std::map< String, ValueType_ > & _value_map
the string map
ValueType_ & _value
the value
StringMapped(ValueType_ &value, const std::map< String, ValueType_ > &value_map)
Constructor.
friend std::istream & operator>>(std::istream &is, StringMapped &val)
Input stream extraction operator.
bool lookup(const String &str)
Looks up the value in the map from a given string.
friend std::ostream & operator<<(std::ostream &os, const StringMapped &val)
Output stream insertion operator.
StringMapped< ValueType_ > string_mapped(ValueType_ &value, const std::map< String, ValueType_ > &value_map)
Creates a StringMapped object.
@ value
specifies whether the space should supply basis function values
bool string_mapped_lookup(ValueType_ &value, const std::map< String, ValueType_ > &value_map, const String &str)
Looks up a StringMapped value.