MessagePack for C++
Loading...
Searching...
No Matches
define_decl.hpp File Reference
Include dependency graph for define_decl.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BOOST_PP_VARIADICS
#define MSGPACK_BASE_ARRAY(base)
#define MSGPACK_NVP(name, value)
#define MSGPACK_DEFINE_MAP_EACH_PROC(r, data, elem)
#define MSGPACK_DEFINE_MAP_IMPL(...)
#define MSGPACK_DEFINE_MAP(...)
#define MSGPACK_BASE_MAP(base)
#define MSGPACK_DEFINE_ARRAY(...)
#define MSGPACK_ADD_ENUM(enum_name)
#define MSGPACK_DEFINE   MSGPACK_DEFINE_ARRAY
#define MSGPACK_BASE   MSGPACK_BASE_ARRAY

Macro Definition Documentation

◆ BOOST_PP_VARIADICS

#define BOOST_PP_VARIADICS

◆ MSGPACK_ADD_ENUM

#define MSGPACK_ADD_ENUM ( enum_name)

◆ MSGPACK_BASE

#define MSGPACK_BASE   MSGPACK_BASE_ARRAY

◆ MSGPACK_BASE_ARRAY

#define MSGPACK_BASE_ARRAY ( base)
Value:
(*const_cast<base *>(static_cast<base const*>(this)))

◆ MSGPACK_BASE_MAP

#define MSGPACK_BASE_MAP ( base)
Value:
(BOOST_PP_STRINGIZE(base))(*const_cast<base *>(static_cast<base const*>(this)))

◆ MSGPACK_DEFINE

#define MSGPACK_DEFINE   MSGPACK_DEFINE_ARRAY

◆ MSGPACK_DEFINE_ARRAY

#define MSGPACK_DEFINE_ARRAY ( ...)
Value:
template <typename Packer> \
void msgpack_pack(Packer& msgpack_pk) const \
{ \
msgpack::type::make_define_array(__VA_ARGS__).msgpack_pack(msgpack_pk); \
} \
void msgpack_unpack(msgpack::object const& msgpack_o) \
{ \
msgpack::type::make_define_array(__VA_ARGS__).msgpack_unpack(msgpack_o); \
}\
template <typename MSGPACK_OBJECT> \
void msgpack_object(MSGPACK_OBJECT* msgpack_o, msgpack::zone& msgpack_z) const \
{ \
msgpack::type::make_define_array(__VA_ARGS__).msgpack_object(msgpack_o, msgpack_z); \
}
Object class that corresponding to MessagePack format object.
Definition object_fwd.hpp:77

◆ MSGPACK_DEFINE_MAP

#define MSGPACK_DEFINE_MAP ( ...)
Value:
template <typename Packer> \
void msgpack_pack(Packer& msgpack_pk) const \
{ \
msgpack::type::make_define_map \
MSGPACK_DEFINE_MAP_IMPL(__VA_ARGS__) \
.msgpack_pack(msgpack_pk); \
} \
void msgpack_unpack(msgpack::object const& msgpack_o) \
{ \
msgpack::type::make_define_map \
MSGPACK_DEFINE_MAP_IMPL(__VA_ARGS__) \
.msgpack_unpack(msgpack_o); \
}\
template <typename MSGPACK_OBJECT> \
void msgpack_object(MSGPACK_OBJECT* msgpack_o, msgpack::zone& msgpack_z) const \
{ \
msgpack::type::make_define_map \
MSGPACK_DEFINE_MAP_IMPL(__VA_ARGS__) \
.msgpack_object(msgpack_o, msgpack_z); \
}

◆ MSGPACK_DEFINE_MAP_EACH_PROC

#define MSGPACK_DEFINE_MAP_EACH_PROC ( r,
data,
elem )
Value:
BOOST_PP_IF( \
BOOST_PP_IS_BEGIN_PARENS(elem), \
elem, \
(BOOST_PP_STRINGIZE(elem))(elem) \
)

◆ MSGPACK_DEFINE_MAP_IMPL

#define MSGPACK_DEFINE_MAP_IMPL ( ...)
Value:
BOOST_PP_SEQ_TO_TUPLE( \
BOOST_PP_SEQ_FOR_EACH( \
0, \
BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__) \
) \
)
#define MSGPACK_DEFINE_MAP_EACH_PROC(r, data, elem)
Definition define_decl.hpp:84

◆ MSGPACK_NVP

#define MSGPACK_NVP ( name,
value )
Value:
(name) (value)