ComponentToMsgSerializer< DataType, MsgType > Class Template Reference
Serialization for that converts components data types to gz::msgs. This assumes that convert<DataType> is defined. More...
#include <Serialization.hh>
Static Public Member Functions | |
static std::istream & | Deserialize (std::istream &_in, DataType &_data) |
Deserialization. More... | |
static std::ostream & | Serialize (std::ostream &_out, const DataType &_data) |
Serialization. More... | |
Detailed Description
template<typename DataType, typename MsgType>
class gz::sim::serializers::ComponentToMsgSerializer< DataType, MsgType >
Serialization for that converts components data types to gz::msgs. This assumes that convert<DataType> is defined.
- Template Parameters
-
DataType Underlying data type of the component
This can be used for components that can be converted to gz::msg types via convert. For example sdf::Geometry can be converted to msgs::Geometry so the component can be defined as
ComponentToMsgSerializer<sdf::Geometry, msgs::Geometry>>
Member Function Documentation
◆ Deserialize()
|
inlinestatic |
Deserialization.
- Parameters
-
[in] _in Input stream. [out] _data data to populate
- Returns
- The stream.
References gz::msgs::Convert().
◆ Serialize()
|
inlinestatic |
Serialization.
- Parameters
-
[in] _out Output stream. [in] _data data to stream
- Returns
- The stream.
References gz::msgs::Convert().
The documentation for this class was generated from the following file: