Template Class SuperSRDFStep

Inheritance Relationships

Base Type

Class Documentation

template<typename T>
class SuperSRDFStep : public moveit_setup::srdf_setup::SRDFStep

This class provides a number of standard operations based on srdf’s vector members.

Assuming T is a type that has a name_ field, this provides the following operations on the container in which the name_ field is kept unique.

  • find

  • create

  • rename

  • remove

  • get

Public Functions

virtual std::vector<T> &getContainer() = 0

Returns the reference to the vector in the SRDF.

virtual InformationFields getInfoField() const = 0

Returns the info field associated with this part of the SRDF.

inline T *find(const std::string &name)

Return a pointer to an item with the given name if it exists, otherwise null.

inline T *create(const std::string &name)

Create an item with the given name and return the pointer.

Note

: Does not check if an item with the given name exists

inline T *rename(const std::string &old_name, const std::string &new_name)

Renames an item and returns a pointer to the item.

Throws:

runtime_error – If an item exists with the new name

inline bool remove(const std::string &name)

Delete an item with the given name from the list.

Returns:

true if item was found

inline T *get(const std::string &name, const std::string &old_name = "")

Get a pointer to an item with the given name, creating if necessary. If old_name is provided (and is different) will rename the given item.