![]() |
Visual Servoing Platform
version 3.0.1
|
#include <vpList.h>
Public Member Functions | |
vpList () | |
vpList (const vpList &l) | |
virtual | ~vpList () |
void | next (void) |
void | previous (void) |
void | front (void) |
void | end (void) |
bool | outside (void) const |
bool | empty (void) const |
type & | value (void) |
const type & | value (void) const |
void | suppress (void) |
void | kill () |
void | display () |
void | print () |
void | addRight (const type &el) |
void | addLeft (const type &el) |
void | modify (const type &el) |
void | addRight (type &el) |
void | addLeft (type &el) |
void | swapLeft () |
void | swapRight () |
unsigned int | nbElement (void) |
unsigned int | nbElements (void) |
vpList< type > & | operator= (const vpList< type > &l) |
void | operator+= (vpList< type > &l) |
void | operator+= (const type &l) |
bool | nextOutside (void) const |
bool | previousOutside (void) const |
type & | previousValue (void) |
type & | nextValue (void) |
type & | firstValue (void) |
type & | lastValue (void) |
Public Attributes | |
unsigned int | nb |
vpListElement< type > * | first |
vpListElement< type > * | last |
vpListElement< type > * | cur |
Provide simple list management.
Data structure: each object vpListElement contains its own value and two pointers to the next element of the list and to the previous one A list is mainly a pointer to three of these elements - one (cur) points the current element - one (first) points to a virtual element located at the beginning of the list - one (last) points to a virtual element located at the end of the list first, last and cur are used internally and are not to be considered by "basic" user. Notation: In this documentation we note such a list as [*, a, b, c, *] f ^ l where - the * are the two virtual elements (first (f) and last (l)) - the ^ denotes the position of the current element
vpList destructor
Definition at line 243 of file vpList.h.
References vpList< type >::first, vpList< type >::kill(), and vpList< type >::last.
|
inline |
add a new element in the list, at the left of the current one
[*, a, b, c, *] --> addLeft(i) --> [*, a, i, b, c, *] ^ ^
Definition at line 516 of file vpList.h.
References vpList< type >::cur, vpList< type >::empty(), vpList< type >::last, vpList< type >::nb, and vpList< type >::outside().
|
inline |
add a new element in the list, at the left of the current one
[*, a, b, c, *] --> addLeft(i) --> [*, a, i, b, c, *] ^ ^
Definition at line 583 of file vpList.h.
References vpList< type >::cur, vpList< type >::empty(), vpList< type >::last, vpList< type >::nb, and vpList< type >::outside().
|
inline |
add a new element in the list, at the right of the current one
[*, a, b, c, *] --> addRight(i) --> [*, a, b, i, c, *] ^ ^
Definition at line 483 of file vpList.h.
References vpList< type >::cur, vpList< type >::empty(), vpList< type >::first, vpList< type >::nb, and vpList< type >::outside().
Referenced by vpList< type >::operator+=(), and vpList< type >::operator=().
|
inline |
add a new element in the list, at the right of the current one
[*, a, b, c, *] --> addRight(i) --> [*, a, b, i, c, *] ^ ^
Definition at line 550 of file vpList.h.
References vpList< type >::cur, vpList< type >::empty(), vpList< type >::first, vpList< type >::nb, and vpList< type >::outside().
void vpList< type >::display | ( | ) |
Print (std::cout) all the element of the list.
Definition at line 824 of file vpList.h.
References vpList< type >::front(), vpList< type >::next(), vpList< type >::outside(), and vpList< type >::value().
bool vpList< type >::empty | ( | void | ) | const |
Test if the list is empty.
[*, a, b, c, d, *] --> empty return false [*, *] --> empty return true
Definition at line 417 of file vpList.h.
References vpList< type >::first, and vpList< type >::last.
Referenced by vpList< type >::addLeft(), vpList< type >::addRight(), and vpList< type >::kill().
|
inline |
Position the current element on the last element of the list.
[*, a, b, c, d, *] --> end() --> [*, a, b, c, d, *] ^ ^
Definition at line 403 of file vpList.h.
References vpList< type >::cur, and vpList< type >::last.
Referenced by vpList< type >::operator+=().
type & vpList< type >::firstValue | ( | void | ) |
return the first element of the list
[*, a, b, c, d, *] --> firstValue() return a
Definition at line 361 of file vpList.h.
References vpList< type >::first.
|
inline |
Position the current element on the first element of the list.
[*, a, b, c, d, *] --> front() --> [*, a, b, c, d, *] ^ ^
Definition at line 389 of file vpList.h.
References vpList< type >::cur, and vpList< type >::first.
Referenced by vpList< type >::display(), vpNurbs::globalCurveApprox(), vpNurbs::globalCurveInterp(), vpList< type >::kill(), vpList< type >::operator+=(), and vpList< type >::operator=().
void vpList< type >::kill | ( | ) |
Destroy the list.
[*, a, b, c, *] --> kill --> [*, *] ^ ^
Definition at line 697 of file vpList.h.
References vpList< type >::empty(), vpList< type >::front(), and vpList< type >::suppress().
Referenced by vpList< type >::operator=(), and vpList< type >::~vpList().
type & vpList< type >::lastValue | ( | void | ) |
return the last element of the list
[*, a, b, c, d, *] --> lastValue() return d
Definition at line 374 of file vpList.h.
References vpList< type >::last.
|
inline |
Modify the value of the current element.
[*, a, b, c, *] --> modify(i) --> [*, a, i, c, *] ^ ^
Definition at line 615 of file vpList.h.
References vpList< type >::cur.
|
inline |
return the number of element in the list
Definition at line 255 of file vpList.h.
References vpList< type >::nb.
|
inline |
return the number of element in the list
Definition at line 264 of file vpList.h.
References vpList< type >::nb.
|
inline |
position the current element on the next one
[*, a, b, c, d, *] --> next() --> [*, a, b, c, d, *] ^ ^
Definition at line 278 of file vpList.h.
References vpList< type >::cur.
Referenced by vpList< type >::display(), vpNurbs::globalCurveApprox(), vpNurbs::globalCurveInterp(), and vpList< type >::operator+=().
bool vpList< type >::nextOutside | ( | void | ) | const |
Test if the next element is outside the list (ie if the current element is the last one)
[*, a, b, c, d, *] --> nextOutside return true ^
Definition at line 450 of file vpList.h.
References vpList< type >::cur, vpList< type >::first, and vpList< type >::last.
type & vpList< type >::nextValue | ( | void | ) |
return the value of the next element
[*, a, b, c, d, *] --> nextValue() return c ^
Definition at line 347 of file vpList.h.
References vpList< type >::cur.
Append two lists.
[*, a, b, *] += [*, c, d, *] --> [*, a, b, c, d, *] ^
Definition at line 777 of file vpList.h.
References vpList< type >::addRight(), vpList< type >::end(), vpList< type >::front(), vpList< type >::next(), vpList< type >::outside(), and vpList< type >::value().
|
inline |
Append an element to a list.
[*, a, b, *] += c --> [*, a, b, c, *] ^
Definition at line 800 of file vpList.h.
References vpList< type >::addRight(), and vpList< type >::end().
Copy constructor const.
l | : the list to copy |
Definition at line 747 of file vpList.h.
References vpList< type >::addRight(), vpList< type >::cur, vpList< type >::first, vpList< type >::front(), vpList< type >::kill(), vpList< type >::last, and vpList< type >::nb.
|
inline |
Test if the current element is outside the list (on the virtual element)
[*, a, b, c, d, *] --> outside return false ^ [*, a, b, c, d, *] --> outside return true ^ or ^
Definition at line 434 of file vpList.h.
References vpList< type >::cur, vpList< type >::first, and vpList< type >::last.
Referenced by vpList< type >::addLeft(), vpList< type >::addRight(), vpList< type >::display(), vpNurbs::globalCurveApprox(), vpNurbs::globalCurveInterp(), and vpList< type >::operator+=().
|
inline |
position the current element on the previous one
[*, a, b, c, d, *] --> previous() --> [*, a, b, c, d, *] ^ ^
Definition at line 292 of file vpList.h.
References vpList< type >::cur.
bool vpList< type >::previousOutside | ( | void | ) | const |
Test if the previous element is outside the list (ie if the current element is the firts one)
[*, a, b, c, d, *] --> nextOutside return true ^
Definition at line 466 of file vpList.h.
References vpList< type >::cur, vpList< type >::first, and vpList< type >::last.
type & vpList< type >::previousValue | ( | void | ) |
return the value of the previous element
[*, a, b, c, *] --> previousValue() return a ^
Definition at line 334 of file vpList.h.
References vpList< type >::cur.
void vpList< type >::suppress | ( | void | ) |
suppress the current element
[*, a, b, c, d, *] --> suppress --> [*, a, c, d, *] ^ ^
Definition at line 721 of file vpList.h.
References vpList< type >::cur, and vpList< type >::nb.
Referenced by vpList< type >::kill().
|
inline |
Switch the current element with the element on the left.
[*, a, b, c, *] --> swapLeft --> [*, b, a, c, *] ^ ^
Definition at line 629 of file vpList.h.
References vpList< type >::cur, and vpList< type >::first.
|
inline |
Switch the current element with the element on the right.
[*, a, b, c, *] --> swapRight --> [*, a, c, b, *] ^ ^
Definition at line 663 of file vpList.h.
References vpList< type >::cur, and vpList< type >::last.
|
inline |
return the value of the current element
[*, a, b, c, *] --> value() return b ^
Definition at line 306 of file vpList.h.
References vpList< type >::cur.
Referenced by vpList< type >::display(), vpNurbs::globalCurveApprox(), vpNurbs::globalCurveInterp(), and vpList< type >::operator+=().
|
inline |
return the value of the current element using a const ref.
[*, a, b, c, *] --> value() return b ^
Definition at line 320 of file vpList.h.
References vpList< type >::cur.
vpListElement<type>* vpList< type >::cur |
the current item in the list
[*, a, b, c, *] ^
Definition at line 148 of file vpList.h.
Referenced by vpList< type >::addLeft(), vpList< type >::addRight(), vpList< type >::end(), vpList< type >::front(), vpList< type >::modify(), vpList< type >::next(), vpList< type >::nextOutside(), vpList< type >::nextValue(), vpList< type >::operator=(), vpList< type >::outside(), vpList< type >::previous(), vpList< type >::previousOutside(), vpList< type >::previousValue(), vpList< type >::suppress(), vpList< type >::swapLeft(), vpList< type >::swapRight(), and vpList< type >::value().
vpListElement<type>* vpList< type >::first |
! number of items in the List
the first virtual item in the list
[*, a, b, c, *] f
Definition at line 132 of file vpList.h.
Referenced by vpList< type >::addRight(), vpList< type >::empty(), vpList< type >::firstValue(), vpList< type >::front(), vpList< type >::nextOutside(), vpList< type >::operator=(), vpList< type >::outside(), vpList< type >::previousOutside(), vpList< type >::swapLeft(), and vpList< type >::~vpList().
vpListElement<type>* vpList< type >::last |
the last virtualitem in the list
[*, a, b, c, *] l
Definition at line 140 of file vpList.h.
Referenced by vpList< type >::addLeft(), vpList< type >::empty(), vpList< type >::end(), vpList< type >::lastValue(), vpList< type >::nextOutside(), vpList< type >::operator=(), vpList< type >::outside(), vpList< type >::previousOutside(), vpList< type >::swapRight(), and vpList< type >::~vpList().
unsigned int vpList< type >::nb |
Definition at line 124 of file vpList.h.
Referenced by vpList< type >::addLeft(), vpList< type >::addRight(), vpList< type >::nbElement(), vpList< type >::nbElements(), vpList< type >::operator=(), and vpList< type >::suppress().