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

nsDataHashtable< KeyClass, DataType > Class Template Reference

#include <nsDataHashtable.h>

Inheritance diagram for nsDataHashtable< KeyClass, DataType >:

nsBaseHashtable< KeyClass, DataType, DataType > nsTHashtable< EntryType >

List of all members.

Detailed Description

template<class KeyClass, class DataType>
class nsDataHashtable< KeyClass, DataType >

templated hashtable class maps keys to simple datatypes. See nsBaseHashtable for complete declaration
KeyClass a wrapper-class for the hashtable key, see nsHashKeys.h for a complete specification.
DataType the simple datatype being wrapped
See also:
nsInterfaceHashtable, nsClassHashtable

Definition at line 53 of file nsDataHashtable.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, DataTypeaData, void *userArg)

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, DataType *pData) const
PRBool Init (PRUint32 initSize=PL_DHASH_MIN_SIZE)
PRBool IsInitialized () const
PRBool Put (KeyType aKey, DataTypeaData)
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