Back to index

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

#include <xpcmaps.h>

Collaboration diagram for IID2WrappedJSClassMap:
Collaboration graph
[legend]

List of all members.

Classes

struct  Entry

Public Member Functions

nsXPCWrappedJSClassFind (REFNSIID iid)
nsXPCWrappedJSClassAdd (nsXPCWrappedJSClass *clazz)
void Remove (nsXPCWrappedJSClass *clazz)
uint32 Count ()
uint32 Enumerate (JSDHashEnumerator f, void *arg)
 ~IID2WrappedJSClassMap ()

Static Public Member Functions

static IID2WrappedJSClassMapnewMap (int size)

Private Member Functions

 IID2WrappedJSClassMap ()
 IID2WrappedJSClassMap (int size)

Private Attributes

JSDHashTablemTable

Detailed Description

Definition at line 224 of file xpcmaps.h.


Constructor & Destructor Documentation

Definition at line 232 of file xpcmaps.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 227 of file xpcmaps.cpp.

{
    mTable = JS_NewDHashTable(&Entry::sOps, nsnull, sizeof(Entry), size);
}

Here is the call graph for this function:


Member Function Documentation

Definition at line 246 of file xpcmaps.h.

    {
        NS_PRECONDITION(clazz,"bad param");
        const nsIID* iid = &clazz->GetIID();
        Entry* entry = (Entry*)
            JS_DHashTableOperate(mTable, iid, JS_DHASH_ADD);
        if(!entry)
            return nsnull;
        if(entry->key)
            return entry->value;
        entry->key = iid;
        entry->value = clazz;
        return clazz;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 267 of file xpcmaps.h.

{return mTable->entryCount;}

Here is the caller graph for this function:

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

Definition at line 268 of file xpcmaps.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 237 of file xpcmaps.h.

    {
        Entry* entry = (Entry*)
            JS_DHashTableOperate(mTable, &iid, JS_DHASH_LOOKUP);
        if(JS_DHASH_ENTRY_IS_FREE(entry))
            return nsnull;
        return entry->value;
    }

Definition at line 218 of file xpcmaps.cpp.

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

Here is the call graph for this function:

Definition at line 261 of file xpcmaps.h.

    {
        NS_PRECONDITION(clazz,"bad param");
        JS_DHashTableOperate(mTable, &clazz->GetIID(), 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 276 of file xpcmaps.h.


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