9 #ifndef _dca5b15b_b8df_4925_a446_d42efe06c923
10 #define _dca5b15b_b8df_4925_a446_d42efe06c923
13 #include <initializer_list>
42 typedef int64_t Integer;
54 typedef std::vector<Real>
Reals;
60 typedef std::vector<std::shared_ptr<DataSet>>
DataSets;
63 typedef std::vector<std::vector<uint8_t>>
Binary;
65 #define ODIL_VALUE_CONSTRUCTORS(type) \
66 Value(type const & value); \
67 Value(type && value); \
68 Value(std::initializer_list<type::value_type> const & value);
79 #undef ODIL_VALUE_CONSTRUCTORS
81 Value(std::initializer_list<int>
const & value);
83 Value(std::initializer_list<std::initializer_list<uint8_t>>
const & value);
89 Value(Value
const &) =
default;
90 Value(Value &&) =
default;
91 Value & operator=(Value
const &) =
default;
92 Value & operator=(Value &&) =
default;
96 Type get_type()
const;
102 std::size_t size()
const;
109 Integers
const & as_integers()
const;
116 Integers & as_integers();
123 Reals
const & as_reals()
const;
137 Strings
const & as_strings()
const;
144 Strings & as_strings();
151 DataSets
const & as_data_sets()
const;
158 DataSets & as_data_sets();
165 Binary
const & as_binary()
const;
172 Binary & as_binary();
189 std::shared_ptr<DataSets> _data_sets;
209 template<
typename TVisitor>
210 typename TVisitor::result_type
211 apply_visitor(TVisitor
const & visitor, Value
const & value);
216 template<
typename TVisitor>
217 typename TVisitor::result_type
222 #include "odil/Value.txx"
224 #endif // _dca5b15b_b8df_4925_a446_d42efe06c923