15 if (forHash && dynamic_cast<const MessageSerializer*>(&
_serializer) !=
nullptr)
70 field.set_is_variable_size(
true);
virtual uint32_t CalculateSerializedLength(const swarmio::data::Variant &value, const FieldStack &fieldStack) const =0
Calculate the length of a serialized message in bytes.
virtual uint32_t GetDefaultLength(const FieldStack &fieldStack) const override
Get the length of the default value.
virtual swarmio::data::Variant DeserializeArray(ros::serialization::IStream &stream, uint32_t count, const FieldStack &fieldStack) const =0
Deserialize a stream into a variant array.
virtual uint32_t DeserializeCount(ros::serialization::IStream &stream, const FieldStack &fieldStack) const
Deserialize the count of the array from a stream.
ROS_FORCE_INLINE void next(T &t)
virtual swarmio::data::discovery::Field GetFieldDescriptor() const =0
Build a field descriptor for the underlying type.
static size_t GetCount(const Variant &value)
Get the item count of the variant array, or 1 if it is not an array.
virtual void WriteDefinition(std::stringstream &stream, bool forHash) const
Write the definition of this field to a string stream.
virtual void Serialize(ros::serialization::OStream &stream, const swarmio::data::Variant &value, const FieldStack &fieldStack) const override
Serialize a variant onto a stream.
virtual const std::string & GetFullName() const
Get the fully qualified name for the type behind the serializer.
virtual swarmio::data::discovery::Field GetFieldDescriptor() const override
Build a field descriptor for the underlying type.
virtual void SerializeCount(ros::serialization::OStream &stream, uint32_t count, const FieldStack &fieldStack) const
Serialize the count of the array onto a stream.
const Serializer & _serializer
Serializer.
virtual swarmio::data::Variant Deserialize(ros::serialization::IStream &stream, const FieldStack &fieldStack) const override
Deserialize a stream into a variant.
const std::string & GetName() const
Get the non-qualified name for the type behind the serializer.
ROS_FORCE_INLINE void next(const T &t)
virtual uint32_t CalculateSerializedLength(const swarmio::data::Variant &value, const FieldStack &fieldStack) const override
Calculate the length of a serialized message in bytes.
virtual void Serialize(ros::serialization::OStream &stream, const swarmio::data::Variant &value, const FieldStack &fieldStack) const =0
Serialize a variant onto a stream.
virtual void WriteDefinition(std::stringstream &stream, bool forHash) const override
Write the definition of this field to a string stream.
virtual void EmitDefault(ros::serialization::OStream &stream, const FieldStack &fieldStack) const override
Write the default value to the stream.