26 : packer<
msgpack::sbuffer>(stream)
40 void pack_alias(
const std::string& schema_name,
const std::string& msgpack_name)
55 pack_array(
sizeof...(Args));
59 template <msgpack_concepts::HasMsgPack T>
void pack_with_name(
const std::string&
type, T
const&
object)
66 const_cast<T&
>(object).
msgpack([&](
auto&... args) {
67 size_t kv_size =
sizeof...(args);
68 pack_map(uint32_t(1 + kv_size / 2));
84 typename T::IPC_CODEGEN_BIN32_ALIAS;
85 T::MSGPACK_SCHEMA_NAME;
89template <
typename Value,
typename... Rest>
97 "see the first type argument in the error trace, it might require a specialization of msgpack_schema_pack");
105 packer.
pack_alias(T::MSGPACK_SCHEMA_NAME,
"bin32");
116template <msgpack_concepts::HasMsgPackSchema T>
119 obj.msgpack_schema(packer);
122template <msgpack_concepts::HasMsgPack T>
133 "see the first type argument in the error trace, it might need a msgpack_schema method!");
167template <
typename T, std::
size_t N>
170 packer.pack_array(2);
171 packer.pack(
"array");
172 packer.pack_array(2);
179 msgpack::sbuffer output;
182 msgpack::object_handle oh = msgpack::unpack(output.data(), output.size());
183 std::stringstream pretty_output;
185 return pretty_output.str();
void check_msgpack_usage(const auto &object)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
void _msgpack_schema_pack(MsgpackSchemaPacker &packer, const T &obj)
void _schema_pack_map_content(MsgpackSchemaPacker &)
void msgpack_schema_pack(MsgpackSchemaPacker &packer, T const &)
std::string msgpack_schema_to_string(const auto &obj)
std::string msgpack_schema_name(T const &)
void pack_alias(const std::string &schema_name, const std::string &msgpack_name)
bool set_emitted(const std::string &type)
void pack_with_name(const std::string &type, T const &object)
MsgpackSchemaPacker(msgpack::sbuffer &stream)
std::set< std::string > emitted_types
void pack_template_type(const std::string &schema_name)
void pack_schema(const T &obj)