template<typename T>
MsgSharedPtr struct final
Public types
- using MsgType = T
- using BaseMsgType = BaseMessage
Constructors, destructors, conversion operators
- MsgSharedPtr(std::nullptr_t)
- MsgSharedPtr(T* in)
- MsgSharedPtr(T* in, MsgPtrImplBase* impl)
- MsgSharedPtr(MsgSharedPtr<T> const& in)
- MsgSharedPtr(MsgSharedPtr<T>&& in)
- ~MsgSharedPtr()
-
template<typename U>operator MsgSharedPtr<U>() const explicit
- operator T*() const explicit
Public functions
- auto operator=(std::nullptr_t) -> MsgSharedPtr<T>&
- auto operator=(MsgSharedPtr<T> const& in) -> MsgSharedPtr<T>&
- auto operator=(MsgSharedPtr<T>&& in) -> MsgSharedPtr<T>&
-
template<typename U>auto to() const -> MsgSharedPtr<U>
- Access as another (usually base) message type.
-
template<typename U>auto toVirtual() const -> MsgSharedPtr<U>
- auto operator==(MsgSharedPtr<T> const& n) const -> bool
- auto operator!=(MsgSharedPtr<T> const& n) const -> bool
- auto operator==(std::nullptr_t) const -> bool
- auto operator!=(std::nullptr_t) const -> bool
- auto operator->() const -> T*
- Implicit access to MsgT*.
- auto operator*() const -> T&
- Implicit access to MsgT&.
- auto get() const -> T*
- Explicit access to MsgT*.
- auto size() const -> ByteType
- Explicit access to message size.
- auto ownsMessage() const -> bool
- Checks to see if a message is owned.
-
template<typename SerializerT, typename = std::enable_if_t< checkpoint::is_footprinter_v<SerializerT> >>void serialize(SerializerT& s)
Friends
- auto operator<<(std::ostream& os, MsgSharedPtr<T> const& m) -> std::ostream&
Function documentation
template<typename T>
template<typename U>
MsgSharedPtr<U> vt:: messaging:: MsgSharedPtr<T>:: toVirtual() const
[obsolete] Use to() as MsgVirtualPtr <-> MsgSharedPtr. Both methods are equivalent in function.
template<typename T>
T* vt:: messaging:: MsgSharedPtr<T>:: operator->() const
Implicit access to MsgT*.
Returns | the owned message, never null |
---|
Asserts ownership: invalid to use after a std::move or implicit thief.
template<typename T>
T& vt:: messaging:: MsgSharedPtr<T>:: operator*() const
Implicit access to MsgT&.
Returns | ref to the owned message |
---|
Asserts ownership: invalid to use after a std::move or implicit thief.
template<typename T>
T* vt:: messaging:: MsgSharedPtr<T>:: get() const
Explicit access to MsgT*.
Returns | the owned message, never null |
---|
Asserts ownership: invalid to use after a std::move or implicit thief.
template<typename T>
bool vt:: messaging:: MsgSharedPtr<T>:: ownsMessage() const
Checks to see if a message is owned.
Returns | true if a message is owned or false after std::move. |
---|