1#ifndef OPM_TYPETOOLS_HPP
2#define OPM_TYPETOOLS_HPP
6#include <opm/input/eclipse/Deck/UDAValue.hpp>
40 static std::vector<std::string> strings(
const std::vector<RawString>& raw_strings) {
41 std::vector<std::string> std_strings;
42 std_strings.reserve(raw_strings.size());
43 std::copy(raw_strings.begin(), raw_strings.end(), std::back_inserter(std_strings));
47 template<
class Serializer>
50 serializer(
static_cast<std::string&
>(*
this));
55inline std::string tag_name( type_tag x ) {
57 case type_tag::integer:
return "int";
58 case type_tag::string:
return "std::string";
59 case type_tag::raw_string:
return "RawString";
60 case type_tag::fdouble:
return "double";
61 case type_tag::uda:
return "UDAValue";
62 case type_tag::unknown:
return "unknown";
67template<
typename T > type_tag get_type();
69template<>
inline type_tag get_type< int >() {
70 return type_tag::integer;
73template<>
inline type_tag get_type< double >() {
74 return type_tag::fdouble;
77template<>
inline type_tag get_type< std::string >() {
78 return type_tag::string;
81template<>
inline type_tag get_type< RawString >() {
82 return type_tag::raw_string;
85template<>
inline type_tag get_type<UDAValue>() {
Definition Typetools.hpp:37
Class for (de-)serializing.
Definition Serializer.hpp:84
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30