![]() |
User Manual, Developers Guide and API Documentation |
![]() |
#include <container/FastList.hpp>


Public Member Functions | |
| iterator | begin () const |
| Iterator to the begin of the list. | |
| void | clear () |
| Remove alle element from the list. | |
| bool | contains (const T &x) |
| Does the list contain value x? | |
| bool | empty () const |
| Is list empty? | |
| iterator | end () const |
| Iterator to the end of the list. | |
| void | erase (const iterator &i) |
| Erase element at iterator's position. | |
| FastList (const FastList &f) | |
| Copy Constructor. | |
| FastList () | |
| Default Constructor. | |
| T & | front () const |
| Get a reference to the first element. | |
| void | operator= (const FastList &f) |
| Assignment operator. | |
| void | pop_front () |
| void | push_back (T *x) |
| Add value x at the end of the list. | |
| void | push_back (const T &x) |
| Add value x at the end of the list. | |
| void | push_front (T *x) |
| Add value x at the front of the list. | |
| void | push_front (const T &x) |
| Add value x at the front of the list. | |
| void | remove (T *x) |
| Remove element with value x. | |
| void | remove (const T &x) |
| Remove element with value x. | |
| int | size () const |
| Returns the size of the list. | |
| ~FastList () | |
| Destructor - removes all element from the list. | |
Private Member Functions | |
| void | copy (const FastList &f) |
| Special copy for lists. | |
Private Attributes | |
| FastListNode< T > | b |
| Sentinel. | |
| int | s |
| Size of the list. | |
Classes | |
| class | iterator |
| An STL-sytle iterator for the FastList. More... | |
// Note how FLTest is enabled to // support FastLists by deriving from FastListEnabler class FLTest : public FastListEnabler<FLTest*> { public: explicit FLTest(int id) : FastListEnabler<FLTest*>(), Id(id) { } int getId() const { return Id; } private: int Id; };
Define a FastList:
FastList<FLTest*> f;
Push some elements to the front of the list:
flt1 = new FLTest(1);
f.push_front(flt1);
Definition at line 58 of file FastList.hpp.
| wns::container::FastList< T >::FastList | ( | ) | [inline] |
Definition at line 173 of file FastList.hpp.
| wns::container::FastList< T >::~FastList | ( | ) | [inline] |
Definition at line 181 of file FastList.hpp.
| wns::container::FastList< T >::FastList | ( | const FastList< T > & | f | ) | [inline] |
Definition at line 189 of file FastList.hpp.
| iterator wns::container::FastList< T >::begin | ( | ) | const [inline] |
Definition at line 208 of file FastList.hpp.
| void wns::container::FastList< T >::clear | ( | ) | [inline] |
Definition at line 250 of file FastList.hpp.
| bool wns::container::FastList< T >::contains | ( | const T & | x | ) | [inline] |
Definition at line 352 of file FastList.hpp.
| void wns::container::FastList< T >::copy | ( | const FastList< T > & | f | ) | [inline, private] |
Definition at line 361 of file FastList.hpp.
| bool wns::container::FastList< T >::empty | ( | ) | const [inline] |
Definition at line 234 of file FastList.hpp.
| iterator wns::container::FastList< T >::end | ( | ) | const [inline] |
Definition at line 218 of file FastList.hpp.
| void wns::container::FastList< T >::erase | ( | const iterator & | i | ) | [inline] |
Definition at line 265 of file FastList.hpp.
| T& wns::container::FastList< T >::front | ( | ) | const [inline] |
Definition at line 226 of file FastList.hpp.
| void wns::container::FastList< T >::operator= | ( | const FastList< T > & | f | ) | [inline] |
Definition at line 199 of file FastList.hpp.
| void wns::container::FastList< T >::pop_front | ( | ) | [inline] |
Definition at line 344 of file FastList.hpp.
| void wns::container::FastList< T >::push_back | ( | T * | x | ) | [inline] |
Definition at line 339 of file FastList.hpp.
| void wns::container::FastList< T >::push_back | ( | const T & | x | ) | [inline] |
Definition at line 326 of file FastList.hpp.
| void wns::container::FastList< T >::push_front | ( | T * | x | ) | [inline] |
Definition at line 318 of file FastList.hpp.
| void wns::container::FastList< T >::push_front | ( | const T & | x | ) | [inline] |
Definition at line 305 of file FastList.hpp.
| void wns::container::FastList< T >::remove | ( | T * | x | ) | [inline] |
Definition at line 292 of file FastList.hpp.
| void wns::container::FastList< T >::remove | ( | const T & | x | ) | [inline] |
Definition at line 279 of file FastList.hpp.
| int wns::container::FastList< T >::size | ( | ) | const [inline] |
Definition at line 242 of file FastList.hpp.
FastListNode<T> wns::container::FastList< T >::b [mutable, private] |
Definition at line 373 of file FastList.hpp.
int wns::container::FastList< T >::s [private] |
Definition at line 378 of file FastList.hpp.
1.5.5