Public Types | Public Member Functions | Private Attributes | List of all members
xpp::Endeffectors< T > Class Template Reference

Data structure to assign values to each endeffector. More...

#include <endeffectors.h>

Public Types

using Container = std::deque< T >
 
using EndeffectorsT = Endeffectors< T >
 

Public Member Functions

T & at (EndeffectorID ee)
 Read/write access to the endeffector stored at index ee. More...
 
const T & at (EndeffectorID ee) const
 Read access to the endeffector stored at index ee. More...
 
 Endeffectors (int n_ee=0)
 
int GetEECount () const
 
std::vector< EndeffectorIDGetEEsOrdered () const
 
bool operator!= (const Endeffectors &other) const
 
const EndeffectorsT operator- (const EndeffectorsT &rhs) const
 
const EndeffectorsT operator/ (double scalar) const
 
void SetAll (const T &value)
 Sets each endeffector to the same value. More...
 
void SetCount (int n_ee)
 Sets the number of endeffectors. More...
 
Container ToImpl () const
 
virtual ~Endeffectors ()=default
 

Private Attributes

Container ee_
 

Detailed Description

template<typename T>
class xpp::Endeffectors< T >

Data structure to assign values to each endeffector.

Common values are xyz-positions (Vector3d), contact-flags (bool), or joints angles of each leg.

This gives a unified interface, and also holds for boolean values (which is not possible using an std::vector). It allows to restrict default constructors, define addition and subtraction of all endeffectors and other convenience functions associated specifically to endeffectors.

The idea is that this class is an enhanced STL container, but complies to the same interface, (e.g at()). However, in case this unified interface is burdensome, you can always access the underlying STL-deque container directly.

Definition at line 86 of file endeffectors.h.

Member Typedef Documentation

◆ Container

template<typename T >
using xpp::Endeffectors< T >::Container = std::deque<T>

Definition at line 88 of file endeffectors.h.

◆ EndeffectorsT

template<typename T >
using xpp::Endeffectors< T >::EndeffectorsT = Endeffectors<T>

Definition at line 89 of file endeffectors.h.

Constructor & Destructor Documentation

◆ Endeffectors()

template<typename T >
xpp::Endeffectors< T >::Endeffectors ( int  n_ee = 0)

Definition at line 203 of file endeffectors.h.

◆ ~Endeffectors()

template<typename T >
virtual xpp::Endeffectors< T >::~Endeffectors ( )
virtualdefault

Member Function Documentation

◆ at() [1/2]

template<typename T >
T & xpp::Endeffectors< T >::at ( EndeffectorID  ee)

Read/write access to the endeffector stored at index ee.

Parameters
eeEndeffector index/position.

Definition at line 224 of file endeffectors.h.

◆ at() [2/2]

template<typename T >
const T & xpp::Endeffectors< T >::at ( EndeffectorID  ee) const

Read access to the endeffector stored at index ee.

Parameters
eeEndeffector index/position.

Definition at line 231 of file endeffectors.h.

◆ GetEECount()

template<typename T >
int xpp::Endeffectors< T >::GetEECount
Returns
Number of endeffectors this structure holds.

Definition at line 238 of file endeffectors.h.

◆ GetEEsOrdered()

template<typename T >
std::vector< EndeffectorID > xpp::Endeffectors< T >::GetEEsOrdered
Returns
All endeffector IDs from 0 to the number of endeffectors.

Definition at line 252 of file endeffectors.h.

◆ operator!=()

template<typename T >
bool xpp::Endeffectors< T >::operator!= ( const Endeffectors< T > &  other) const
Returns
true if only one element differs from other.

Definition at line 294 of file endeffectors.h.

◆ operator-()

template<typename T >
const Endeffectors< T >::EndeffectorsT xpp::Endeffectors< T >::operator- ( const EndeffectorsT rhs) const

Definition at line 263 of file endeffectors.h.

◆ operator/()

template<typename T >
const Endeffectors< T >::EndeffectorsT xpp::Endeffectors< T >::operator/ ( double  scalar) const

Definition at line 274 of file endeffectors.h.

◆ SetAll()

template<typename T >
void xpp::Endeffectors< T >::SetAll ( const T &  value)

Sets each endeffector to the same value.

Definition at line 217 of file endeffectors.h.

◆ SetCount()

template<typename T >
void xpp::Endeffectors< T >::SetCount ( int  n_ee)

Sets the number of endeffectors.

Definition at line 210 of file endeffectors.h.

◆ ToImpl()

template<typename T >
Endeffectors< T >::Container xpp::Endeffectors< T >::ToImpl
Returns
a returns a copy(!) of the underlying STL-deque container.

Definition at line 245 of file endeffectors.h.

Member Data Documentation

◆ ee_

template<typename T >
Container xpp::Endeffectors< T >::ee_
private

Definition at line 140 of file endeffectors.h.


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


xpp_states
Author(s): Alexander W. Winkler
autogenerated on Wed Mar 2 2022 01:14:14