Back to index

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

#include <morkDeque.h>

Collaboration diagram for morkDeque:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 morkDeque ()
morkLinkRemoveFirst ()
morkLinkRemoveLast ()
morkLinkAt (mork_pos index) const
mork_pos IndexOf (const morkLink *inMember) const
mork_num Length () const
int LengthCompare (mork_num inCount) const
mork_bool IsEmpty () const
morkLinkAfter (const morkLink *old) const
morkLinkBefore (const morkLink *old) const
morkLinkFirst () const
morkLinkLast () const
void AddFirst (morkLink *in)
void AddLast (morkLink *in)

Public Attributes

morkLink mDeque_Head

Detailed Description

Definition at line 163 of file morkDeque.h.


Constructor & Destructor Documentation

Definition at line 205 of file morkDeque.cpp.

Here is the call graph for this function:


Member Function Documentation

void morkDeque::AddFirst ( morkLink in) [inline]

Definition at line 216 of file morkDeque.h.

  {
    ( (mDeque_Head.mLink_Next->mLink_Prev = 
      (in))->mLink_Next = mDeque_Head.mLink_Next, 
        ((in)->mLink_Prev = &mDeque_Head)->mLink_Next = (in) );
  }
void morkDeque::AddLast ( morkLink in) [inline]

Definition at line 231 of file morkDeque.h.

  {
    ( (mDeque_Head.mLink_Prev->mLink_Next = 
      (in))->mLink_Prev = mDeque_Head.mLink_Prev, 
        ((in)->mLink_Next = &mDeque_Head)->mLink_Prev = (in) );
  }

Here is the caller graph for this function:

morkLink* morkDeque::After ( const morkLink old) const [inline]

Definition at line 191 of file morkDeque.h.

  { return (((old)->mLink_Next != &mDeque_Head)?
            (old)->mLink_Next : (morkLink*) 0); }

Here is the caller graph for this function:

morkLink * morkDeque::At ( mork_pos  index) const

Definition at line 244 of file morkDeque.cpp.

{ 
  register mork_num count = 0;
  register morkLink* alink;
  for ( alink = this->First(); alink; alink = this->After(alink) )
  {
    if ( ++count == (mork_num) index )
      break;
  }
  return alink;
}
morkLink* morkDeque::Before ( const morkLink old) const [inline]

Definition at line 195 of file morkDeque.h.

  { return (((old)->mLink_Prev != &mDeque_Head)?
            (old)->mLink_Prev : (morkLink*) 0); }
morkLink* morkDeque::First ( ) const [inline]

Definition at line 199 of file morkDeque.h.

Here is the caller graph for this function:

mork_pos morkDeque::IndexOf ( const morkLink inMember) const

Definition at line 260 of file morkDeque.cpp.

{ 
  register mork_num count = 0;
  register const morkLink* alink;
  for ( alink = this->First(); alink; alink = this->After(alink) )
  {
    ++count;
    if ( member == alink )
      return (mork_pos) count;
  }
  return 0;
}
mork_bool morkDeque::IsEmpty ( ) const [inline]

Definition at line 188 of file morkDeque.h.

morkLink* morkDeque::Last ( ) const [inline]

Definition at line 203 of file morkDeque.h.

Definition at line 278 of file morkDeque.cpp.

{ 
  register mork_num count = 0;
  register morkLink* alink;
  for ( alink = this->First(); alink; alink = this->After(alink) )
    ++count;
  return count;
}

Here is the call graph for this function:

Definition at line 290 of file morkDeque.cpp.

{ 
  register mork_num count = 0;
  register const morkLink* alink;
  for ( alink = this->First(); alink; alink = this->After(alink) )
  {
    if ( ++count > c )
      return 1;
  }
  return ( count == c )? 0 : -1;
}

Definition at line 214 of file morkDeque.cpp.

{
  morkLink* alink = mDeque_Head.mLink_Next;
  if ( alink != &mDeque_Head )
  {
    (mDeque_Head.mLink_Next = alink->mLink_Next)->mLink_Prev = 
      &mDeque_Head;
    return alink;
  }
  return (morkLink*) 0;
}

Here is the caller graph for this function:

Definition at line 229 of file morkDeque.cpp.

{
  morkLink* alink = mDeque_Head.mLink_Prev;
  if ( alink != &mDeque_Head )
  {
    (mDeque_Head.mLink_Prev = alink->mLink_Prev)->mLink_Next = 
      &mDeque_Head;
    return alink;
  }
  return (morkLink*) 0;
}

Member Data Documentation

Definition at line 165 of file morkDeque.h.


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