cpp-msgpack-rpc 0.2.0
An RPC library implementing MessagePack RPC.
Loading...
Searching...
No Matches
msgpack_rpc::messages::impl Namespace Reference

Namespace of internal implementations. More...

Classes

class  SerializationBuffer
 Class of buffers for serialization. More...
struct  SharableBinaryHeader
 Struct of headers of sharable binary data. More...

Functions

void add_reference_count_of_sharable_binary (SharableBinaryHeader *buffer) noexcept
 Add a reference count of a buffer of sharable binary data.
SharableBinaryHeaderallocate_sharable_binary (std::size_t binary_size)
 Allocate a buffer of sharable binary data.
SharableBinaryHeaderallocate_shared_binary ()
 Allocate a buffer of sharable binary data with automatic initial size.
char * binary_buffer_of (SharableBinaryHeader *buffer) noexcept
 Get buffer of binary data from a buffer of sharable binary data.
void deallocate_sharable_binary (SharableBinaryHeader *buffer) noexcept
 Deallocate a buffer of sharable binary data.
void decrease_reference_count_of_sharable_binary (SharableBinaryHeader *buffer) noexcept
 Decrease a reference count of a buffer of sharable binary data, and deallocate the buffer if possible.
void enable_reference_count_of_sharable_binary (SharableBinaryHeader *buffer) noexcept
 Enable reference count of a buffer of sharable binary data.
SharableBinaryHeaderexpand_sharable_binary (SharableBinaryHeader *buffer, std::size_t required_size)
 Expand a buffer of sharable binary data.
ParsedMessage parse_message_from_object (msgpack::object_handle object)
 Parse a message from an object in msgpack library.
MessageID parse_message_id_from_object (const msgpack::object &object)
 Parse a message ID from an object in msgpack library.
MessageType parse_message_type_from_object (const msgpack::object &object)
 Parse a message type from an object in msgpack library.
MethodNameView parse_method_name_from_object (const msgpack::object &object)
 Parse a method name from an object in msgpack library.
ParsedNotification parse_notification_from_object (msgpack::object_handle object)
 Parse a notification from an object in msgpack library.
ParsedRequest parse_request_from_object (msgpack::object_handle object)
 Parse a request from an object in msgpack library.
ParsedResponse parse_response_from_object (msgpack::object_handle object)
 Parse a response from an object in msgpack library.
std::atomic< int > & reference_count_of (SharableBinaryHeader *buffer) noexcept
 Access the reference count of a buffer of sharable binary data.

Variables

constexpr std::size_t SHARABLE_BINARY_ALIGNMENT = alignof(SharableBinaryHeader)
 Alignment of sharable binary data.

Detailed Description

Namespace of internal implementations.

Function Documentation

◆ add_reference_count_of_sharable_binary()

void msgpack_rpc::messages::impl::add_reference_count_of_sharable_binary ( SharableBinaryHeader * buffer)
inlinenoexcept

Add a reference count of a buffer of sharable binary data.

Parameters
[in,out]bufferBuffer.

Definition at line 201 of file sharable_binary_header.h.

◆ allocate_sharable_binary()

SharableBinaryHeader * msgpack_rpc::messages::impl::allocate_sharable_binary ( std::size_t binary_size)
inlinenodiscard

Allocate a buffer of sharable binary data.

Parameters
[in]binary_sizeSize of the binary data.
Returns
Buffer of sharable binary data.

Definition at line 67 of file sharable_binary_header.h.

◆ allocate_shared_binary()

SharableBinaryHeader * msgpack_rpc::messages::impl::allocate_shared_binary ( )
inlinenodiscard

Allocate a buffer of sharable binary data with automatic initial size.

Returns
Buffer of sharable binary data.

Definition at line 93 of file sharable_binary_header.h.

◆ binary_buffer_of()

char * msgpack_rpc::messages::impl::binary_buffer_of ( SharableBinaryHeader * buffer)
inlinenoexcept

Get buffer of binary data from a buffer of sharable binary data.

Parameters
[in]bufferBuffer.
Returns
Buffer of binary data.

Definition at line 227 of file sharable_binary_header.h.

◆ deallocate_sharable_binary()

void msgpack_rpc::messages::impl::deallocate_sharable_binary ( SharableBinaryHeader * buffer)
inlinenoexcept

Deallocate a buffer of sharable binary data.

Parameters
[in,out]bufferBuffer.

Definition at line 172 of file sharable_binary_header.h.

◆ decrease_reference_count_of_sharable_binary()

void msgpack_rpc::messages::impl::decrease_reference_count_of_sharable_binary ( SharableBinaryHeader * buffer)
inlinenoexcept

Decrease a reference count of a buffer of sharable binary data, and deallocate the buffer if possible.

Parameters
[in,out]bufferBuffer.

Definition at line 212 of file sharable_binary_header.h.

◆ enable_reference_count_of_sharable_binary()

void msgpack_rpc::messages::impl::enable_reference_count_of_sharable_binary ( SharableBinaryHeader * buffer)
inlinenoexcept

Enable reference count of a buffer of sharable binary data.

Parameters
[in,out]bufferBuffer.

Definition at line 188 of file sharable_binary_header.h.

◆ expand_sharable_binary()

SharableBinaryHeader * msgpack_rpc::messages::impl::expand_sharable_binary ( SharableBinaryHeader * buffer,
std::size_t required_size )
inlinenodiscard

Expand a buffer of sharable binary data.

Parameters
[in,out]bufferBuffer.
[in]required_sizeRequired size of binary data.
Returns
New buffer.

Definition at line 122 of file sharable_binary_header.h.

◆ parse_message_from_object()

ParsedMessage msgpack_rpc::messages::impl::parse_message_from_object ( msgpack::object_handle object)
inlinenodiscard

Parse a message from an object in msgpack library.

Parameters
[in]objectObject in msgpack library.
Returns
Message.

Definition at line 178 of file parse_message_from_object.h.

◆ parse_message_id_from_object()

MessageID msgpack_rpc::messages::impl::parse_message_id_from_object ( const msgpack::object & object)
inlinenodiscard

Parse a message ID from an object in msgpack library.

Parameters
[in]objectObject in msgpack library.
Returns
Message ID.

Definition at line 77 of file parse_message_from_object.h.

◆ parse_message_type_from_object()

MessageType msgpack_rpc::messages::impl::parse_message_type_from_object ( const msgpack::object & object)
inlinenodiscard

Parse a message type from an object in msgpack library.

Parameters
[in]objectObject in msgpack library.
Returns
Message type.

Definition at line 50 of file parse_message_from_object.h.

◆ parse_method_name_from_object()

MethodNameView msgpack_rpc::messages::impl::parse_method_name_from_object ( const msgpack::object & object)
inlinenodiscard

Parse a method name from an object in msgpack library.

Parameters
[in]objectObject in msgpack library.
Returns
Method name.

Definition at line 93 of file parse_message_from_object.h.

◆ parse_notification_from_object()

ParsedNotification msgpack_rpc::messages::impl::parse_notification_from_object ( msgpack::object_handle object)
inlinenodiscard

Parse a notification from an object in msgpack library.

Parameters
[in]objectObject in msgpack library.
Returns
Notification.

Definition at line 158 of file parse_message_from_object.h.

◆ parse_request_from_object()

ParsedRequest msgpack_rpc::messages::impl::parse_request_from_object ( msgpack::object_handle object)
inlinenodiscard

Parse a request from an object in msgpack library.

Parameters
[in]objectObject in msgpack library.
Returns
Request.

Definition at line 109 of file parse_message_from_object.h.

◆ parse_response_from_object()

ParsedResponse msgpack_rpc::messages::impl::parse_response_from_object ( msgpack::object_handle object)
inlinenodiscard

Parse a response from an object in msgpack library.

Parameters
[in]objectObject in msgpack library.
Returns
Response.

Definition at line 131 of file parse_message_from_object.h.

◆ reference_count_of()

std::atomic< int > & msgpack_rpc::messages::impl::reference_count_of ( SharableBinaryHeader * buffer)
inlinenodiscardnoexcept

Access the reference count of a buffer of sharable binary data.

Parameters
[in]bufferBuffer.
Returns
Reference count.

Definition at line 160 of file sharable_binary_header.h.

Variable Documentation

◆ SHARABLE_BINARY_ALIGNMENT

std::size_t msgpack_rpc::messages::impl::SHARABLE_BINARY_ALIGNMENT = alignof(SharableBinaryHeader)
constexpr

Alignment of sharable binary data.

Definition at line 56 of file sharable_binary_header.h.