Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

nsClassHashtable< KeyClass, T > Class Template Reference

#include <nsClassHashtable.h>

Inheritance diagram for nsClassHashtable< KeyClass, T >:

nsBaseHashtable< KeyClass, nsAutoPtr< T >, T * > nsTHashtable< EntryType >

List of all members.


Detailed Description

template<class KeyClass, class T>
class nsClassHashtable< KeyClass, T >

templated hashtable class maps keys to C++ object pointers. See nsBaseHashtable for complete declaration.
Parameters:
KeyClass a wrapper-class for the hashtable key, see nsHashKeys.h for a complete specification.
Class the class-type being wrapped
See also:
nsInterfaceHashtable, nsClassHashtable

Definition at line 54 of file nsClassHashtable.h.


Public Types

typedef nsBaseHashtableET
< KeyClass, nsAutoPtr< T > > 
EntryType
typedef KeyClass::KeyType KeyType
typedef PLDHashOperator(* PR_CALLBACK )(KeyType aKey, nsAutoPtr< T > &aData, void *userArg)
typedef PLDHashOperator(* PR_CALLBACK )(KeyType aKey, T *aData, void *userArg)
typedef T * 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 Init (PRUint32 initSize=PL_DHASH_MIN_SIZE)
PRBool IsInitialized () const
PRBool Put (KeyType aKey, T *aData)
void Remove (KeyType aKey)

Protected Types

typedef EntryType::KeyTypePointer KeyTypePointer

Protected Member Functions

PRUint32 EnumerateEntries (Enumerator enumFunc, void *userArg)
EntryTypeGetEntry (KeyType aKey) const
EntryTypePutEntry (KeyType aKey)
void RawRemoveEntry (EntryType *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