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::copy(raw_strings.begin(), raw_strings.end(), std::back_inserter(std_strings));
50 template<
class Serializer>
53 serializer(
static_cast<std::string&
>(*
this));
58inline 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";
70template<
typename T > type_tag get_type();
72template<>
inline type_tag get_type< int >() {
73 return type_tag::integer;
76template<>
inline type_tag get_type< double >() {
77 return type_tag::fdouble;
80template<>
inline type_tag get_type< std::string >() {
81 return type_tag::string;
84template<>
inline type_tag get_type< RawString >() {
85 return type_tag::raw_string;
88template<>
inline type_tag get_type<UDAValue>() {
Definition Typetools.hpp:40
Class for (de-)serializing.
Definition Serializer.hpp:94
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30