Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Attributes | Friends
nsFloatCacheFreeList Class Reference

#include <nsLineBox.h>

Inheritance diagram for nsFloatCacheFreeList:
Inheritance graph
[legend]
Collaboration diagram for nsFloatCacheFreeList:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsFloatCacheFreeList ()
 ~nsFloatCacheFreeList ()
void Append (nsFloatCacheList &aList)
void Append (nsFloatCache *aFloatCache)
nsFloatCacheAlloc ()
PRBool IsEmpty () const
PRBool NotEmpty () const
nsFloatCacheHead () const
nsFloatCacheTail () const
nsFloatCacheFind (nsIFrame *aOutOfFlowFrame)
void Remove (nsFloatCache *aElement)
void Append (nsFloatCacheFreeList &aList)

Protected Attributes

nsFloatCachemTail
nsFloatCachemHead

Friends

class nsFloatCacheList
class nsFloatCacheFreeList

Detailed Description

Definition at line 133 of file nsLineBox.h.


Constructor & Destructor Documentation

Definition at line 135 of file nsLineBox.h.

: mTail(nsnull) { }

Definition at line 136 of file nsLineBox.h.

{ }

Member Function Documentation

Definition at line 933 of file nsLineBox.cpp.

{
  nsFloatCache* fc = mHead;
  if (mHead) {
    if (mHead == mTail) {
      mHead = mTail = nsnull;
    }
    else {
      mHead = fc->mNext;
    }
    fc->mNext = nsnull;
  }
  else {
    fc = new nsFloatCache();
  }
  return fc;
}

Here is the caller graph for this function:

Definition at line 873 of file nsLineBox.cpp.

{
  NS_PRECONDITION(aList.NotEmpty(), "Appending empty list will fail");
  
  nsFloatCache* tail = Tail();
  if (tail) {
    tail->mNext = aList.mHead;
  }
  else {
    mHead = aList.mHead;
  }
  aList.mHead = nsnull;
  aList.mTail = nsnull;
}

Here is the call graph for this function:

Definition at line 918 of file nsLineBox.cpp.

{
  NS_PRECONDITION(aList.NotEmpty(), "Appending empty list will fail");
  
  if (mTail) {
    mTail->mNext = aList.mHead;
  }
  else {
    mHead = aList.mHead;
  }
  mTail = aList.Tail();
  aList.mHead = nsnull;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 952 of file nsLineBox.cpp.

{
  aFloat->mNext = nsnull;
  if (mTail) {
    mTail->mNext = aFloat;
    mTail = aFloat;
  }
  else {
    mHead = mTail = aFloat;
  }
}
nsFloatCache * nsFloatCacheList::Find ( nsIFrame aOutOfFlowFrame) [inherited]

Definition at line 889 of file nsLineBox.cpp.

{
  nsFloatCache* fc = mHead;
  while (fc) {
    if (fc->mPlaceholder->GetOutOfFlowFrame() == aOutOfFlowFrame) {
      break;
    }
    fc = fc->Next();
  }
  return fc;
}

Here is the call graph for this function:

nsFloatCache* nsFloatCacheList::Head ( ) const [inline, inherited]

Definition at line 111 of file nsLineBox.h.

                             {
    return mHead;
  }

Here is the caller graph for this function:

PRBool nsFloatCacheList::IsEmpty ( void  ) const [inline, inherited]

Definition at line 103 of file nsLineBox.h.

                         {
    return nsnull == mHead;
  }
PRBool nsFloatCacheList::NotEmpty ( ) const [inline, inherited]

Definition at line 107 of file nsLineBox.h.

                          {
    return nsnull != mHead;
  }

Here is the caller graph for this function:

void nsFloatCacheList::Remove ( nsFloatCache aElement) [inherited]

Definition at line 902 of file nsLineBox.cpp.

{
  nsFloatCache** fcp = &mHead;
  nsFloatCache* fc;
  while (nsnull != (fc = *fcp)) {
    if (fc == aElement) {
      *fcp = fc->mNext;
      break;
    }
    fcp = &fc->mNext;
  }
}
nsFloatCache * nsFloatCacheList::Tail ( ) const [inherited]

Definition at line 860 of file nsLineBox.cpp.

{
  nsFloatCache* fc = mHead;
  while (fc) {
    if (!fc->mNext) {
      break;
    }
    fc = fc->mNext;
  }
  return fc;
}

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class nsFloatCacheFreeList [friend, inherited]

Definition at line 128 of file nsLineBox.h.

friend class nsFloatCacheList [friend]

Definition at line 150 of file nsLineBox.h.


Member Data Documentation

nsFloatCache* nsFloatCacheList::mHead [protected, inherited]

Definition at line 126 of file nsLineBox.h.

Definition at line 148 of file nsLineBox.h.


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