15 #include <boost/serialization/split_free.hpp> 16 #include <boost/serialization/nvp.hpp> 18 namespace boost {
namespace serialization {
24 #define TIMESER(IST, INT, GET, SETOP, FLD) \ 25 template <class Archive> \ 26 void save(Archive &ar, const duds::time::interstellar::IST &t, const unsigned int) { \ 28 ar & boost::serialization::make_nvp(#FLD, val); \ 30 template <class Archive> \ 31 void load(Archive &ar, duds::time::interstellar::IST &t, const unsigned int) { \ 33 ar & boost::serialization::make_nvp(#FLD, val); \ 34 t = duds::time::interstellar::IST(SET ## SETOP(val)); \ 36 template <class Archive> \ 37 void serialize(Archive &a, duds::time::interstellar::IST &t, const unsigned int v) { \ 38 split_free(a, t, v); \ 41 #define SETDUR(val) val.value 42 #define SETPTR(val) duds::time::interstellar::Femtoseconds(val.value) 43 #define SETSELF(val) val 44 #define SETMILLI(val) duds::time::interstellar::Milliseconds(val) 45 #define SETNANO(val) duds::time::interstellar::Nanoseconds(val) 46 #define SETSEC(val) duds::time::interstellar::Seconds(val)
Wraps an integer to allow the Boost multiprecision library to provide insertion and extraction operat...
MilliClock::time_point MilliTime
A point in time in Interstellar Time stored in Milliseconds.
std::chrono::duration< std::int64_t > Seconds
Stores a duration in seconds.
SecondClock::time_point SecondTime
A point in time in Interstellar Time stored in Seconds.
std::chrono::duration< int128_t, std::femto > Femtoseconds
Stores a duration in femtoseconds.
FemtoClock::time_point FemtoTime
A point in time in Interstellar Time stored in Femtoseconds.
std::chrono::duration< std::int64_t, std::milli > Milliseconds
Stores a duration in milliseconds.
std::chrono::duration< std::uint64_t, std::nano > Nanoseconds
Stores a duration in nanoseconds.
#define TIMESER(IST, INT, GET, SETOP, FLD)
Makes serialization functions.
NanoClock::time_point NanoTime
A point in time in Interstellar Time stored in Nanoseconds.