rclcpp
master
C++ ROS Client Library API
|
Default allocation strategy for messages received by subscriptions. More...
#include <message_memory_strategy.hpp>
Public Types | |
using | MessageAllocTraits = allocator::AllocRebind< MessageT, Alloc > |
using | MessageAlloc = typename MessageAllocTraits::allocator_type |
using | MessageDeleter = allocator::Deleter< MessageAlloc, MessageT > |
using | SerializedMessageAllocTraits = allocator::AllocRebind< rcl_serialized_message_t, Alloc > |
using | SerializedMessageAlloc = typename SerializedMessageAllocTraits::allocator_type |
using | SerializedMessageDeleter = allocator::Deleter< SerializedMessageAlloc, rcl_serialized_message_t > |
using | BufferAllocTraits = allocator::AllocRebind< char, Alloc > |
using | BufferAlloc = typename BufferAllocTraits::allocator_type |
using | BufferDeleter = allocator::Deleter< BufferAlloc, char > |
Public Member Functions | |
MessageMemoryStrategy () | |
MessageMemoryStrategy (std::shared_ptr< Alloc > allocator) | |
virtual | ~MessageMemoryStrategy ()=default |
virtual std::shared_ptr< MessageT > | borrow_message () |
By default, dynamically allocate a new message. More... | |
virtual std::shared_ptr< rcl_serialized_message_t > | borrow_serialized_message (size_t capacity) |
virtual std::shared_ptr< rcl_serialized_message_t > | borrow_serialized_message () |
virtual void | set_default_buffer_capacity (size_t capacity) |
virtual void | return_message (std::shared_ptr< MessageT > &msg) |
Release ownership of the message, which will deallocate it if it has no more owners. More... | |
virtual void | return_serialized_message (std::shared_ptr< rcl_serialized_message_t > &serialized_msg) |
Static Public Member Functions | |
static SharedPtr | create_default () |
Default factory method. More... | |
Default allocation strategy for messages received by subscriptions.
A message memory strategy must be templated on the type of the subscription it belongs to.
using rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, Alloc >::MessageAllocTraits = allocator::AllocRebind<MessageT, Alloc> |
using rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, Alloc >::MessageAlloc = typename MessageAllocTraits::allocator_type |
using rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, Alloc >::MessageDeleter = allocator::Deleter<MessageAlloc, MessageT> |
using rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, Alloc >::SerializedMessageAllocTraits = allocator::AllocRebind<rcl_serialized_message_t, Alloc> |
using rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, Alloc >::SerializedMessageAlloc = typename SerializedMessageAllocTraits::allocator_type |
using rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, Alloc >::SerializedMessageDeleter = allocator::Deleter<SerializedMessageAlloc, rcl_serialized_message_t> |
using rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, Alloc >::BufferAllocTraits = allocator::AllocRebind<char, Alloc> |
using rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, Alloc >::BufferAlloc = typename BufferAllocTraits::allocator_type |
using rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, Alloc >::BufferDeleter = allocator::Deleter<BufferAlloc, char> |
|
inline |
|
inlineexplicit |
|
virtualdefault |
|
inlinestatic |
Default factory method.
|
inlinevirtual |
By default, dynamically allocate a new message.
Reimplemented in rclcpp::strategies::message_pool_memory_strategy::MessagePoolMemoryStrategy< MessageT, Size, >.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Release ownership of the message, which will deallocate it if it has no more owners.
[in] | msg | Shared pointer to the message we are returning. |
Reimplemented in rclcpp::strategies::message_pool_memory_strategy::MessagePoolMemoryStrategy< MessageT, Size, >.
|
inlinevirtual |
std::shared_ptr<MessageAlloc> rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, Alloc >::message_allocator_ |
MessageDeleter rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, Alloc >::message_deleter_ |
std::shared_ptr<SerializedMessageAlloc> rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, Alloc >::serialized_message_allocator_ |
SerializedMessageDeleter rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, Alloc >::serialized_message_deleter_ |
std::shared_ptr<BufferAlloc> rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, Alloc >::buffer_allocator_ |
BufferDeleter rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, Alloc >::buffer_deleter_ |
size_t rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, Alloc >::default_buffer_capacity_ = 0 |
rcutils_allocator_t rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, Alloc >::rcutils_allocator_ |