31#ifndef ETL_SHARED_MESSAGE_INCLUDED
32#define ETL_SHARED_MESSAGE_INCLUDED
36#include "reference_counted_message.h"
40#include "static_assert.h"
55 template <
typename TPool,
typename TMessage>
61 p_rcmessage = owner.allocate(
message);
63 if (p_rcmessage != ETL_NULLPTR)
83 : p_rcmessage(other.p_rcmessage)
93 : p_rcmessage(etl::move(other.p_rcmessage))
95 other.p_rcmessage = ETL_NULLPTR;
113 p_rcmessage = other.p_rcmessage;
135 p_rcmessage = etl::move(other.p_rcmessage);
136 other.p_rcmessage = ETL_NULLPTR;
149 if ((p_rcmessage != ETL_NULLPTR) &&
185 return p_rcmessage != ETL_NULLPTR;
Definition: reference_counted_message.h:48
virtual ETL_NODISCARD etl::ireference_counter & get_reference_counter()=0
Get a reference to the reference counter.
virtual ETL_NODISCARD etl::imessage & get_message()=0
Get a reference to the message.
virtual void release()=0
Release back to the owner.
Definition: shared_message.h:49
ETL_NODISCARD bool is_valid() const
Checks if the shared message is valid.
Definition: shared_message.h:183
ETL_NODISCARD uint32_t get_reference_count() const
Get the current reference count for this shared message.
Definition: shared_message.h:175
ETL_NODISCARD etl::imessage & get_message()
Get a reference to the contained message.
Definition: shared_message.h:159
shared_message(const etl::shared_message &other)
Copy constructor.
Definition: shared_message.h:82
~shared_message()
Definition: shared_message.h:147
shared_message(etl::ireference_counted_message &rcm)
Constructor.
Definition: shared_message.h:72
shared_message(TPool &owner, const TMessage &message)
Constructor.
Definition: shared_message.h:56
shared_message & operator=(const etl::shared_message &other)
Copy assignment operator.
Definition: shared_message.h:102
is_base_of
Definition: type_traits_generator.h:1252
bitset_ext
Definition: absolute.h:38