1 #ifndef OPM_TYPETOOLS_HPP 2 #define OPM_TYPETOOLS_HPP 4 #include <opm/input/eclipse/Deck/UDAValue.hpp> 43 static std::vector<std::string> strings(
const std::vector<RawString>& raw_strings) {
44 std::vector<std::string> std_strings;
45 std_strings.reserve(raw_strings.size());
46 std::ranges::copy(raw_strings, std::back_inserter(std_strings));
50 template<
class Serializer>
53 serializer(static_cast<std::string&>(*
this));
58 inline std::string tag_name( type_tag x ) {
60 case type_tag::integer:
return "int";
61 case type_tag::string:
return "std::string";
62 case type_tag::raw_string:
return "RawString";
63 case type_tag::fdouble:
return "double";
64 case type_tag::uda:
return "UDAValue";
65 case type_tag::unknown:
return "unknown";
70 template<
typename T > type_tag get_type();
72 template<>
inline type_tag get_type< int >() {
73 return type_tag::integer;
76 template<>
inline type_tag get_type< double >() {
77 return type_tag::fdouble;
80 template<>
inline type_tag get_type< std::string >() {
81 return type_tag::string;
84 template<>
inline type_tag get_type< RawString >() {
85 return type_tag::raw_string;
88 template<>
inline type_tag get_type<UDAValue>() {
94 #endif //OPM_TYPETOOLS_HPP This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Definition: Typetools.hpp:39
Class for (de-)serializing.
Definition: Serializer.hpp:94