CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

csList Class Template Reference

A lightweight template double-linked list. More...

#include <list.h>

List of all members.

Public Methods

 csList ()
 Default constructor. More...

 csList (const csList &other)
 Copyconstructor. More...

 ~csList ()
 Destructor. More...

csList & operator= (const csList &other)
 Assignment, swallow copy. More...

Iterator PushFront (const T &item)
 Add an item first in list. Copy T into the listdata. More...

Iterator PushBack (const T &item)
 Add an item last in list. Copy T into the listdata. More...

void Delete (Iterator &it)
 Remove specific item by iterator. More...

void DeleteAll ()
 Empty an list. More...

const T & Front () const
 Return first element of the list. More...

const T & Last () const
 Return last element of the list. More...

bool PopFront ()
 Deletes the first element of the list. More...

bool PopBack ()
 Deletes the last element of the list. More...


Protected Methods

void Delete (csListElement *el)
 Remove specific item by explicit ref. More...


Detailed Description

template<class T>
class csList< T >

A lightweight template double-linked list.

This is VERY lightweight and not tested very well, as it was writen for one single purpose, and it has not been extended to be more general.

Definition at line 29 of file list.h.


Constructor & Destructor Documentation

template<class T>
csList< T >::csList   [inline]
 

Default constructor.

Definition at line 59 of file list.h.

template<class T>
csList< T >::csList const csList< T > &    other
 

Copyconstructor.

Definition at line 188 of file list.h.

References PushBack.

template<class T>
csList< T >::~csList   [inline]
 

Destructor.

Definition at line 67 of file list.h.

References DeleteAll.


Member Function Documentation

template<class T>
void csList< T >::Delete Iterator   it
 

Remove specific item by iterator.

Definition at line 257 of file list.h.

References Delete.

template<class T>
void csList< T >::Delete csListElement *    el [protected]
 

Remove specific item by explicit ref.

Definition at line 273 of file list.h.

Referenced by Delete, PopBack, and PopFront.

template<class T>
void csList< T >::DeleteAll  
 

Empty an list.

Definition at line 215 of file list.h.

Referenced by operator=, and ~csList.

template<class T>
const T& csList< T >::Front   const [inline]
 

Return first element of the list.

Definition at line 156 of file list.h.

template<class T>
const T& csList< T >::Last   const [inline]
 

Return last element of the list.

Definition at line 159 of file list.h.

template<class T>
csList< T > & csList< T >::operator= const csList< T > &    other
 

Assignment, swallow copy.

Definition at line 200 of file list.h.

References DeleteAll, head, and PushBack.

template<class T>
bool csList< T >::PopBack   [inline]
 

Deletes the last element of the list.

Definition at line 173 of file list.h.

References Delete.

template<class T>
bool csList< T >::PopFront   [inline]
 

Deletes the first element of the list.

Definition at line 163 of file list.h.

References Delete.

template<class T>
csList< T >::Iterator csList< T >::PushBack const T &    item
 

Add an item last in list. Copy T into the listdata.

Definition at line 229 of file list.h.

Referenced by csList, and operator=.

template<class T>
csList< T >::Iterator csList< T >::PushFront const T &    item
 

Add an item first in list. Copy T into the listdata.

Definition at line 243 of file list.h.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14