Back to index

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

#include <xpcmaps.h>

Collaboration diagram for IID2ThisTranslatorMap:
Collaboration graph
[legend]

List of all members.

Classes

struct  Entry

Public Member Functions

nsIXPCFunctionThisTranslatorFind (REFNSIID iid)
nsIXPCFunctionThisTranslatorAdd (REFNSIID iid, nsIXPCFunctionThisTranslator *obj)
void Remove (REFNSIID iid)
uint32 Count ()
uint32 Enumerate (JSDHashEnumerator f, void *arg)
 ~IID2ThisTranslatorMap ()

Static Public Member Functions

static IID2ThisTranslatorMapnewMap (int size)

Private Member Functions

 IID2ThisTranslatorMap ()
 IID2ThisTranslatorMap (int size)

Private Attributes

JSDHashTablemTable

Detailed Description

Definition at line 514 of file xpcmaps.h.


Constructor & Destructor Documentation

Definition at line 496 of file xpcmaps.cpp.

Here is the call graph for this function:

Definition at line 491 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 547 of file xpcmaps.h.

    {

        Entry* entry = (Entry*)
            JS_DHashTableOperate(mTable, &iid, JS_DHASH_ADD);
        if(!entry)
            return nsnull;
        NS_IF_ADDREF(obj);
        NS_IF_RELEASE(entry->value);
        entry->value = obj;
        entry->key = iid;
        return obj;
    }

Definition at line 567 of file xpcmaps.h.

{return mTable->entryCount;}

Here is the caller graph for this function:

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

Definition at line 568 of file xpcmaps.h.

Here is the call graph for this function:

Definition at line 538 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;
    }

Here is the caller graph for this function:

Definition at line 482 of file xpcmaps.cpp.

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

Definition at line 562 of file xpcmaps.h.

    {
        JS_DHashTableOperate(mTable, &iid, JS_DHASH_REMOVE);
    }

Member Data Documentation

Definition at line 576 of file xpcmaps.h.


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