MessagePack for C++
Macros
define_decl.hpp File Reference
#include <boost/preprocessor.hpp>
#include "msgpack/versioning.hpp"
#include "msgpack/adaptor/int.hpp"
#include "msgpack/v1/adaptor/define_decl.hpp"
#include "msgpack/v2/adaptor/define_decl.hpp"
#include "msgpack/v3/adaptor/define_decl.hpp"
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_DEFINE_ARRAY(...)
 
#define MSGPACK_BASE_ARRAY(base)   (*const_cast<base *>(static_cast<base const*>(this)))
 
#define MSGPACK_NVP(name, value)   (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)    (BOOST_PP_STRINGIZE(base))(*const_cast<base *>(static_cast<base const*>(this)))
 
#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)    (*const_cast<base *>(static_cast<base const*>(this)))

◆ MSGPACK_BASE_MAP

#define MSGPACK_BASE_MAP (   base)     (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 \
{ \
} \
void msgpack_unpack(msgpack::object const& 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); \
}
Definition: cpp03_zone.hpp:31
define_array make_define_array()
Definition: cpp03_define_array.hpp:4274
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:75
void msgpack_object(msgpack::object *o, msgpack::zone &z) const
Definition: cpp11_define_array.hpp:78
void msgpack_pack(Packer &pk) const
Definition: cpp11_define_array.hpp:66
void msgpack_unpack(msgpack::object const &o)
Definition: cpp11_define_array.hpp:72

◆ 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:47

◆ MSGPACK_NVP

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