ComponentToMsgSerializer< DataType, MsgType > Class Template Reference
Serialization for that converts components data types to gz::msgs. This assumes that gz::sim::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 ignition::gazebo::serializers::ComponentToMsgSerializer< DataType, MsgType >
Serialization for that converts components data types to gz::msgs. This assumes that gz::sim::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 gz::sim::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.
◆ Serialize()
|
inlinestatic |
Serialization.
- Parameters
-
[in] _out Output stream. [in] _data data to stream
- Returns
- The stream.
The documentation for this class was generated from the following file:
Component< sdf::Geometry, class GeometryTag, serializers::GeometrySerializer > Geometry
This component holds an entity's geometry.
Definition: gz/sim/components/Geometry.hh:46