|
golib
0.5
|
#include <golist.h>
Public Types | |
| typedef goListElement< T > | Element |
| typedef goListIterator< T > | iterator |
| typedef goListConstIterator< T > | const_iterator |
Public Member Functions | |
| goList (const goList< T > &other) | |
| goList (const std::list< T > &l) | |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| operator std::list< T > () | |
| Element * | getFrontElement () |
| Element * | getTailElement () |
| ConstElement * | getFrontElement () const |
| ConstElement * | getTailElement () const |
| Element * | find (const T &e) |
| goSize_t | findIndex (const T &e) |
| ConstElement * | find (const T &e) const |
| goSize_t | findIndex (const T &e) const |
| bool | contains (const T &e) const |
| Element * | operator() (goSize_t i) |
| Return element number i. More... | |
| T & | getItem (goSize_t i) |
| const T & | getItem (goSize_t i) const |
| ConstElement * | operator() (goSize_t i) const |
| Return element number i. More... | |
| void | index () |
| Fill the index field of the list elements with indices starting at 0. | |
| void | next () |
| DEPRECATED. | |
| void | prev () |
| DEPRECATED. | |
| T & | getNext () |
| DEPRECATED. | |
| T * | getNextPtr () |
| DEPRECATED. | |
| T & | getPrev () |
| DEPRECATED. | |
| T * | getPrevPtr () |
| DEPRECATED. | |
| T & | getCurrent () |
| DEPRECATED. | |
| T * | getCurrentPtr () |
| DEPRECATED. | |
| T & | getFront () |
| Returns the front of the list. | |
| const T & | getFront () const |
| T * | getFrontPtr () |
| T & | getTail () |
| Returns the tail of the list. | |
| const T & | getTail () const |
| T * | getTailPtr () |
| bool | isFront () const |
| bool | isTail () const |
| bool | isEmpty () const |
| bool | append (const T &elem) |
| bool | prepend (const T &elem) |
| bool | insert (const T &elem) |
| bool | append (goListElement< T > *el, goListElement< T > *here) |
| Append element after another element. More... | |
| bool | prepend (goListElement< T > *el, goListElement< T > *here) |
| Prepend element before another element. More... | |
| bool | remove () |
| Removes the current Item. | |
| goListElement< T > * | remove (goListElement< T > *el) |
| Erase an element from the list. More... | |
| goListElement< T > * | unhook (goListElement< T > *el) |
| Unhook an element. More... | |
| void | erase () |
| Deletes the whole list leaving a zero length list. | |
| void | reverse () |
| void | close () |
| Makes a cyclic list by connecting front and tail. | |
| void | open (goListElement< T > *newFront) |
| Opens a closed (cyclic) list and makes newFront the new front and the preceding element the new tail. | |
| void | open () |
| bool | isClosed () const |
| bool | cyclicPermutation (goIndex_t count=1) |
| void | resetToFront () |
| Resets the pointer to the front of the list. | |
| goInt32 | getSize () const |
| goList< T > & | operator= (const goList< T > &other) |
| Deep-copy this list. More... | |
| goList< T > & | operator= (const std::list< T > &other) |
| bool | operator== (const goList< T > &other) const |
| UNTESTED. | |
| bool | operator!= (const goList< T > &other) const |
| UNTESTED. | |
| bool | operator< (goList< T > &other) |
| bool | operator> (goList< T > &other) |
Public Attributes | |
| const typedef goListElement< T > | ConstElement |
Protected Attributes | |
| goInt32 | size |
| goListElement< T > * | front |
| goListElement< T > * | tail |
| goListElement< T > * | position |
| goListElement< T > | dummy |
Simple doubly linked list. This list is not yet completely tested but should do so far.
|
inline |
Append element after another element.
| el | Element to append |
| here | Point in list where to append el. |
Return element number i.
Return element number i.
Deep-copy this list.
Makes a deep copy of this list, that is copied each element in other and appends it to this.
| other | list to be copied. |
Makes a deep copy of this list, that is copied each element in other and appends it to this.
| other | list to be copied. |
|
inline |
Prepend element before another element.
| el | Element to prepend |
| here | Point in list where to prepend el. |
|
inline |
Erase an element from the list.
| el | The element to remove. |
|
inline |
Unhook an element.
The element is not deleted, as opposed to remove(). It can be re-inserted with the prepend and append methods or put into another list. However, if it is not re-inserted into a list, the user must make sure it gets deleted using the standard C++ delete operator.
| el | Element to unhook. |