MessagePack for C++
Classes | Namespaces | Macros | Functions
cpp11_define_map.hpp File Reference
#include <msgpack/preprocessor.hpp>
#include "msgpack/versioning.hpp"
#include "msgpack/adaptor/adaptor_base.hpp"
#include "msgpack/adaptor/int.hpp"
#include <type_traits>
#include <tuple>

Go to the source code of this file.

Classes

struct  msgpack::type::define_map_imp< Tuple, N >
 
struct  msgpack::type::define_map_imp< Tuple, 0 >
 
struct  msgpack::type::define_map< Args >
 

Namespaces

 msgpack
 
 msgpack::type
 

Macros

#define MSGPACK_PP_VARIADICS
 
#define MSGPACK_DEFINE_MAP_EACH_PROC(r, data, elem)
 
#define MSGPACK_DEFINE_MAP_IMPL(...)
 
#define MSGPACK_DEFINE_MAP(...)
 
#define MSGPACK_BASE_MAP(base)   (MSGPACK_PP_STRINGIZE(base))(*const_cast<base *>(static_cast<base const*>(this)))
 

Functions

template<typename... Args>
define_map< Args... > msgpack::type::make_define_map (Args &... args)
 

Macro Definition Documentation

◆ MSGPACK_BASE_MAP

#define MSGPACK_BASE_MAP (   base)    (MSGPACK_PP_STRINGIZE(base))(*const_cast<base *>(static_cast<base const*>(this)))

◆ MSGPACK_DEFINE_MAP

#define MSGPACK_DEFINE_MAP (   ...)
Value:
template <typename Packer> \
void msgpack_pack(Packer& pk) const \
{ \
msgpack::type::make_define_map \
MSGPACK_DEFINE_MAP_IMPL(__VA_ARGS__) \
.msgpack_pack(pk); \
} \
void msgpack_unpack(msgpack::object const& o) \
{ \
msgpack::type::make_define_map \
MSGPACK_DEFINE_MAP_IMPL(__VA_ARGS__) \
.msgpack_unpack(o); \
}\
template <typename MSGPACK_OBJECT> \
void msgpack_object(MSGPACK_OBJECT* o, msgpack::zone& z) const \
{ \
msgpack::type::make_define_map \
MSGPACK_DEFINE_MAP_IMPL(__VA_ARGS__) \
.msgpack_object(o, z); \
}
Definition: cpp03_zone.hpp:34
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:106

◆ MSGPACK_DEFINE_MAP_EACH_PROC

#define MSGPACK_DEFINE_MAP_EACH_PROC (   r,
  data,
  elem 
)
Value:
MSGPACK_PP_IS_BEGIN_PARENS(elem), \
elem, \
(MSGPACK_PP_STRINGIZE(elem))(elem) \
)
#define MSGPACK_PP_STRINGIZE(text)
Definition: stringize.hpp:28
#define MSGPACK_PP_IF(cond, t, f)
Definition: if.hpp:26

◆ MSGPACK_DEFINE_MAP_IMPL

#define MSGPACK_DEFINE_MAP_IMPL (   ...)
Value:
0, \
MSGPACK_PP_VARIADIC_TO_SEQ(__VA_ARGS__) \
) \
)
#define MSGPACK_PP_SEQ_TO_TUPLE(seq)
Definition: to_tuple.hpp:23
#define MSGPACK_DEFINE_MAP_EACH_PROC(r, data, elem)
Definition: cpp11_define_map.hpp:32
#define MSGPACK_PP_SEQ_FOR_EACH(macro, data, seq)
Definition: for_each.hpp:28

◆ MSGPACK_PP_VARIADICS

#define MSGPACK_PP_VARIADICS