Back to index

lightning-sunbird  0.9+nobinonly
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
JSObject2WrappedJSMap Class Reference

#include <xpcmaps.h>

Collaboration diagram for JSObject2WrappedJSMap:
Collaboration graph
[legend]

List of all members.

Classes

struct  Entry

Public Member Functions

nsXPCWrappedJSFind (JSObject *Obj)
nsXPCWrappedJSAdd (nsXPCWrappedJS *wrapper)
void Remove (nsXPCWrappedJS *wrapper)
uint32 Count ()
uint32 Enumerate (JSDHashEnumerator f, void *arg)
 ~JSObject2WrappedJSMap ()

Static Public Member Functions

static JSObject2WrappedJSMapnewMap (int size)

Private Member Functions

 JSObject2WrappedJSMap ()
 JSObject2WrappedJSMap (int size)

Private Attributes

JSDHashTablemTable

Detailed Description

Definition at line 112 of file xpcmaps.h.


Constructor & Destructor Documentation

Definition at line 169 of file xpcmaps.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 163 of file xpcmaps.cpp.

Here is the call graph for this function:


Member Function Documentation

Definition at line 133 of file xpcmaps.h.

    {
        NS_PRECONDITION(wrapper,"bad param");
        JSObject* obj = wrapper->GetJSObject();
        Entry* entry = (Entry*)
            JS_DHashTableOperate(mTable, obj, JS_DHASH_ADD);
        if(!entry)
            return nsnull;
        if(entry->key)
            return entry->value;
        entry->key = obj;
        entry->value = wrapper;
        return wrapper;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 154 of file xpcmaps.h.

{return mTable->entryCount;}

Here is the caller graph for this function:

uint32 JSObject2WrappedJSMap::Enumerate ( JSDHashEnumerator  f,
void arg 
) [inline]

Definition at line 155 of file xpcmaps.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 123 of file xpcmaps.h.

    {
        NS_PRECONDITION(Obj,"bad param");
        Entry* entry = (Entry*)
            JS_DHashTableOperate(mTable, Obj, JS_DHASH_LOOKUP);
        if(JS_DHASH_ENTRY_IS_FREE(entry))
            return nsnull;
        return entry->value;
    }

Here is the caller graph for this function:

Definition at line 154 of file xpcmaps.cpp.

{
    JSObject2WrappedJSMap* map = new JSObject2WrappedJSMap(size);
    if(map && map->mTable)
        return map;
    delete map;
    return nsnull;
}

Here is the call graph for this function:

Definition at line 148 of file xpcmaps.h.

    {
        NS_PRECONDITION(wrapper,"bad param");
        JS_DHashTableOperate(mTable, wrapper->GetJSObject(), JS_DHASH_REMOVE);
    }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 163 of file xpcmaps.h.


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