RflySimSDK v4.10
RflySimSDK说明文档
载入中...
搜索中...
未找到
binary_writer< BasicJsonType, CharType > 模板类 参考

serialization to CBOR and MessagePack values 更多...

#include <binary_writer.hpp>

Public 成员函数

 binary_writer (output_adapter_t< CharType > adapter)
 create a binary writer
void write_bson (const BasicJsonType &j)
void write_cbor (const BasicJsonType &j)
void write_msgpack (const BasicJsonType &j)
void write_ubjson (const BasicJsonType &j, const bool use_count, const bool use_type, const bool add_prefix=true, const bool use_bjdata=false, const bjdata_version_t bjdata_version=bjdata_version_t::draft2)

静态 Public 成员函数

template<typename C = CharType, enable_if_t< std::is_signed< C >::value &&std::is_signed< char >::value > * = nullptr>
static constexpr CharType to_char_type (std::uint8_t x) noexcept
template<typename C = CharType, enable_if_t< std::is_signed< C >::value &&std::is_unsigned< char >::value > * = nullptr>
static CharType to_char_type (std::uint8_t x) noexcept
template<typename C = CharType, enable_if_t< std::is_unsigned< C >::value > * = nullptr>
static constexpr CharType to_char_type (std::uint8_t x) noexcept
template<typename InputCharType, typename C = CharType, enable_if_t< std::is_signed< C >::value &&std::is_signed< char >::value &&std::is_same< char, typename std::remove_cv< InputCharType >::type >::value > * = nullptr>
static constexpr CharType to_char_type (InputCharType x) noexcept

详细描述

template<typename BasicJsonType, typename CharType>
class detail::binary_writer< BasicJsonType, CharType >

serialization to CBOR and MessagePack values

构造及析构函数说明

◆ binary_writer()

template<typename BasicJsonType, typename CharType>
binary_writer ( output_adapter_t< CharType > adapter)
inlineexplicit

create a binary writer

参数
[in]adapteroutput adapter to write to

成员函数说明

◆ write_bson()

template<typename BasicJsonType, typename CharType>
void write_bson ( const BasicJsonType & j)
inline
参数
[in]jJSON value to serialize
前置条件
j.type() == value_t::object

◆ write_cbor()

template<typename BasicJsonType, typename CharType>
void write_cbor ( const BasicJsonType & j)
inline
参数
[in]jJSON value to serialize
函数调用图:
这是这个函数的调用关系图:

◆ write_msgpack()

template<typename BasicJsonType, typename CharType>
void write_msgpack ( const BasicJsonType & j)
inline
参数
[in]jJSON value to serialize
函数调用图:
这是这个函数的调用关系图:

◆ write_ubjson()

template<typename BasicJsonType, typename CharType>
void write_ubjson ( const BasicJsonType & j,
const bool use_count,
const bool use_type,
const bool add_prefix = true,
const bool use_bjdata = false,
const bjdata_version_t bjdata_version = bjdata_version_t::draft2 )
inline
参数
[in]jJSON value to serialize
[in]use_countwhether to use '#' prefixes (optimized format)
[in]use_typewhether to use '$' prefixes (optimized format)
[in]add_prefixwhether prefixes need to be used for this value
[in]use_bjdatawhether write in BJData format, default is false
[in]bjdata_versionwhich BJData version to use, default is draft2
函数调用图:
这是这个函数的调用关系图:

该类的文档由以下文件生成: