10 #ifndef MSGPACK_V1_TYPE_CPP11_TIMESPEC_HPP
11 #define MSGPACK_V1_TYPE_CPP11_TIMESPEC_HPP
36 v.tv_sec =
static_cast<decltype(v.tv_sec)
>(sec);
42 v.tv_sec =
static_cast<decltype(v.tv_sec)
>(value & 0x00000003ffffffffLL);
43 v.tv_nsec=
static_cast<decltype(v.tv_nsec)
>(value >> 34);
50 v.tv_sec =
static_cast<decltype(v.tv_sec)
>(sec);
51 v.tv_nsec =
static_cast<decltype(v.tv_nsec)
>(nanosec);
62 template <
typename Stream>
64 if ((
static_cast<uint64_t
>(v.tv_sec) >> 34) == 0) {
65 uint64_t data64 = (
static_cast<uint64_t
>(v.tv_nsec) << 34) |
static_cast<uint64_t
>(v.tv_sec);
66 if ((data64 & 0xffffffff00000000L) == 0) {
69 uint32_t data32 =
static_cast<uint32_t
>(data64);
97 if ((
static_cast<uint64_t
>(v.tv_sec) >> 34) == 0) {
98 uint64_t data64 = (
static_cast<uint64_t
>(v.tv_nsec) << 34) |
static_cast<uint64_t
>(v.tv_sec);
99 if ((data64 & 0xffffffff00000000L) == 0) {
104 p[0] =
static_cast<char>(-1);
105 uint32_t data32 =
static_cast<uint32_t
>(data64);
114 p[0] =
static_cast<char>(-1);
124 p[0] =
static_cast<char>(-1);
The class template that supports continuous packing.
Definition: pack.hpp:33
packer< Stream > & pack_ext(size_t l, int8_t type)
Packing ext header, type, and length.
Definition: pack.hpp:1316
packer< Stream > & pack_ext_body(const char *b, uint32_t l)
Packing ext body.
Definition: pack.hpp:1375
Definition: object_fwd.hpp:231
void * allocate_no_align(size_t size)
Definition: cpp03_zone.hpp:271
@ EXT
Definition: object_fwd_decl.hpp:42
Definition: adaptor_base.hpp:15
msgpack::object const & operator()(msgpack::object const &o, timespec &v) const
Definition: timespec.hpp:29
Definition: adaptor_base.hpp:27
void operator()(msgpack::object::with_zone &o, const timespec &v) const
Definition: timespec.hpp:96
Definition: adaptor_base.hpp:43
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const timespec &v) const
Definition: timespec.hpp:63
Definition: adaptor_base.hpp:32
Definition: object.hpp:35
msgpack::zone & zone
Definition: object.hpp:37
const char * data() const
Definition: object_fwd.hpp:44
int8_t type() const
Definition: object_fwd.hpp:43
const char * ptr
Definition: object_fwd.hpp:46
uint32_t size
Definition: object_fwd.hpp:45
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:75
union_type via
Definition: object_fwd.hpp:93
msgpack::type::object_type type
Definition: object_fwd.hpp:92
#define _msgpack_load64(cast, from, to)
Definition: sysdep.hpp:172
#define _msgpack_store32(to, num)
Definition: sysdep.hpp:179
#define _msgpack_store64(to, num)
Definition: sysdep.hpp:181
#define _msgpack_load32(cast, from, to)
Definition: sysdep.hpp:168
msgpack::object_ext ext
Definition: object_fwd.hpp:89
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:66