|
cpp-msgpack-rpc 0.2.0
An RPC library implementing MessagePack RPC.
|
Class of memory pools of shared objects. More...
#include <msgpack_rpc/util/impl/shared_objects.h>
Public Member Functions | |
| SharedObjectMemoryPool (const SharedObjectMemoryPool &)=delete | |
| SharedObjectMemoryPool (SharedObjectMemoryPool &&)=delete | |
| SharedObjectMemoryPool (std::size_t num_buffers) | |
| Constructor. | |
| ~SharedObjectMemoryPool ()=default | |
| Destructor. | |
| template<typename... Args> | |
| SharedObject< T > | create (Args &&... args) |
| Create a shared object. | |
| SharedObjectMemoryPool & | operator= (const SharedObjectMemoryPool &)=delete |
| SharedObjectMemoryPool & | operator= (SharedObjectMemoryPool &&)=delete |
Static Public Member Functions | |
| static std::shared_ptr< SharedObjectMemoryPool< T > > | create (std::size_t num_buffers) |
| Create a memory pool. | |
Private Attributes | |
| std::vector< SharedObjectBuffer< T > > | buffers_ |
| Buffers. | |
| std::size_t | next_buffer_index_ {0} |
| Index of the next buffer. | |
Class of memory pools of shared objects.
| T | Type of shared objects. |
Definition at line 218 of file shared_objects.h.
|
inlineexplicit |
Constructor.
| [in] | num_buffers | Number of buffers. |
Definition at line 237 of file shared_objects.h.
|
inlinenodiscard |
Create a shared object.
| Args | Types of arguments. |
| [in] | args | Arguments. |
Definition at line 258 of file shared_objects.h.
|
inlinestatic |
Create a memory pool.
| [in] | num_buffers | Number of buffers. |
Definition at line 227 of file shared_objects.h.
|
private |
Buffers.
Definition at line 283 of file shared_objects.h.
|
private |
Index of the next buffer.
Definition at line 286 of file shared_objects.h.