25 #if defined(ONIXS_B3_BOE_HAS_GATEWAY_EMULATOR) 36 using namespace Messaging;
50 template<
typename Message>
60 template <
class AnotherType>
64 , container_(rhs.container_)
71 template <
class AnotherType>
75 , container_(
std::move(rhs.container_))
120 std::swap(rhs.size_, size_);
121 std::swap(rhs.container_, container_);
122 std::swap(rhs.message_, message_);
166 operator Message() noexcept
172 operator const Message() const noexcept
180 return container_.get();
188 message_ = Message();
194 return message_.toString();
199 template <
class AnotherType>
202 if(rhs->templateId() != Message::TemplateId)
205 message_ = Messaging::typify<Message>(rhs);
220 , container_(
std::move(container))
221 , message_(container_.get(), size_)
226 template <
typename AnotherType,
typename BaseType>
MessagePtr(const MessagePtr< AnotherType > &rhs)
Create from another type.
MessagePtr()
Creates an empty message container.
void swap(MessagePtr &rhs) noexcept
Message & operator*() noexcept
std::shared_ptr< UInt8 > Container
#define ONIXS_B3_BOE_NORETURN
void reset()
Resets the message.
#define ONIXS_B3_BOE_EXPORTED
MessagePtr(MessagePtr &&rhs) noexcept
void throwWrongType(UInt16, UInt16)
UInt16 MessageSize
Message length type.
const Message & message() const noexcept
bool isMessageValid(const SbeMessage &msg) noexcept
MessagePtr< AnotherType > cast(const MessagePtr< BaseType > &ptr)
Tries to cast to another type.
Message * operator->() noexcept
bool valid() const noexcept
MessagePtr & operator=(MessagePtr &&rhs) noexcept
MessagePtr(MessagePtr< AnotherType > &&rhs)
Creates from the given type.
Message & message() noexcept
std::string toString() const
const Message * operator->() const noexcept
const Message & operator*() const noexcept