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

nsRefPtrHashtableMT< KeyClass, RefPtr > Class Template Reference

#include <nsRefPtrHashtable.h>

Inheritance diagram for nsRefPtrHashtableMT< KeyClass, RefPtr >:

nsBaseHashtableMT< KeyClass, nsRefPtr< RefPtr >, RefPtr * > nsBaseHashtable< KeyClass, DataType, UserDataType > nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >

List of all members.


Detailed Description

template<class KeyClass, class RefPtr>
class nsRefPtrHashtableMT< KeyClass, RefPtr >

Thread-safe version of nsRefPtrHashtable
Parameters:
KeyClass a wrapper-class for the hashtable key, see nsHashKeys.h for a complete specification.
RefPtr the reference-type being wrapped

Definition at line 85 of file nsRefPtrHashtable.h.


Public Types

typedef nsBaseHashtable
< KeyClass, nsRefPtr< RefPtr >
, RefPtr * >::EntryType 
EntryType
typedef nsBaseHashtable
< KeyClass, nsRefPtr< RefPtr >
, RefPtr * >::EnumFunction 
EnumFunction
typedef nsBaseHashtable
< KeyClass, nsRefPtr< RefPtr >
, RefPtr * >::EnumReadFunction 
EnumReadFunction
typedef KeyClass::KeyType KeyType
typedef RefPtr * 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, RefPtr **pData) const
PRBool Get (KeyType aKey, UserDataType *pData) const
PRBool Init (PRUint32 initSize=PL_DHASH_MIN_SIZE)
PRBool IsInitialized () const
PRBool Put (KeyType aKey, RefPtr *aData)
void Remove (KeyType aKey)

Protected Types

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

Protected Member Functions

PRUint32 Enumerate (EnumFunction enumFunc, void *userArg)
PRUint32 EnumerateEntries (Enumerator enumFunc, void *userArg)
PRUint32 EnumerateRead (EnumReadFunction enumFunc, void *userArg) const
nsBaseHashtableET< KeyClass,
DataType > * 
GetEntry (KeyType aKey) const
PRBool Put (KeyType aKey, UserDataType aData)
nsBaseHashtableET< KeyClass,
DataType > * 
PutEntry (KeyType aKey)
void RawRemoveEntry (nsBaseHashtableET< KeyClass, DataType > *aEntry)
void Remove (KeyType aKey)
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

PRLock * mLock
PLDHashTable mTable

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

Generated by  Doxygen 1.6.0   Back to index