choice::value Method
Gets the message whose index was selected by the choice messaging block.
template <
typename _Payload_type
>
_Payload_type const & value();
Parameters
- _Payload_type
The type of the message payload.
Return Value
The payload of the message.
Remarks
Because a choice messaging block can take inputs with different payload types, you must specify the type of the payload at the point of retrieval. You can determine the type based on the result of the index method.
Requirements
Header: agents.h
Namespace: concurrency