message Class
The basic message envelope containing the data payload being passed between messaging blocks.
template<class T>
class message : public ::Concurrency::details::_Runtime_object;
T
The data type of the payload within the message.
Name | Description |
---|---|
type |
A type alias for T . |
Name | Description |
---|---|
message | Overloaded. Constructs a message object. |
~message Destructor | Destroys the message object. |
Name | Description |
---|---|
add_ref | Adds to the reference count for the message object. Used for message blocks that need reference counting to determine message lifetimes. |
msg_id | Returns the ID of the message object. |
remove_ref | Subtracts from the reference count for the message object. Used for message blocks that need reference counting to determine message lifetimes. |
Name | Description |
---|---|
payload | The payload of the message object. |
For more information, see Asynchronous Message Blocks.
message
Header: agents.h
Namespace: concurrency
Adds to the reference count for the message
object. Used for message blocks that need reference counting to determine message lifetimes.
long add_ref();
The new value of the reference count.
Constructs a message
object.
message(
T const& _P);
message(
T const& _P,
runtime_object_identity _Id);
message(
message const& _Msg);
message(
_In_ message const* _Msg);
_P
The payload of this message.
_Id
The unique ID of this message.
_Msg
A reference or pointer to a message
object.
The constructor that takes a pointer to a message
object as an argument throws an invalid_argument exception if the parameter _Msg
is NULL
.
Destroys the message
object.
virtual ~message();
Returns the ID of the message
object.
runtime_object_identity msg_id() const;
The runtime_object_identity
of the message
object.
The payload of the message
object.
T const payload;
Subtracts from the reference count for the message
object. Used for message blocks that need reference counting to determine message lifetimes.
long remove_ref();
The new value of the reference count.