Class Message
Defined in File message.hpp
-
class Message
Class to define a message.
A message is a data structure that is used to pass data between operators. It wraps a
std::any
object and provides a type-safe interface to access the data.This class is used by the
<a class="reference internal" href="classholoscan_1_1gxf_1_1GXFWrapper.html#classholoscan_1_1gxf_1_1GXFWrapper" target="_self">holoscan::gxf::GXFWrapper</a>
to support the Holoscan native operator. The<a class="reference internal" href="classholoscan_1_1gxf_1_1GXFWrapper.html#classholoscan_1_1gxf_1_1GXFWrapper" target="_self">holoscan::gxf::GXFWrapper</a>
will hold the object of this class and delegate the message to the Holoscan native operator.Public Functions
- Message() = default
Construct a new Message object.
-
template<typename typeT, typename = std::enable_if_t<!std::is_same_v<std::decay_t<typeT>, Message>>>
inline explicit Message(typeT &&value) Construct a new Message object.
- Parameters
value – The value to be wrapped by the message.
-
template<typename ValueT>
inline void set_value(ValueT &&value) Set the value object.
- Template Parameters
- Parameters
ValueT – The type of the value.
value – The value to be wrapped by the message.
-
inline std::any value() const
Get the value object.
- Returns
The value wrapped by the message.
Get the value object as a specific type.
- Template Parameters
- Returns
ValueT – The type of the value to be returned.
The value wrapped by the message.