Back to index

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

#include <xpcmaps.h>

Collaboration diagram for JSContext2XPCContextMap:
Collaboration graph
[legend]

List of all members.

Classes

struct  Entry

Public Member Functions

XPCContextFind (JSContext *cx)
XPCContextAdd (XPCContext *xpcc)
void Remove (XPCContext *xpcc)
uint32 Count ()
uint32 Enumerate (JSDHashEnumerator f, void *arg)
 ~JSContext2XPCContextMap ()

Static Public Member Functions

static JSContext2XPCContextMapnewMap (int size)

Private Member Functions

 JSContext2XPCContextMap ()
 JSContext2XPCContextMap (int size)

Private Attributes

JSDHashTablemTable

Detailed Description

Definition at line 56 of file xpcmaps.h.


Constructor & Destructor Documentation

Definition at line 143 of file xpcmaps.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 137 of file xpcmaps.cpp.

Here is the call graph for this function:


Member Function Documentation

Definition at line 77 of file xpcmaps.h.

    {
        NS_PRECONDITION(xpcc,"bad param");
        JSContext* cx = xpcc->GetJSContext();
        Entry* entry = (Entry*)
            JS_DHashTableOperate(mTable, cx, JS_DHASH_ADD);
        if(!entry)
            return nsnull;
        if(entry->key)
            return entry->value;
        entry->key = cx;
        entry->value = xpcc;
        return xpcc;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 98 of file xpcmaps.h.

{return mTable->entryCount;}

Here is the caller graph for this function:

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

Definition at line 99 of file xpcmaps.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 67 of file xpcmaps.h.

    {
        NS_PRECONDITION(cx,"bad param");
        Entry* entry = (Entry*)
            JS_DHashTableOperate(mTable, cx, 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 127 of file xpcmaps.cpp.

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

Here is the call graph for this function:

Definition at line 92 of file xpcmaps.h.

    {
        NS_PRECONDITION(xpcc,"bad param");
        JS_DHashTableOperate(mTable, xpcc->GetJSContext(), JS_DHASH_REMOVE);
    }

Here is the call graph for this function:


Member Data Documentation

Definition at line 107 of file xpcmaps.h.


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