cpp-msgpack-light 0.3.0
A light library to serialize MessagePack.
Loading...
Searching...
No Matches
msgpack_light::details Namespace Reference

Namespace of internal implementations. More...

Classes

class  allocator_wrapper
 Class to wrap allocators. More...
struct  array_data
 Struct of data of arrays. More...
class  basic_binary_buffer
 Class of basic buffers for binary data. More...
struct  binary_data
 Struct of data of binaries. More...
class  buffered_serialization_buffer_impl
 Class to implement internal implementation of serialization_buffer class using buffers. More...
class  const_object_base
 Base class of constant objects in MessagePack. More...
struct  extension_data
 Struct of data of extensions. More...
struct  key_value_pair_data
 Struct of data of key-value pairs in maps. More...
struct  map_data
 Struct of data of maps. More...
class  mutable_object_base
 Base class of non-constant objects in MessagePack. More...
class  mutable_static_binary_view
 Class of views of mutable buffers with static sizes. More...
class  non_buffered_serialization_buffer_impl
 Class to implement internal implementation of serialization_buffer class without buffers. More...
struct  object_data
 Struct of data of objects in MessagePack. More...
struct  string_data
 Struct of data of strings. More...
struct  total_size_of_impl
 Get the total size of types in template arguments. More...
struct  total_size_of_impl< First, Remaining... >
 Get the total size of types in template arguments. More...
struct  total_size_of_impl< T >
 Get the total size of types in template arguments. More...

Typedefs

using serialization_buffer_impl = non_buffered_serialization_buffer_impl
 Type of internal implementation of serialization_buffer class.

Functions

std::size_t calculate_expanded_memory_buffer_size (std::size_t current_size, std::size_t additional_size)
 Calculate the size of an expanded buffer.
template<typename Allocator>
void clear_object_data (object_data &data, allocator_wrapper< Allocator > &allocator) noexcept
 Clear data.
template<typename Allocator>
void copy_object_data (object_data &to, const object_data &from, allocator_wrapper< Allocator > &allocator)
 Copy data.
template<typename T, typename... Remaining>
void pack_in_big_endian (mutable_static_binary_view< total_size_of< T, Remaining... > > buffer, T value, Remaining... remaining_values) noexcept
 Pack some values in big endian.
template<std::size_t N>
void to_big_endian (const void *from, mutable_static_binary_view< N > to) noexcept
 Convert to big endian.
template<std::size_t N>
void to_big_endian (const void *from, std::array< unsigned char, N > *to) noexcept
 Convert to big endian.
template<>
void to_big_endian< 1U > (const void *from, mutable_static_binary_view< 1U > to) noexcept
 Convert to big endian.
template<>
void to_big_endian< 2U > (const void *from, mutable_static_binary_view< 2U > to) noexcept
 Convert to big endian.
template<>
void to_big_endian< 4U > (const void *from, mutable_static_binary_view< 4U > to) noexcept
 Convert to big endian.
template<>
void to_big_endian< 8U > (const void *from, mutable_static_binary_view< 8U > to) noexcept
 Convert to big endian.

Variables

constexpr std::size_t default_binary_capacity = 8U
 Default of the capacity of the buffer in msgpack_light::binary class.
constexpr std::size_t static_memory_buffer_size = 512U
 Size of buffers on memory defined using static arrays.
template<typename... T>
constexpr std::size_t total_size_of = total_size_of_impl<T...>::value
 Get the total size of types in template arguments.

Detailed Description

Namespace of internal implementations.

Typedef Documentation

◆ serialization_buffer_impl

Function Documentation

◆ calculate_expanded_memory_buffer_size()

std::size_t msgpack_light::details::calculate_expanded_memory_buffer_size ( std::size_t current_size,
std::size_t additional_size )
inlinenodiscard

Calculate the size of an expanded buffer.

Parameters
[in]current_sizeCurrent size.
[in]additional_sizeAdditional size.
Returns
Size of the expanded buffer.

Definition at line 44 of file binary.h.

◆ clear_object_data()

template<typename Allocator>
void msgpack_light::details::clear_object_data ( object_data & data,
allocator_wrapper< Allocator > & allocator )
inlinenoexcept

Clear data.

Template Parameters
AllocatorType of the allocator.
Parameters
[in,out]dataData.
[in]allocatorAllocator.

Definition at line 38 of file object_helper.h.

◆ copy_object_data()

template<typename Allocator>
void msgpack_light::details::copy_object_data ( object_data & to,
const object_data & from,
allocator_wrapper< Allocator > & allocator )
inline

Copy data.

Template Parameters
AllocatorType of the allocator.
Parameters
[out]toObject to copy to.
[in]fromObject to copy from.
[in]allocatorAllocator.

Definition at line 78 of file object_helper.h.

◆ pack_in_big_endian()

template<typename T, typename... Remaining>
void msgpack_light::details::pack_in_big_endian ( mutable_static_binary_view< total_size_of< T, Remaining... > > buffer,
T value,
Remaining... remaining_values )
noexcept

Pack some values in big endian.

Template Parameters
TFirst type.
RemainingRemaining types.
Parameters
[out]bufferBuffer.
[in]valueFirst value.
[in]remaining_valuesRemaining values.

Definition at line 38 of file pack_in_big_endian.h.

◆ to_big_endian() [1/2]

template<std::size_t N>
void msgpack_light::details::to_big_endian ( const void * from,
mutable_static_binary_view< N > to )
inlinenoexcept

Convert to big endian.

Template Parameters
NNumber of bytes.
Parameters
[in]fromInput.
[out]toOutput.

◆ to_big_endian() [2/2]

template<std::size_t N>
void msgpack_light::details::to_big_endian ( const void * from,
std::array< unsigned char, N > * to )
inlinenoexcept

Convert to big endian.

Template Parameters
NNumber of bytes.
Parameters
[in]fromInput.
[out]toOutput.

Definition at line 117 of file to_big_endian.h.

◆ to_big_endian< 1U >()

template<>
void msgpack_light::details::to_big_endian< 1U > ( const void * from,
mutable_static_binary_view< 1U > to )
inlinenoexcept

Convert to big endian.

Parameters
[in]fromInput.
[out]toOutput.

Definition at line 49 of file to_big_endian.h.

◆ to_big_endian< 2U >()

template<>
void msgpack_light::details::to_big_endian< 2U > ( const void * from,
mutable_static_binary_view< 2U > to )
inlinenoexcept

Convert to big endian.

Parameters
[in]fromInput.
[out]toOutput.

Definition at line 61 of file to_big_endian.h.

◆ to_big_endian< 4U >()

template<>
void msgpack_light::details::to_big_endian< 4U > ( const void * from,
mutable_static_binary_view< 4U > to )
inlinenoexcept

Convert to big endian.

Parameters
[in]fromInput.
[out]toOutput.

Definition at line 76 of file to_big_endian.h.

◆ to_big_endian< 8U >()

template<>
void msgpack_light::details::to_big_endian< 8U > ( const void * from,
mutable_static_binary_view< 8U > to )
inlinenoexcept

Convert to big endian.

Parameters
[in]fromInput.
[out]toOutput.

Definition at line 94 of file to_big_endian.h.

Variable Documentation

◆ default_binary_capacity

std::size_t msgpack_light::details::default_binary_capacity = 8U
constexpr

Default of the capacity of the buffer in msgpack_light::binary class.

Definition at line 67 of file binary.h.

◆ static_memory_buffer_size

std::size_t msgpack_light::details::static_memory_buffer_size = 512U
constexpr

Size of buffers on memory defined using static arrays.

Definition at line 29 of file static_memory_buffer_size.h.

◆ total_size_of

template<typename... T>
std::size_t msgpack_light::details::total_size_of = total_size_of_impl<T...>::value
constexpr

Get the total size of types in template arguments.

Template Parameters
TTypes.

Definition at line 64 of file total_size_of.h.