1 #ifndef REFLECTIVE_RAPIDJSON_BINARY_REFLECTOR_CHRONO_UTILITIES_H
2 #define REFLECTIVE_RAPIDJSON_BINARY_REFLECTOR_CHRONO_UTILITIES_H
13 #include <c++utilities/chrono/datetime.h>
14 #include <c++utilities/chrono/timespan.h>
17 namespace BinaryReflector {
19 template <>
inline void readCustomType<CppUtilities::DateTime>(
BinaryDeserializer &deserializer, CppUtilities::DateTime &dateTime)
21 deserializer.
read(dateTime.ticks());
24 template <>
inline void writeCustomType<CppUtilities::DateTime>(
BinarySerializer &serializer,
const CppUtilities::DateTime &dateTime)
26 serializer.
write(dateTime.totalTicks());
29 template <>
inline void readCustomType<CppUtilities::TimeSpan>(
BinaryDeserializer &deserializer, CppUtilities::TimeSpan &timeSpan)
31 deserializer.
read(timeSpan.ticks());
34 template <>
inline void writeCustomType<CppUtilities::TimeSpan>(
BinarySerializer &serializer,
const CppUtilities::TimeSpan &timeSpan)
36 serializer.
write(timeSpan.totalTicks());
42 #endif // REFLECTIVE_RAPIDJSON_BINARY_REFLECTOR_CHRONO_UTILITIES_H