RobWorkProject  23.9.11-
Public Member Functions | List of all members
ContactStrategyTracking::StrategyData Struct Referenceabstract

Base struct that can be extended for strategy specific data. More...

#include <ContactStrategyTracking.hpp>

Public Member Functions

 StrategyData ()
 Constructor.
 
virtual ~StrategyData ()
 Destructor.
 
virtual StrategyDatacopy () const =0
 Do a copy of the strategy data. More...
 
virtual const UserData::Ptr getUserData (std::size_t index) const =0
 Get user data for the contact with given index. More...
 
virtual void setUserData (std::size_t index, const UserData::Ptr data)=0
 Attach user data to a given contact. More...
 
virtual void remove (std::size_t index)=0
 Remove meta-data for a specific contact. More...
 
virtual std::size_t getSize () const =0
 Get the number of contacts tracked currently. More...
 

Detailed Description

Base struct that can be extended for strategy specific data.

Member Function Documentation

◆ copy()

virtual StrategyData* copy ( ) const
pure virtual

Do a copy of the strategy data.

Returns
a new copy of the strategy data owned by the caller.

◆ getSize()

virtual std::size_t getSize ( ) const
pure virtual

Get the number of contacts tracked currently.

Returns
the number of tracked contacts.

◆ getUserData()

virtual const UserData::Ptr getUserData ( std::size_t  index) const
pure virtual

Get user data for the contact with given index.

Parameters
index[in] the contact to get user data for.
Returns
pointer to user data, or NULL if no user data is set.

◆ remove()

virtual void remove ( std::size_t  index)
pure virtual

Remove meta-data for a specific contact.

Parameters
index[in] the contact to remove.

◆ setUserData()

virtual void setUserData ( std::size_t  index,
const UserData::Ptr  data 
)
pure virtual

Attach user data to a given contact.

Parameters
index[in] the contact to set user data for.
data[in] a pointer to the data.

The documentation for this struct was generated from the following file: