Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
morkList Class Reference

#include <morkDeque.h>

Collaboration diagram for morkList:
Collaboration graph
[legend]

List of all members.

Public Member Functions

morkNextGetListHead () const
morkNextGetListTail () const
mork_bool IsListEmpty () const
mork_bool HasListMembers () const
 morkList ()
void CutAndZapAllListMembers (morkEnv *ev, nsIMdbHeap *ioHeap)
void CutAllListMembers ()
morkNextPopHead ()
void PushHead (morkNext *ioLink)
void PushTail (morkNext *ioLink)

Public Attributes

morkNextmList_Head
morkNextmList_Tail

Detailed Description

Definition at line 81 of file morkDeque.h.


Constructor & Destructor Documentation

Definition at line 88 of file morkDeque.cpp.

                   : mList_Head( 0 ), mList_Tail( 0 )
{
}

Member Function Documentation

Definition at line 108 of file morkDeque.cpp.

{
  while ( this->PopHead() )
    /* empty */;

  mList_Head = 0;
  mList_Tail = 0;
}

Here is the call graph for this function:

Definition at line 92 of file morkDeque.cpp.

{
  if ( ioHeap )
  {
    morkNext* next = 0;
    while ( (next = this->PopHead()) != 0 )
      next->ZapOldNext(ev, ioHeap);
      
    mList_Head = 0;
    mList_Tail = 0;
  }
  else
    ev->NilPointerError();
}

Here is the call graph for this function:

Here is the caller graph for this function:

morkNext* morkList::GetListHead ( ) const [inline]

Definition at line 87 of file morkDeque.h.

{ return mList_Head; }

Here is the caller graph for this function:

morkNext* morkList::GetListTail ( ) const [inline]

Definition at line 88 of file morkDeque.h.

{ return mList_Tail; }
mork_bool morkList::HasListMembers ( ) const [inline]

Definition at line 91 of file morkDeque.h.

{ return ( mList_Head != 0 ); }

Here is the caller graph for this function:

mork_bool morkList::IsListEmpty ( ) const [inline]

Definition at line 90 of file morkDeque.h.

{ return ( mList_Head == 0 ); }

Definition at line 118 of file morkDeque.cpp.

{
  morkNext* outHead = mList_Head;
  if ( outHead ) // anything to cut from list?
  {
    morkNext* next = outHead->mNext_Link;
    mList_Head = next;
    if ( !next ) // cut the last member, so tail no longer exists?
      mList_Tail = 0;
      
    outHead->mNext_Link = 0; // nil outgoing node link; unnecessary, but tidy
  }
  return outHead;
}

Here is the caller graph for this function:

Definition at line 134 of file morkDeque.cpp.

{
  morkNext* head = mList_Head; // old head of list
  morkNext* tail = mList_Tail; // old tail of list
  
  MORK_ASSERT( (head && tail) || (!head && !tail));
  
  ioLink->mNext_Link = head; // make old head follow the new link
  if ( !head ) // list was previously empty?
    mList_Tail = ioLink; // head is also tail for first member added

  mList_Head = ioLink; // head of list is the new link
}

Definition at line 148 of file morkDeque.cpp.

{
  morkNext* head = mList_Head; // old head of list
  morkNext* tail = mList_Tail; // old tail of list
  
  MORK_ASSERT( (head && tail) || (!head && !tail));
  
  ioLink->mNext_Link = 0; 
  if ( tail ) 
  {
         tail->mNext_Link = ioLink;
         mList_Tail = ioLink;
  }
  else // list was previously empty?
         mList_Head = mList_Tail = ioLink; // tail is also head for first member added
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 83 of file morkDeque.h.

Definition at line 84 of file morkDeque.h.


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