Public Member Functions | List of all members
swarmros::introspection::ArrayField Class Reference

Field for dynamic arrays. More...

#include <ArrayField.h>

Inheritance diagram for swarmros::introspection::ArrayField:
Inheritance graph
[legend]

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 swarmio::data::Variant Deserialize (ros::serialization::IStream &stream, const FieldStack &fieldStack) const override
 Deserialize a stream into a variant. More...
 
virtual uint32_t DeserializeCount (ros::serialization::IStream &stream, const FieldStack &fieldStack) const
 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...
 
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 Serialize (ros::serialization::OStream &stream, const swarmio::data::Variant &value, const FieldStack &fieldStack) const override
 Serialize a variant onto a stream. More...
 
virtual void SerializeCount (ros::serialization::OStream &stream, uint32_t count, const FieldStack &fieldStack) const
 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::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 SerializerGetSerializer () 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...
 

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 SerializerSerializerForType (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...
 

Detailed Description

Field for dynamic arrays.

Definition at line 11 of file ArrayField.h.

Member Function Documentation

uint32_t ArrayField::CalculateSerializedLength ( const swarmio::data::Variant &  value,
const FieldStack fieldStack 
) const
overridevirtual

Calculate the length of a serialized message in bytes.

Parameters
valueValue
fieldStackStack of fields to determine location
Returns
uint32_t

Reimplemented from swarmros::introspection::Field.

Reimplemented in swarmros::introspection::FixedArrayField.

Definition at line 30 of file ArrayField.cpp.

swarmio::data::Variant ArrayField::Deserialize ( ros::serialization::IStream stream,
const FieldStack fieldStack 
) const
overridevirtual

Deserialize a stream into a variant.

Parameters
streamInput stream
fieldStackStack of fields to determine location
Returns
swarmio::data::Variant

Reimplemented from swarmros::introspection::Field.

Definition at line 53 of file ArrayField.cpp.

uint32_t ArrayField::DeserializeCount ( ros::serialization::IStream stream,
const FieldStack fieldStack 
) const
virtual

Deserialize the count of the array from a stream.

Parameters
streamInput stream
fieldStackStack of fields to determine location
Returns
uint32_t

Reimplemented in swarmros::introspection::FixedArrayField.

Definition at line 60 of file ArrayField.cpp.

void ArrayField::EmitDefault ( ros::serialization::OStream stream,
const FieldStack fieldStack 
) const
overridevirtual

Write the default value to the stream.

Parameters
streamOutput stream
fieldStackStack of fields to determine location

Reimplemented from swarmros::introspection::Field.

Reimplemented in swarmros::introspection::FixedArrayField.

Definition at line 48 of file ArrayField.cpp.

uint32_t ArrayField::GetDefaultLength ( const FieldStack fieldStack) const
overridevirtual

Get the length of the default value.

Parameters
fieldStackStack of fields to determine location
Returns
uint32_t

Reimplemented from swarmros::introspection::Field.

Reimplemented in swarmros::introspection::FixedArrayField.

Definition at line 25 of file ArrayField.cpp.

swarmio::data::discovery::Field ArrayField::GetFieldDescriptor ( ) const
overridevirtual

Build a field descriptor for the underlying type.

Returns
swarmio::data::discovery::Field

Reimplemented from swarmros::introspection::Field.

Reimplemented in swarmros::introspection::FixedArrayField.

Definition at line 67 of file ArrayField.cpp.

void ArrayField::Serialize ( ros::serialization::OStream stream,
const swarmio::data::Variant &  value,
const FieldStack fieldStack 
) const
overridevirtual

Serialize a variant onto a stream.

Parameters
streamOutput stream
valueValue to serialize
fieldStackStack of fields to determine location

Reimplemented from swarmros::introspection::Field.

Definition at line 36 of file ArrayField.cpp.

void ArrayField::SerializeCount ( ros::serialization::OStream stream,
uint32_t  count,
const FieldStack fieldStack 
) const
virtual

Serialize the count of the array onto a stream.

Parameters
streamOutput stream
countArray count
fieldStackStack of fields to determine location

Reimplemented in swarmros::introspection::FixedArrayField.

Definition at line 43 of file ArrayField.cpp.

void ArrayField::WriteDefinition ( std::stringstream &  stream,
bool  forHash 
) const
overridevirtual

Write the definition of this field to a string stream.

Parameters
streamStream
forHashTrue if the definition will be used for the MD5 hash

Reimplemented from swarmros::introspection::Field.

Reimplemented in swarmros::introspection::FixedArrayField.

Definition at line 10 of file ArrayField.cpp.


The documentation for this class was generated from the following files:


swarmros
Author(s):
autogenerated on Fri Apr 3 2020 03:42:48