#include <CList.h>
Public Methods | |
CList () | |
CList (const CList &cSource) | |
~CList () | |
CListContainer< ObjectType > * | getFirst () const |
CListContainer< ObjectType > * | getLast () const |
int | getNumObjects () const |
int | insertAsFirst (ObjectType *pObj) |
int | insertAsLast (ObjectType *pObj) |
int | insertAfter (CListContainer< ObjectType > *pThere, ObjectType *pObject) |
CListContainer< ObjectType > * | find (ObjectType *pObj) const |
int | remove (CListContainer< ObjectType > *pRemove) |
int | remove (ObjectType *pObj) |
CList< ObjectType > * | getFullDuplicate () const |
void | clear (int nFlag=0) |
ObjectType & | operator[] (int nIndex) const |
CListContainer< ObjectType > * | operator() (int nIndex) const |
const CList & | operator+ (const CList &cSource) |
CList & | operator= (const CList &cSource) |
Protected Methods | |
void | init () |
void | setFirst (CListContainer< ObjectType > *pTmp) |
void | setLast (CListContainer< ObjectType > *pTmp) |
void | setNumObjects (int nTmp) |
void | increaseNumObjects () |
void | decreaseNumObjects () |
Protected Attributes | |
int | m_nNumObjects |
CListContainer< ObjectType > * | m_pFirst |
CListContainer< ObjectType > * | m_pLast |
This class provides functionality of a double linked list. You can add and remove objects to the list and have sequential or random access to the objects in the list.
|
Default constructor. |
|
Copy constructor. |
|
Destructor. |
|
Removes all containers from the list if 'nFlag' = 0 (default). If 'nFlag' = 1 then also the objects are deleted from the heap. |
|
|
|
Searches for the element 'pObj' in the list and returns the pointer to the container which holds the element. |
|
Returns pointer to the first container of the list. |
|
Returns a copy of the list. But this method NOT only copies the the pointer of the objects as the '=' operator does. No, this method makes a real memcpy of the list. |
|
Returns pointer to the last container of the list. |
|
Returns the number of container in the list. |
|
|
|
|
|
Inserts the object 'pObject' after the container 'pThere' in the list. |
|
Inserts new object at the beginning of the list. |
|
Appends the object 'pObj' to the end of the list. |
|
|
|
concatenates one list with another by appending one to another. |
|
Copies one list to another.
|
|
|
|
Same as before but with different type of parameter. |
|
Removes the container 'pRemove' from the list. |
|
|
|
|
|
|
|
|
|
|
|
|