1#ifndef OPM_TYPETOOLS_HPP
2#define OPM_TYPETOOLS_HPP
4#include <opm/input/eclipse/Deck/UDAValue.hpp>
42 static std::vector<std::string> strings(
const std::vector<RawString>& raw_strings) {
43 std::vector<std::string> std_strings;
44 std_strings.reserve(raw_strings.size());
45 std::copy(raw_strings.begin(), raw_strings.end(), std::back_inserter(std_strings));
49 template<
class Serializer>
52 serializer(
static_cast<std::string&
>(*
this));
57inline std::string tag_name( type_tag x ) {
59 case type_tag::integer:
return "int";
60 case type_tag::string:
return "std::string";
61 case type_tag::raw_string:
return "RawString";
62 case type_tag::fdouble:
return "double";
63 case type_tag::uda:
return "UDAValue";
64 case type_tag::unknown:
return "unknown";
69template<
typename T > type_tag get_type();
71template<>
inline type_tag get_type< int >() {
72 return type_tag::integer;
75template<>
inline type_tag get_type< double >() {
76 return type_tag::fdouble;
79template<>
inline type_tag get_type< std::string >() {
80 return type_tag::string;
83template<>
inline type_tag get_type< RawString >() {
84 return type_tag::raw_string;
87template<>
inline type_tag get_type<UDAValue>() {
Definition Typetools.hpp:39
Class for (de-)serializing.
Definition Serializer.hpp:91
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30