Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Member Functions | Protected Attributes
ipcList< T > Class Template Reference

#include <ipcList.h>

Inheritance diagram for ipcList< T >:
Inheritance graph
[legend]
Collaboration diagram for ipcList< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ipcList ()
 ~ipcList ()
void Prepend (T *obj)
void Append (T *obj)
void InsertAfter (T *a, T *b)
void RemoveFirst ()
void RemoveAfter (T *obj)
void DeleteFirst ()
void DeleteAfter (T *obj)
void DeleteAll ()
const TFirst () const
TFirst ()
const TLast () const
TLast ()
PRBool IsEmpty () const
void MoveTo (ipcList< T > &other)

Protected Member Functions

void AdvanceHead ()

Protected Attributes

TmHead
TmTail

Detailed Description

template<class T>
class ipcList< T >

Definition at line 59 of file ipcList.h.


Constructor & Destructor Documentation

template<class T>
ipcList< T >::ipcList ( ) [inline]

Definition at line 62 of file ipcList.h.

        : mHead(NULL)
        , mTail(NULL)
        { }
template<class T>
ipcList< T >::~ipcList ( ) [inline]

Definition at line 66 of file ipcList.h.

{ DeleteAll(); }

Member Function Documentation

template<class T>
void ipcList< T >::AdvanceHead ( ) [inline, protected]

Definition at line 178 of file ipcList.h.

    {
        mHead = mHead->mNext;
        if (!mHead)
            mTail = NULL;
    }

Here is the caller graph for this function:

template<class T>
void ipcList< T >::Append ( T obj) [inline]

Definition at line 82 of file ipcList.h.

    {
        obj->mNext = NULL;
        if (mTail) {
            mTail->mNext = obj;
            mTail = obj;
        }
        else
            mTail = mHead = obj;
    }

Here is the caller graph for this function:

template<class T>
void ipcList< T >::DeleteAfter ( T obj) [inline]

Definition at line 141 of file ipcList.h.

    {
        T *rej = obj->mNext;
        if (rej) {
            RemoveAfter(obj);
            delete rej;
        }
    }
template<class T>
void ipcList< T >::DeleteAll ( ) [inline]

Definition at line 153 of file ipcList.h.

    {
        while (mHead)
            DeleteFirst();
    }

Here is the caller graph for this function:

template<class T>
void ipcList< T >::DeleteFirst ( ) [inline]

Definition at line 129 of file ipcList.h.

    {
        T *first = mHead;
        if (first) {
            AdvanceHead();
            delete first;
        }
    }

Here is the caller graph for this function:

template<class T>
const T* ipcList< T >::First ( ) const [inline]

Definition at line 159 of file ipcList.h.

{ return mHead; }

Here is the caller graph for this function:

template<class T>
T* ipcList< T >::First ( ) [inline]

Definition at line 160 of file ipcList.h.

{ return mHead; }
template<class T>
void ipcList< T >::InsertAfter ( T a,
T b 
) [inline]

Definition at line 96 of file ipcList.h.

    {
        b->mNext = a->mNext;
        a->mNext = b;
        if (mTail == a)
            mTail = b;
    }
template<class T>
PRBool ipcList< T >::IsEmpty ( void  ) const [inline]

Definition at line 164 of file ipcList.h.

{ return mHead == NULL; }

Here is the caller graph for this function:

template<class T>
const T* ipcList< T >::Last ( ) const [inline]

Definition at line 161 of file ipcList.h.

{ return mTail; }
template<class T>
T* ipcList< T >::Last ( ) [inline]

Definition at line 162 of file ipcList.h.

{ return mTail; }
template<class T>
void ipcList< T >::MoveTo ( ipcList< T > &  other) [inline]

Definition at line 169 of file ipcList.h.

    {
        other.mHead = mHead;
        other.mTail = mTail;
        mHead = NULL;
        mTail = NULL;
    }

Here is the caller graph for this function:

template<class T>
void ipcList< T >::Prepend ( T obj) [inline]

Definition at line 71 of file ipcList.h.

    {
        obj->mNext = mHead;
        mHead = obj;
        if (!mTail)
            mTail = mHead;
    }
template<class T>
void ipcList< T >::RemoveAfter ( T obj) [inline]

Definition at line 116 of file ipcList.h.

    {
        T *rej = obj->mNext;
        if (rej) {
            obj->mNext = rej->mNext;
            if (rej == mTail)
                mTail = obj;
        }
    }

Here is the caller graph for this function:

template<class T>
void ipcList< T >::RemoveFirst ( ) [inline]

Definition at line 107 of file ipcList.h.

    {
        if (mHead)
            AdvanceHead();
    }

Member Data Documentation

template<class T>
T* ipcList< T >::mHead [protected]

Definition at line 185 of file ipcList.h.

template<class T>
T* ipcList< T >::mTail [protected]

Definition at line 186 of file ipcList.h.


The documentation for this class was generated from the following file: