10 #include <boost/variant/static_visitor.hpp> 11 #include <boost/uuid/uuid.hpp> 12 #include <boost/uuid/uuid_io.hpp> 13 #include <boost/variant.hpp> 19 namespace duds {
namespace data {
21 class GenericValueArray;
22 class GenericValueTable;
24 template <
typename N =
double>
28 throw boost::bad_visit();
31 throw boost::bad_visit();
34 const boost::recursive_wrapper<duds::general::LanguageTaggedStringMap> &)
const {
35 throw boost::bad_visit();
44 throw boost::bad_visit();
53 template<
typename A, std::
size_t S>
55 throw boost::bad_visit();
58 template<
class S,
class R,
template<
class,
class>
class Duration = std::chrono::duration>
60 return std::chrono::duration_cast< Duration< N, std::ratio<1,1> > >(d).count();
66 throw boost::bad_visit();
69 throw boost::bad_visit();
76 N
operator() (
const std::shared_ptr< std::vector<char> > &)
const {
77 throw boost::bad_visit();
92 const boost::recursive_wrapper<duds::general::LanguageTaggedStringMap> &)
const {
93 throw boost::bad_visit();
96 std::string
operator() (
const double &n)
const;
97 std::string
operator() (
const boost::uuids::uuid &u)
const;
100 throw boost::bad_visit();
104 std::ostringstream os;
109 template<
typename A, std::
size_t S>
111 std::ostringstream os;
128 throw boost::bad_visit();
135 std::string
operator() (
const std::shared_ptr< std::vector<char> > &)
const {
136 throw boost::bad_visit();
144 return IST(
typename IST::duration(
145 std::chrono::duration_cast<typename IST::period>(
146 in.time_since_epoch()
156 throw boost::bad_visit();
161 throw boost::bad_visit();
164 const boost::recursive_wrapper<duds::general::LanguageTaggedStringMap> &)
const {
165 throw boost::bad_visit();
168 throw boost::bad_visit();
171 throw boost::bad_visit();
174 throw boost::bad_visit();
177 throw boost::bad_visit();
180 throw boost::bad_visit();
182 template<
typename A, std::
size_t S>
184 throw boost::bad_visit();
187 throw boost::bad_visit();
190 throw boost::bad_visit();
199 throw boost::bad_visit();
206 IST
operator() (
const std::shared_ptr< std::vector<char> > &)
const {
207 throw boost::bad_visit();
215 return IST(
typename IST::rep(
216 std::chrono::duration_cast<typename IST::period>(in)
225 throw boost::bad_visit();
230 throw boost::bad_visit();
233 const boost::recursive_wrapper<duds::general::LanguageTaggedStringMap> &)
const {
234 throw boost::bad_visit();
237 throw boost::bad_visit();
240 throw boost::bad_visit();
243 throw boost::bad_visit();
250 throw boost::bad_visit();
254 throw boost::bad_visit();
256 template<
typename A, std::
size_t S>
258 throw boost::bad_visit();
267 throw boost::bad_visit();
270 throw boost::bad_visit();
273 throw boost::bad_visit();
280 IST
operator() (
const std::shared_ptr< std::vector<char> > &)
const {
281 throw boost::bad_visit();
A container for a value and a unit to better describe the value.
Wraps an integer to allow the Boost multiprecision library to provide insertion and extraction operat...
std::string string
A string encoded in UTF-8.
Unit unit
The units describing the value.
Holds a string and its associated language.
An array of quantites of dynamic size and number of dimensions.
void toDuration(Duration &d) const
Sets a duration to the seconds stored in this quantity.
An extention to the C++ std::chrono::time_point template to make time points easier to work with...
static std::wstring_convert< std::codecvt_utf8< char32_t >, char32_t > conv
String converter; UTF-8 to/from UTF-32.
std::chrono::duration< int128_t, std::femto > Femtoseconds
Stores a duration in femtoseconds.
N operator()(const std::string &s) const
An idea that is not yet implemented; DO NOT USE.
double value
Some value; probably something measured.
A set of key-value pairs where the value can be one of several types.
std::chrono::duration< std::uint64_t, std::nano > Nanoseconds
Stores a duration in nanoseconds.
constexpr Unit Second(DUDS_UNIT_VALUE(0, 0, 0, 0, 0, 0, 1, 0, 0))