Back to index

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

A collection of memory elements. More...

#include <nsRuleNetwork.h>

Collaboration diagram for MemoryElementSet:
Collaboration graph

List of all members.


class  ConstIterator
class  List

Public Member Functions

 MemoryElementSet ()
 MemoryElementSet (const MemoryElementSet &aSet)
MemoryElementSetoperator= (const MemoryElementSet &aSet)
 ~MemoryElementSet ()
ConstIterator First () const
ConstIterator Last () const
nsresult Add (MemoryElement *aElement)

Protected Attributes



class ConstIterator

Detailed Description

A collection of memory elements.

Definition at line 260 of file nsRuleNetwork.h.

Constructor & Destructor Documentation

Definition at line 290 of file nsRuleNetwork.h.

Member Function Documentation

Definition at line 513 of file nsRuleNetwork.cpp.

    for (ConstIterator element = First(); element != Last(); ++element) {
        if (*element == *aElement) {
            // We've already got this element covered. Since Add()
            // assumes ownership, and we aren't going to need this,
            // just nuke it.
            delete aElement;
            return NS_OK;

    List* list = new List;
    if (! list)
        return NS_ERROR_OUT_OF_MEMORY;

    list->mElement = aElement;
    list->mRefCnt  = 1;
    list->mNext    = mElements;

    mElements = list;

    return NS_OK;

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 356 of file nsRuleNetwork.h.

{ return ConstIterator(mElements); }

Here is the caller graph for this function:

Definition at line 357 of file nsRuleNetwork.h.

{ return ConstIterator(nsnull); }

Here is the caller graph for this function:

MemoryElementSet& MemoryElementSet::operator= ( const MemoryElementSet aSet) [inline]

Definition at line 297 of file nsRuleNetwork.h.

Friends And Related Function Documentation

friend class ConstIterator [friend]

Definition at line 262 of file nsRuleNetwork.h.

Member Data Documentation

Definition at line 287 of file nsRuleNetwork.h.

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