Back to index

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

#include <xpcmaps.h>

Collaboration diagram for Native2WrappedNativeMap:
Collaboration graph
[legend]

List of all members.

Classes

struct  Entry

Public Member Functions

XPCWrappedNativeFind (nsISupports *Obj)
XPCWrappedNativeAdd (XPCWrappedNative *wrapper)
void Remove (XPCWrappedNative *wrapper)
uint32 Count ()
uint32 Enumerate (JSDHashEnumerator f, void *arg)
 ~Native2WrappedNativeMap ()

Static Public Member Functions

static Native2WrappedNativeMapnewMap (int size)

Private Member Functions

 Native2WrappedNativeMap ()
 Native2WrappedNativeMap (int size)

Private Attributes

JSDHashTablemTable

Detailed Description

Definition at line 168 of file xpcmaps.h.


Constructor & Destructor Documentation

Definition at line 195 of file xpcmaps.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 189 of file xpcmaps.cpp.

Here is the call graph for this function:


Member Function Documentation

Definition at line 189 of file xpcmaps.h.

    {
        NS_PRECONDITION(wrapper,"bad param");
        nsISupports* obj = wrapper->GetIdentityObject();
        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 210 of file xpcmaps.h.

{return mTable->entryCount;}

Here is the caller graph for this function:

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

Definition at line 211 of file xpcmaps.h.

Here is the call graph for this function:

Here is the caller graph for this function:

XPCWrappedNative* Native2WrappedNativeMap::Find ( nsISupports *  Obj) [inline]

Definition at line 179 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 180 of file xpcmaps.cpp.

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

Here is the call graph for this function:

Definition at line 204 of file xpcmaps.h.

    {
        NS_PRECONDITION(wrapper,"bad param");
        JS_DHashTableOperate(mTable, wrapper->GetIdentityObject(), 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 219 of file xpcmaps.h.


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