MessagePacketHandle Class
The MessagePacketHandle class represents a handle to a message packet. More...
Header: | #include <Generic/MessageQueue.h> |
Public Functions
MessagePacketHandle() | |
MessagePacketHandle(const MessagePacketHandle &other) | |
MessagePacketHandle(T &customMessage) | |
MessagePacketHandle(Message &customMessage) | |
~MessagePacketHandle() | |
unsigned int | Destination() const |
MessagePacket & | Packet() |
const MessagePacket & | Packet() const |
void | SetDestination(unsigned int destination) const |
MessagePacketHandle & | operator=(const MessagePacketHandle &other) |
Detailed Description
The MessagePacketHandle class represents a handle to a message packet.
The MessagePacketHandle provides a way to manage the lifetime and access to a message packet.
Member Function Documentation
MessagePacketHandle::MessagePacketHandle()
Default constructs an instance of MessagePacketHandle.
MessagePacketHandle::MessagePacketHandle(const MessagePacketHandle &other)
Copy constructor for the MessagePacketHandle class.
This constructor creates a new MessagePacketHandle instance as a copy of an existing instance, but does not copy any data.
It takes care of properly managing the reference count to the MessagePacket instance to ensure that it is not prematurely released.
other The source MessagePacketHandle instance to duplicate.
MessagePacketHandle::MessagePacketHandle(T &customMessage)
Default constructs an instance of MessagePacketHandle.
MessagePacketHandle::MessagePacketHandle(Message &customMessage)
Default constructs an instance of MessagePacketHandle.
MessagePacketHandle::~MessagePacketHandle()
Destructor for MessagePacketHandle.
unsigned int MessagePacketHandle::Destination() const
Gets the destination of the message packet handle.
Returns the destination of the message packet handle.
MessagePacket &MessagePacketHandle::Packet()
Gets modifiable message packet when possible associated with the handle.
Returns the reference to the message packet.
const MessagePacket &MessagePacketHandle::Packet() const
Gets const message packet reference associated with the handle.
Returns the const reference to the message packet.
void MessagePacketHandle::SetDestination(unsigned int destination) const
Sets the destination of the message packet.
MessagePacketHandle &MessagePacketHandle::operator=(const MessagePacketHandle &other)
Overloads the assignment operator for the MessagePacketHandle class.
This method provides a way to assign the contents of one MessagePacketHandle instance to another making a modifieable copy of a packet.
other The source MessagePacketHandle instance from which to copy the data. Returns a reference to the current instance, to allow for chained assignment operations.
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.