ISeeML  1.0
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
iSeeML::rob::ArrayPaths Class Reference

This class defines compound (or complex, or composed) paths, which are made of a set of basic paths. More...

#include <ArrayPaths.hpp>

Inheritance diagram for iSeeML::rob::ArrayPaths:
Inheritance graph
[legend]
Collaboration diagram for iSeeML::rob::ArrayPaths:
Collaboration graph
[legend]

Public Member Functions

 ArrayPaths (const int n)
 The main constructor only needs a number of paths. More...
 
 ~ArrayPaths ()
 The destructor frees all the paths and the array. More...
 
void setPath (const int index, const bool isBasic, iSeeML::rob::Path *path)
 Add a given (dynamically allocated) path to the array. More...
 
iSeeML::Objectclone () const
 Description method, giving a copy of the current object. More...
 
int nbPieces () const
 Description method, giving the number of pieces of the path. More...
 
- Public Member Functions inherited from iSeeML::rob::CompoundPath
void writeTo (ostream &O) const
 Description method, writing a description of the path in a given output stream (the array of pieces is written). More...
 
const iSeeML::rob::OrPtConfigstart () const
 Description method, giving the path's starting configuration (first piece's starting configuration). More...
 
const iSeeML::rob::OrPtConfigend () const
 Description method, giving the path's final configuration (last piece's starting configuration). More...
 
const iSeeML::rob::BasicPathpiece (const int index) const
 Description method, returning the (constant) basic path of given index in the list of which this compound path is made. More...
 
double length () const
 Description method, giving the path's length (sum of the pieces' length). More...
 
double deflection () const
 Description method, giving the path's deflection (sum of the pieces' deflection). More...
 
iSeeML::rob::BasicPathpiece (const int index)
 Modification method, returning (for modification) the basic path of given index in the list of which this compound path is made. More...
 
iSeeML::rob::CurvConfig operator[] (const double &s) const
 Description method, giving a configuration at a given arc length along the path. More...
 
- Public Member Functions inherited from iSeeML::rob::Path
bool operator< (const Path &other) const
 Order operator, defining an order relation on the paths' set, based on the path's length. More...
 
- Public Member Functions inherited from iSeeML::Object
virtual ~Object ()
 This virtual class needs a virtual destructor.
 
virtual const string className () const
 Description method, giving the object's class name. More...
 
bool sameClass (const iSeeML::Object &other)
 Method verifying that a given object has the same type (same class name) than the current one. More...
 

Static Public Attributes

static const string ClassName
 The class name is public, as this class can be instanced. More...
 

Protected Member Functions

iSeeML::rob::BasicPath_piece (const int index) const
 Virtual method returning the basic path of given index in the list of which this compound path is made (no verification). More...
 
- Protected Member Functions inherited from iSeeML::rob::CompoundPath
iSeeML::rob::BasicPathgetPiece (const int index) const
 Method returning the basic path of given index in the list of which this compound path is made. More...
 
- Protected Member Functions inherited from iSeeML::Object
virtual int algDimension () const
 Description method for algebraic vectors, giving the dimension of the containing space (default is zero). More...
 
virtual double algCoord (const int) const
 Description method for algebraic vectors, giving coordinate of given index for this vector. More...
 
virtual void algWriteTo (ostream &O) const
 Description method for algebraic vectors, writing this vector in a given output stream: coordinates for each dimension are written, between paranthesis and separated by commas. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from iSeeML::Object
template<class T >
static const T & min (const T &a, const T &b)
 Method giving the minimum of two elements. More...
 
template<class T >
static const T & max (const T &a, const T &b)
 Method giving the maximum of two elements. More...
 
static double sqr (const double &x)
 Method giving the square of a double. More...
 
static double mod2pi (const double &theta)
 Method giving the angle between - $\pi$ (excluded) and $\pi$ (included), which is equal to a given angle modulo 2 $\pi$. More...
 
static double rad2deg (const double &theta)
 Method transforming an angle in radian, $x \pi$ with $x$ between -1 (excluded) and 1 (included), into its equivalent in degree, i.e. More...
 
static double deg2rad (const double &theta)
 Method transforming an angle in degree, $90 x$ with $x$ between -1 (excluded) and 1 (included), into its equivalent in radian, i.e. More...
 
static bool isPositive (const double &x)
 Method telling whether a double is strictly positive. More...
 
static bool isNegative (const double &x)
 Method telling whether a double is strictly negative. More...
 
static bool isZero (const double &x)
 Method comparing a double to zero. More...
 
static int sign (const double &x)
 Method giving the sign of a double. More...
 

Detailed Description

This class defines compound (or complex, or composed) paths, which are made of a set of basic paths.

Nearly all virtual methods of iSeeML::rob::Path are defined in this class (except className and clone), sub-classes ``just'' have to define this one and constructors (this is not so easy, as it generally requires a planning method).

Author
Alexis Scheuer.
Version
1.0

Constructor & Destructor Documentation

iSeeML::rob::ArrayPaths::ArrayPaths ( const int  n)
inline

The main constructor only needs a number of paths.

Parameters
nthe number of paths in this array.
iSeeML::rob::ArrayPaths::~ArrayPaths ( )
inline

The destructor frees all the paths and the array.

Member Function Documentation

iSeeML::rob::BasicPath& iSeeML::rob::ArrayPaths::_piece ( const int  index) const
inlineprotectedvirtual

Virtual method returning the basic path of given index in the list of which this compound path is made (no verification).

Parameters
indexthe index of the desired piece (between 1 and the result of nbPieces).
Returns
the basic path whose index has been given.
See also
nbPieces, piece, getPiece.

Implements iSeeML::rob::CompoundPath.

iSeeML::Object& iSeeML::rob::ArrayPaths::clone ( ) const
inlinevirtual

Description method, giving a copy of the current object.

This clone is dynamically allocated (and can be built easily using a copy constructor), it has to be deleted later.

Precondition
memory should not be full. If memory is full and ISEEML_CHECK_NIL_POINTER is defined (see CompilerFlags.h), an error message is generated and the program exits.
Returns
a copy/clone of the current object.

Implements iSeeML::Object.

int iSeeML::rob::ArrayPaths::nbPieces ( ) const
inlinevirtual

Description method, giving the number of pieces of the path.

Returns
the number of pieces of the path.
Version
1.1

Implements iSeeML::rob::CompoundPath.

void iSeeML::rob::ArrayPaths::setPath ( const int  index,
const bool  isBasic,
iSeeML::rob::Path path 
)
inline

Add a given (dynamically allocated) path to the array.

Parameters
indexthe index of the added path,
isBasicwhether the added path is a basic one,
patha pointer on the added path.

Member Data Documentation

const string iSeeML::rob::ArrayPaths::ClassName
static

The class name is public, as this class can be instanced.

See also
className.

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