Logo Search packages:      
Sourcecode: xulrunner-1.9 version File versions

nsInterfaceHashtable< KeyClass, Interface > Class Template Reference

#include <nsInterfaceHashtable.h>

Inheritance diagram for nsInterfaceHashtable< KeyClass, Interface >:

nsBaseHashtable< KeyClass, DataType, UserDataType > nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >

List of all members.

Detailed Description

template<class KeyClass, class Interface>
class nsInterfaceHashtable< KeyClass, Interface >

templated hashtable class maps keys to interface pointers. See nsBaseHashtable for complete declaration.
KeyClass a wrapper-class for the hashtable key, see nsHashKeys.h for a complete specification.
Interface the interface-type being wrapped
See also:
nsDataHashtable, nsClassHashtable

Definition at line 54 of file nsInterfaceHashtable.h.

Public Types

typedef nsBaseHashtableET
< KeyClass, DataType > 
typedef KeyClass::KeyType KeyType
typedef PLDHashOperator(* PR_CALLBACK )(KeyType aKey, DataType &aData, void *userArg)
typedef PLDHashOperator(* PR_CALLBACK )(KeyType aKey, UserDataType aData, void *userArg)
typedef Interface * UserDataType

Public Member Functions

void Clear ()
PRUint32 Count () const
PRUint32 Enumerate (EnumFunction enumFunc, void *userArg)
PRUint32 EnumerateRead (EnumReadFunction enumFunc, void *userArg) const
PRBool Get (KeyType aKey, UserDataType *pData) const
PRBool Get (KeyType aKey, UserDataType *pData) const
Interface * GetWeak (KeyType aKey, PRBool *aFound=nsnull) const
PRBool Init (PRUint32 initSize=PL_DHASH_MIN_SIZE)
PRBool IsInitialized () const
PRBool Put (KeyType aKey, UserDataType aData)
void Remove (KeyType aKey)

Protected Types

typedef nsBaseHashtableET
< KeyClass, DataType >

Protected Member Functions

PRUint32 EnumerateEntries (Enumerator enumFunc, void *userArg)
nsBaseHashtableET< KeyClass,
DataType > * 
GetEntry (KeyType aKey) const
nsBaseHashtableET< KeyClass,
DataType > * 
PutEntry (KeyType aKey)
void RawRemoveEntry (nsBaseHashtableET< KeyClass, DataType > *aEntry)
void RemoveEntry (KeyType aKey)

Static Protected Member Functions

static void PR_CALLBACK s_ClearEntry (PLDHashTable *table, PLDHashEntryHdr *entry)
static void PR_CALLBACK s_CopyEntry (PLDHashTable *table, const PLDHashEntryHdr *from, PLDHashEntryHdr *to)
static PLDHashOperator s_EnumReadStub (PLDHashTable *table, PLDHashEntryHdr *hdr, PRUint32 number, void *arg)
static PLDHashOperator s_EnumStub (PLDHashTable *table, PLDHashEntryHdr *hdr, PRUint32 number, void *arg)
static const void *PR_CALLBACK s_GetKey (PLDHashTable *table, PLDHashEntryHdr *entry)
static PLDHashNumber PR_CALLBACK s_HashKey (PLDHashTable *table, const void *key)
static PRBool PR_CALLBACK s_InitEntry (PLDHashTable *table, PLDHashEntryHdr *entry, const void *key)
static PRBool PR_CALLBACK s_MatchEntry (PLDHashTable *table, const PLDHashEntryHdr *entry, const void *key)

Protected Attributes

PLDHashTable mTable

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

Generated by  Doxygen 1.6.0   Back to index