Skip to content

Conversation

@redboltz
Copy link
Contributor

@redboltz redboltz commented Jul 5, 2015

No description provided.

@redboltz
Copy link
Contributor Author

redboltz commented Jul 5, 2015

When you use MSGPACK_DEFINE_MAP and MSGPACK_BASE_MAP, the members of class are serialized as MAP. Converting and creating msgpack::with_zone are also supported.

When you use MSGPACK_DEFINE_ARRAY and MSGPACK_BASE_ARRAY, the members are serialized as array. MSGPACK_DEFINE and MSGPACK_BASE is aliases of MSGPACK_DEFINE_ARRAY and MSGPACK_BASE_ARRAY by default. If you define MSGPACK_USE_DEFINE_MAP, they become the aliases of MSGPACK_DEFINE_MAP and MSGPACK_BASE_MAP.

The keys of the map are variables name. When you use MSGPACK_BASE_MAP, the key of the map is the name of the base class.

You can serialize and deserialize without an order restriction as follows:
https://github.com/msgpack/msgpack-c/pull/306/files#diff-aac96dea4ddf2c5c29096d6d6e5b0874R433

In order to implement this functionality, I use Boost.Preprocessor. So if you want to use the MSGPACK_DEFINE_MAP and MSGPACK_BASE_MAP, you need to define MSGPACK_USE_BOOST. If you don't, you don't need Boost Libraries and it is a default setting.

@redboltz redboltz merged commit 584bd85 into msgpack:master Jul 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant