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 59 of file endeffectors.h.

Member Typedef Documentation

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

Definition at line 61 of file endeffectors.h.

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

Definition at line 62 of file endeffectors.h.

Constructor & Destructor Documentation

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

Definition at line 176 of file endeffectors.h.

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

Member Function Documentation

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 197 of file endeffectors.h.

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 204 of file endeffectors.h.

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

Definition at line 211 of file endeffectors.h.

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

Definition at line 225 of file endeffectors.h.

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 267 of file endeffectors.h.

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

Definition at line 236 of file endeffectors.h.

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

Definition at line 247 of file endeffectors.h.

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

Sets each endeffector to the same value.

Definition at line 190 of file endeffectors.h.

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

Sets the number of endeffectors.

Definition at line 183 of file endeffectors.h.

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

Definition at line 218 of file endeffectors.h.

Member Data Documentation

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

Definition at line 113 of file endeffectors.h.


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


xpp_states
Author(s): Alexander W. Winkler
autogenerated on Sun Apr 7 2019 02:34:49