Serializer for fixed arrays. More...
#include <FixedArrayField.h>

Public Member Functions | |
| virtual uint32_t | CalculateSerializedLength (const swarmio::data::Variant &value, const FieldStack &fieldStack) const override |
| Calculate the length of a serialized message in bytes. More... | |
| virtual uint32_t | DeserializeCount (ros::serialization::IStream &stream, const FieldStack &fieldStack) const override |
| Deserialize the count of the array from a stream. More... | |
| virtual void | EmitDefault (ros::serialization::OStream &stream, const FieldStack &fieldStack) const override |
| Write the default value to the stream. More... | |
| FixedArrayField (const std::string &name, const Serializer &serializer, uint32_t count) | |
| Construct a new FixedArrayField object. More... | |
| virtual uint32_t | GetDefaultLength (const FieldStack &fieldStack) const override |
| Get the length of the default value. More... | |
| virtual swarmio::data::discovery::Field | GetFieldDescriptor () const override |
| Build a field descriptor for the underlying type. More... | |
| virtual void | SerializeCount (ros::serialization::OStream &stream, uint32_t count, const FieldStack &fieldStack) const override |
| Serialize the count of the array onto a stream. More... | |
| virtual void | WriteDefinition (std::stringstream &stream, bool forHash) const override |
| Write the definition of this field to a string stream. More... | |
Public Member Functions inherited from swarmros::introspection::ArrayField | |
| virtual swarmio::data::Variant | Deserialize (ros::serialization::IStream &stream, const FieldStack &fieldStack) const override |
| Deserialize a stream into a variant. More... | |
| virtual void | Serialize (ros::serialization::OStream &stream, const swarmio::data::Variant &value, const FieldStack &fieldStack) const override |
| Serialize a variant onto a stream. More... | |
Public Member Functions inherited from swarmros::introspection::Field | |
| virtual swarmio::data::Variant | DeserializeArray (ros::serialization::IStream &stream, uint32_t count, const FieldStack &fieldStack) const override |
| Deserialize a stream into a variant array - not supported on Fields. More... | |
| Field (const std::string &name, const Serializer &serializer) | |
| Construct a new Field object. More... | |
| const Serializer & | GetSerializer () const |
| Get the associated serializer. More... | |
Public Member Functions inherited from swarmros::introspection::Serializer | |
| virtual const std::string & | GetFullName () const |
| Get the fully qualified name for the type behind the serializer. More... | |
| const std::string & | GetName () const |
| Get the non-qualified name for the type behind the serializer. More... | |
| virtual | ~Serializer () |
| Destructor. More... | |
Private Attributes | |
| uint32_t | _count |
| Element count. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from swarmros::introspection::Field | |
| void | WriteTypeName (std::stringstream &stream, bool forHash) const |
| Get the type name for the serializer. More... | |
Protected Member Functions inherited from swarmros::introspection::Serializer | |
| Serializer (const std::string &name) | |
| Construct a new Serializer object. More... | |
Static Protected Member Functions inherited from swarmros::introspection::Serializer | |
| static const Serializer & | SerializerForType (const std::string &type, const std::string &parentPackage) |
| Look up or build a reader for a message type. More... | |
Protected Attributes inherited from swarmros::introspection::Field | |
| const Serializer & | _serializer |
| Serializer. More... | |
Serializer for fixed arrays.
Definition at line 11 of file FixedArrayField.h.
|
inline |
Construct a new FixedArrayField object.
| name | Name |
| serializer | Serializer |
| count | Item count |
Definition at line 30 of file FixedArrayField.h.
|
overridevirtual |
Calculate the length of a serialized message in bytes.
| value | Value |
| fieldStack | Stack of fields to determine location |
Reimplemented from swarmros::introspection::ArrayField.
Definition at line 32 of file FixedArrayField.cpp.
|
overridevirtual |
Deserialize the count of the array from a stream.
| stream | Input stream |
| fieldStack | Stack of fields to determine location |
Reimplemented from swarmros::introspection::ArrayField.
Definition at line 72 of file FixedArrayField.cpp.
|
overridevirtual |
Write the default value to the stream.
| stream | Output stream |
| fieldStack | Stack of fields to determine location |
Reimplemented from swarmros::introspection::ArrayField.
Definition at line 62 of file FixedArrayField.cpp.
|
overridevirtual |
Get the length of the default value.
| fieldStack | Stack of fields to determine location |
Reimplemented from swarmros::introspection::ArrayField.
Definition at line 26 of file FixedArrayField.cpp.
|
overridevirtual |
Build a field descriptor for the underlying type.
Reimplemented from swarmros::introspection::ArrayField.
Definition at line 77 of file FixedArrayField.cpp.
|
overridevirtual |
Serialize the count of the array onto a stream.
| stream | Output stream |
| count | Array count |
| fieldStack | Stack of fields to determine location |
Reimplemented from swarmros::introspection::ArrayField.
Definition at line 50 of file FixedArrayField.cpp.
|
overridevirtual |
Write the definition of this field to a string stream.
| stream | Stream |
| forHash | True if the definition will be used for the MD5 hash |
Reimplemented from swarmros::introspection::ArrayField.
Definition at line 11 of file FixedArrayField.cpp.
|
private |
Element count.
Definition at line 19 of file FixedArrayField.h.