Template Class CompoundArrayMessage_

Inheritance Relationships

Base Type

Class Documentation

template<bool BOUNDED, bool FIXED_LENGTH>
class CompoundArrayMessage_ : public ros_babel_fish::ArrayMessageBase

Specialization for CompoundMessage.

Public Functions

inline explicit CompoundArrayMessage_(MessageMemberIntrospection member, std::shared_ptr<void> data)

Creates a compound array, i.e., an array of compound messages in contrast to arrays of primitives such as int, bool etc. If length != 0, the array is initialized with the given number of empty messages created according to the given MessageTemplate.

Parameters:
  • msg_template – The template for the CompoundMessage

  • length – The length of the array.

  • fixed_length – Whether the array has fixed length or elements can be added / removed dynamically.

  • init – Initialize the elements if length is greater than 0, if false, all elements in the container will be nullptr.

inline ~CompoundArrayMessage_() override
inline std::string elementDatatype() const
inline std::string elementName() const
inline CompoundMessage &operator[](size_t index)
inline const CompoundMessage &operator[](size_t index) const
inline CompoundMessage &at(size_t index)
inline const CompoundMessage &at(size_t index) const
inline virtual void assign(size_t index, const CompoundMessage &value)
Parameters:
  • index – The index at which the array element is set/overwritten

  • value – The value with which the array element is overwritten, has to be the same as the element type.

inline void replace(size_t index, const CompoundMessage &value)

Alias for _assign.

inline void push_back(const CompoundMessage &value)
inline void append(const CompoundMessage &value)

Alias for push_back.

inline CompoundMessage &appendEmpty()

Creates a new CompoundMessage, appends it and returns a reference to it.

inline void pop_back()
inline void resize(size_t length)
inline std::vector<CompoundMessage::SharedPtr> values()
inline std::vector<CompoundMessage::ConstSharedPtr> values() const
template<bool B, bool FL>
inline CompoundArrayMessage_<BOUNDED, FIXED_LENGTH> &operator=(const CompoundArrayMessage_<B, FL> &other)
inline void clear()

Protected Functions

inline virtual void onMoved() override