4 #include <swarmio/data/Variant.pb.h> 82 virtual void WriteDefinition(std::stringstream& stream,
bool forHash)
const override;
virtual uint32_t GetDefaultLength(const FieldStack &fieldStack) const override
Get the length of the default value.
virtual void Serialize(ros::serialization::OStream &stream, const swarmio::data::Variant &value, const FieldStack &fieldStack) const override
Serialize a variant onto a stream.
virtual void EmitDefault(ros::serialization::OStream &stream, const FieldStack &fieldStack) const override
Write the default value to the stream.
void ParseSigned(const std::string &value)
Parse a signed integer value.
A Field represents an entry in a message reader that can read one of its fields.
void ParseFloat(const std::string &value)
Parse a floating point value.
void ParseString(const std::string &value)
Parse a string value.
void ParseBool(const std::string &value)
Parse a boolean value.
swarmio::data::Variant _value
Value.
Serializer is the base class for all binary message interpreters.
Field for constant values.
virtual uint32_t CalculateSerializedLength(const swarmio::data::Variant &value, const FieldStack &fieldStack) const override
Calculate the length of a serialized message in bytes.
virtual swarmio::data::Variant Deserialize(ros::serialization::IStream &stream, const FieldStack &fieldStack) const override
Deserialize a stream into a variant.
virtual void WriteDefinition(std::stringstream &stream, bool forHash) const override
Write the definition of this field to a string stream.
ConstantField(const std::string &name, const Serializer &serializer, const std::string &value)
Construct a new ConstantField object.
void ParseUnsigned(const std::string &value)
Parse an unsigned integer value.
std::string _rawValue
Raw string value.