Back to index

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

#include <nsDeleteObserver.h>

Inheritance diagram for nsDeleteObserved:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 nsDeleteObserved (void *aObject)
virtual ~nsDeleteObserved ()
PRBool AddDeleteObserver (nsDeleteObserver *aDeleteObserver)
PRBool RemoveDeleteObserver (nsDeleteObserver *aDeleteObserver)

Private Attributes

nsVoidArraymDeleteObserverArray
voidmObject

Detailed Description

Definition at line 71 of file nsDeleteObserver.h.


Constructor & Destructor Documentation

Definition at line 45 of file nsDeleteObserver.cpp.

{
       mDeleteObserverArray = nsnull;
       mObject = (aObject ? aObject : this);
}

Definition at line 55 of file nsDeleteObserver.cpp.

{
       if (mDeleteObserverArray)
       {
              // notify observers of the delete
              for (PRInt32 i = mDeleteObserverArray->Count() - 1; i >= 0; --i)
              {
                     nsDeleteObserver* deleteObserver = static_cast<nsDeleteObserver*>(mDeleteObserverArray->ElementAt(i));
                     if (deleteObserver)
                            deleteObserver->NotifyDelete(mObject);
              }

              delete mDeleteObserverArray;
              mDeleteObserverArray = nsnull;
       }
}

Here is the call graph for this function:


Member Function Documentation

Definition at line 76 of file nsDeleteObserver.cpp.

{
       if (! mDeleteObserverArray)
              mDeleteObserverArray = new nsVoidArray();

       if (mDeleteObserverArray)
              return mDeleteObserverArray->AppendElement(aDeleteObserver);
       return PR_FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 90 of file nsDeleteObserver.cpp.

{
       if (mDeleteObserverArray)
              return mDeleteObserverArray->RemoveElement(aDeleteObserver);
       return PR_FALSE;
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 81 of file nsDeleteObserver.h.

Definition at line 82 of file nsDeleteObserver.h.


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