#include <List.hpp>
Inheritance diagram for List< T >:


Public Member Functions | |
| List () | |
| List (int l) | |
| int | Reset (int newlength) |
| int | Expand () |
| int | Delete () |
| int | GetLength () const |
| int | Length () const |
| int | MaxLength () const |
| int | Append (const T &newDat) |
| int | Prepend (const T &newDat) |
| int | GetElem (T &el) const |
| int | SetElem (const T &el) |
| int | DeleteElem () |
| Deletes the element at the currently set position. | |
| int | MoveForw () |
| Moves to next position. | |
| int | MoveBack () |
| Moves to prev position. | |
| int | GoToHead () |
| int | GoToTail () |
| bool | IsIn (const T &el) const |
| bool | GoTo (const T &el) |
| std::ostream & | Print (std::ostream &o) const |
| std::ostream & | PrintBackwards (std::ostream &o) const |
Protected Attributes | |
| Array< T > | data |
| Array< int > | prev |
| Array< int > | next |
| int | head |
| int | tail |
| int | position |
| int | length |
| int | maxLength |
Static Protected Attributes | |
| static const int | OUT_OF_RANGE = -1 |
| static const double | RESIZE_FACTOR = std::sqrt(2.) |
Double linked list, stored in an array. The elements are always stored compact in the first positions could be optimized for speed, but for the current applications this more readable version is OK.
| int List< T >::Reset | ( | int | newlength | ) | [inline] |
| int List< T >::Expand | ( | ) | [inline] |
| int List< T >::Delete | ( | ) | [inline] |
| int List< T >::GetLength | ( | ) | const [inline] |
| int List< T >::Length | ( | ) | const [inline] |
| int List< T >::MaxLength | ( | ) | const [inline] |
| int List< T >::Append | ( | const T & | newDat | ) | [inline] |
| int List< T >::Prepend | ( | const T & | newDat | ) | [inline] |
| int List< T >::GetElem | ( | T & | el | ) | const [inline] |
| int List< T >::SetElem | ( | const T & | el | ) | [inline] |
| int List< T >::DeleteElem | ( | ) | [inline] |
Deletes the element at the currently set position.
To avoid "holes" in the array, the element from the end is moved forward.
| int List< T >::MoveForw | ( | ) | [inline] |
Moves to next position.
| int List< T >::MoveBack | ( | ) | [inline] |
Moves to prev position.
| int List< T >::GoToHead | ( | ) | [inline] |
| int List< T >::GoToTail | ( | ) | [inline] |
| bool List< T >::IsIn | ( | const T & | el | ) | const [inline] |
| bool List< T >::GoTo | ( | const T & | el | ) | [inline] |
| std::ostream & List< T >::Print | ( | std::ostream & | o | ) | const [inline] |
| std::ostream & List< T >::PrintBackwards | ( | std::ostream & | o | ) | const [inline] |
const int List< T >::OUT_OF_RANGE = -1 [inline, static, protected] |
const double List< T >::RESIZE_FACTOR = std::sqrt(2.) [inline, static, protected] |
1.5.2