Back to index

lightning-sunbird  0.9+nobinonly
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes
nsBaseHashtable< KeyClass, DataType, UserDataType > Class Template Reference

templated hashtable for simple data types This class manages simple data types that do not need construction or destruction. More...

#include <nsBaseHashtable.h>

Inherits nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >.

Inherited by nsBaseHashtableMT< KeyClass, DataType, UserDataType > [protected], nsBaseHashtableMT< KeyClass, nsAutoPtr< T >, T * > [protected], nsBaseHashtableMT< KeyClass, nsCOMPtr< Interface >, Interface * > [protected], nsBaseHashtableMT< KeyClass, nsRefPtr< RefPtr >, RefPtr * > [protected], nsDataHashtable< IDKey, nsCString >, nsDataHashtable< IDKey, nsTArray< nsCString > * >, nsDataHashtable< JavaClassMemberKey, void * >, nsDataHashtable< nsCStringHashKey, nsCString >, nsDataHashtable< nsCStringHashKey, PRInt32 >, nsDataHashtable< nsCStringHashKey, PRUint32 >, nsDataHashtable< nsISupportsHashKey, nsCString >, nsDataHashtable< nsISupportsHashKey, PRInt32 >, nsDataHashtable< nsISupportsHashKey, PRUint32 >, nsDataHashtable< nsISupportsHashKey, RequestEntry >, nsDataHashtable< nsISupportsHashKey, RestyleData >, nsDataHashtable< nsPtrHashKey< nsIDocument >, DocumentEntry >, nsDataHashtable< nsPtrHashKey< nsIDOMWindow >, PRUint32 >, nsDataHashtable< nsStringHashKey, const nsString * >, nsDataHashtable< nsStringHashKey, nsString >, nsDataHashtable< nsStringHashKey, nsTreeImageCacheEntry >, nsDataHashtable< nsStringHashKey, PRBool >, nsDataHashtable< nsUint32HashKey, float >, nsDataHashtable< nsURIHashKey, PRUint32 >, nsDataHashtable< nsURIHashKey, SheetLoadData * >, and nsDataHashtable< nsURIHashKey, void * >.

Collaboration diagram for nsBaseHashtable< KeyClass, DataType, UserDataType >:
Collaboration graph
[legend]

List of all members.

Classes

struct  s_EnumArgs
struct  s_EnumReadArgs
 used internally during EnumerateRead. More...

Public Types

typedef KeyClass::KeyType KeyType
 KeyType is typedef'ed for ease of use.
typedef nsBaseHashtableET
< KeyClass, DataType > 
EntryType
typedef PLDHashOperator(* PR_CALLBACK )(KeyType aKey, UserDataType aData, void *userArg)
 function type provided by the application for enumeration.
typedef PLDHashOperator(* PR_CALLBACK )(KeyType aKey, DataType &aData, void *userArg)
 function type provided by the application for enumeration.

Public Member Functions

PRBool Init (PRUint32 initSize=PL_DHASH_MIN_SIZE)
 Initialize the object.
PRBool IsInitialized () const
 Check whether the table has been initialized.
PRUint32 Count () const
 Return the number of entries in the table.
PRBool Get (KeyType aKey, UserDataType *pData) const
 retrieve the value for a key.
PRBool Put (KeyType aKey, UserDataType aData)
 put a new value for the associated key
void Remove (KeyType aKey)
 remove the data for the associated key
PRUint32 EnumerateRead (EnumReadFunction enumFunc, void *userArg) const
 enumerate entries in the hashtable, without allowing changes
PRUint32 Enumerate (EnumFunction enumFunc, void *userArg)
 enumerate entries in the hashtable, allowing changes.
void Clear ()
 reset the hashtable, removing all entries

Protected Types

typedef nsBaseHashtableET
< KeyClass, DataType >
::KeyTypePointer 
KeyTypePointer
 KeyTypePointer is typedef'ed for ease of use.

Protected Member Functions

nsBaseHashtableET< KeyClass,
DataType > * 
GetEntry (KeyType aKey) const
 Get the entry associated with a key.
nsBaseHashtableET< KeyClass,
DataType > * 
PutEntry (KeyType aKey)
 Get the entry associated with a key, or create a new entry,.
void RemoveEntry (KeyType aKey)
 Remove the entry associated with a key.
void RawRemoveEntry (nsBaseHashtableET< KeyClass, DataType > *aEntry)
 Remove the entry associated with a key, but don't resize the hashtable.
PRUint32 EnumerateEntries (Enumerator enumFunc, void *userArg)
 Enumerate all the entries of the function.

Static Protected Member Functions

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_MatchEntry (PLDHashTable *table, const PLDHashEntryHdr *entry, const void *key)
static void PR_CALLBACK s_CopyEntry (PLDHashTable *table, const PLDHashEntryHdr *from, PLDHashEntryHdr *to)
static void PR_CALLBACK s_ClearEntry (PLDHashTable *table, PLDHashEntryHdr *entry)
static PRBool PR_CALLBACK s_InitEntry (PLDHashTable *table, PLDHashEntryHdr *entry, const void *key)

Protected Attributes

PLDHashTable mTable

Detailed Description

template<class KeyClass, class DataType, class UserDataType>
class nsBaseHashtable< KeyClass, DataType, UserDataType >

templated hashtable for simple data types This class manages simple data types that do not need construction or destruction.

Parameters:
KeyClassa wrapper-class for the hashtable key, see nsHashKeys.h for a complete specification.
DataTypethe datatype stored in the hashtable, for example, PRUint32 or nsCOMPtr. If UserDataType is not the same, DataType must implicitly cast to UserDataType
UserDataTypethe user sees, for example PRUint32 or nsISupports*

Definition at line 82 of file nsBaseHashtable.h.


Class Documentation

struct nsBaseHashtable::s_EnumArgs

template<class KeyClass, class DataType, class UserDataType>
struct nsBaseHashtable< KeyClass, DataType, UserDataType >::s_EnumArgs

Definition at line 246 of file nsBaseHashtable.h.

Class Members
EnumFunction func
void * userArg
struct nsBaseHashtable::s_EnumReadArgs

template<class KeyClass, class DataType, class UserDataType>
struct nsBaseHashtable< KeyClass, DataType, UserDataType >::s_EnumReadArgs

used internally during EnumerateRead.

Allocated on the stack.

Parameters:
functhe enumerator passed to EnumerateRead
userArgthe userArg passed to EnumerateRead

Definition at line 235 of file nsBaseHashtable.h.

Class Members
EnumReadFunction func
void * userArg

Member Typedef Documentation

template<class KeyClass, class DataType, class UserDataType>
typedef nsBaseHashtableET<KeyClass,DataType> nsBaseHashtable< KeyClass, DataType, UserDataType >::EntryType
template<class KeyClass, class DataType, class UserDataType>
typedef KeyClass::KeyType nsBaseHashtable< KeyClass, DataType, UserDataType >::KeyType

KeyType is typedef'ed for ease of use.

Reimplemented from nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >.

Reimplemented in nsBaseHashtableMT< KeyClass, DataType, UserDataType >, nsBaseHashtableMT< KeyClass, nsCOMPtr< Interface >, Interface * >, nsBaseHashtableMT< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtableMT< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, nsBaseHashtableMT< KeyClass, DataType, DataType >, nsRefPtrHashtableMT< KeyClass, RefPtr >, nsInterfaceHashtableMT< KeyClass, Interface >, nsClassHashtableMT< KeyClass, T >, nsRefPtrHashtable< KeyClass, RefPtr >, nsRefPtrHashtable< nsCStringHashKey, nsDownload >, nsRefPtrHashtable< nsISupportsHashKey, nsXFormsControlListItem >, nsRefPtrHashtable< nsISupportsHashKey, nsXBLBinding >, nsRefPtrHashtable< nsIDHashKey, ipcTargetData >, nsClassHashtable< KeyClass, T >, nsInterfaceHashtable< KeyClass, Interface >, nsClassHashtable< nsVoidPtrHashKey, DConnectInstance >, nsClassHashtable< nsISupportsHashKey, nsXFormsMDGNode >, nsClassHashtable< nsCStringHashKey, nsPresState >, nsClassHashtable< nsISupportsHashKey, nsString >, nsClassHashtable< nsDepCharHashKey, INIValue >, nsClassHashtable< nsISupportsHashKey, nsXFormsNodeState >, nsClassHashtable< nsCStringHashKey, SignonHashEntry >, nsClassHashtable< nsStringHashKey, nsCounterList >, nsClassHashtable< nsDepCharHashKey, CategoryNode >, nsInterfaceHashtable< nsURIHashKey, nsIObserver >, nsInterfaceHashtable< nsStringHashKey, nsIVariant >, nsInterfaceHashtable< nsStringHashKey, nsISchemaAttributeComponent >, nsInterfaceHashtable< nsStringHashKey, nsISchema >, nsInterfaceHashtable< nsStringHashKey, nsISchemaType >, nsInterfaceHashtable< nsURIHashKey, nsIStreamListener >, nsInterfaceHashtable< nsURIHashKey, nsIURI >, nsInterfaceHashtable< nsStringHashKey, nsISchemaAttributeGroup >, nsInterfaceHashtable< nsURIHashKey, nsIXBLDocumentInfo >, nsInterfaceHashtable< nsURIHashKey, nsIXULPrototypeDocument >, nsInterfaceHashtable< nsStringHashKey, nsISchemaElement >, nsInterfaceHashtable< nsStringHashKey, nsISupports >, nsInterfaceHashtable< nsStringHashKey, nsISchemaModelGroup >, nsInterfaceHashtable< nsStringHashKey, nsIDOMStorage >, nsInterfaceHashtable< nsStringHashKey, nsIMetricsCollector >, nsInterfaceHashtable< nsStringHashKey, nsIFile >, nsInterfaceHashtable< nsStringHashKey, nsIDOMHTMLInputElement >, nsInterfaceHashtable< nsStringHashKey, nsIAtom >, nsInterfaceHashtable< nsVoidPtrHashKey, nsIWeakReference >, nsInterfaceHashtable< nsCStringHashKey, calITimezone >, nsInterfaceHashtable< nsCStringHashKey, nsIDOMStorage >, nsInterfaceHashtable< nsVoidPtrHashKey, nsIEventQueue >, nsInterfaceHashtable< nsStringHashKey, nsIRDFResource >, nsInterfaceHashtable< nsAttrHashKey, nsIDOMNode >, nsInterfaceHashtable< nsISupportsHashKey, nsIWeakReference >, nsInterfaceHashtable< nsURIHashKey, nsICSSStyleSheet >, nsInterfaceHashtable< nsVoidHashKey, nsIAccessNode >, nsInterfaceHashtable< nsStringHashKey, nsISchemaAttribute >, nsInterfaceHashtable< nsStringHashKey, nsIXFormsContextInfo >, nsInterfaceHashtable< nsISupportsHashKey, nsXMLEventsListener >, nsInterfaceHashtable< nsUint32HashKey, nsIXTFElementFactory >, nsInterfaceHashtable< nsCStringHashKey, nsIURI >, and nsInterfaceHashtable< PrincipalKey, nsIPrincipal >.

Definition at line 86 of file nsBaseHashtable.h.

typedef nsBaseHashtableET< KeyClass, DataType > ::KeyTypePointer nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >::KeyTypePointer [inherited]

KeyTypePointer is typedef'ed for ease of use.

Definition at line 144 of file nsTHashtable.h.

template<class KeyClass, class DataType, class UserDataType>
typedef PLDHashOperator(* nsBaseHashtable< KeyClass, DataType, UserDataType >::PR_CALLBACK)(KeyType aKey, UserDataType aData, void *userArg)

function type provided by the application for enumeration.

Parameters:
aKeythe key being enumerated
aDatadata being enumerated userArg passed unchanged from Enumerate
Returns:
either PL_DHASH_NEXT or PL_DHASH_STOP

Reimplemented from nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >.

Definition at line 171 of file nsBaseHashtable.h.

template<class KeyClass, class DataType, class UserDataType>
typedef PLDHashOperator(* nsBaseHashtable< KeyClass, DataType, UserDataType >::PR_CALLBACK)(KeyType aKey, DataType &aData, void *userArg)

function type provided by the application for enumeration.

Parameters:
aKeythe key being enumerated
aDataReference to data being enumerated, may be altered. e.g. for nsInterfaceHashtable this is an nsCOMPtr reference... userArg passed unchanged from Enumerate
Returns:
bitflag combination of PLDHashOperator::PL_DHASH_REMOVE, PL_DHASH_NEXT , or PL_DHASH_STOP

Reimplemented from nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >.

Definition at line 203 of file nsBaseHashtable.h.


Member Function Documentation

template<class KeyClass, class DataType, class UserDataType>
void nsBaseHashtable< KeyClass, DataType, UserDataType >::Clear ( void  ) [inline]
template<class KeyClass, class DataType, class UserDataType>
PRUint32 nsBaseHashtable< KeyClass, DataType, UserDataType >::Count ( void  ) const [inline]
template<class KeyClass, class DataType, class UserDataType>
PRUint32 nsBaseHashtable< KeyClass, DataType, UserDataType >::Enumerate ( EnumFunction  enumFunc,
void userArg 
) [inline]

enumerate entries in the hashtable, allowing changes.

This functions write-locks the hashtable.

Parameters:
enumFuncenumeration callback
userArgpassed unchanged to the EnumFunction

Definition at line 213 of file nsBaseHashtable.h.

  {
    NS_ASSERTION(this->mTable.entrySize,
                 "nsBaseHashtable was not initialized properly.");

    s_EnumArgs enumData = { enumFunc, userArg };
    return PL_DHashTableEnumerate(&this->mTable,
                                  s_EnumStub,
                                  &enumData);
  }

Here is the caller graph for this function:

PRUint32 nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >::EnumerateEntries ( Enumerator  enumFunc,
void userArg 
) [inline, inherited]

Enumerate all the entries of the function.

Parameters:
enumFuncthe Enumerator function to call
userArga pointer to pass to the Enumerator function
Returns:
the number of entries actually enumerated

Definition at line 233 of file nsTHashtable.h.

  {
    NS_ASSERTION(mTable.entrySize, "nsTHashtable was not initialized properly.");
    
    s_EnumArgs args = { enumFunc, userArg };
    return PL_DHashTableEnumerate(&mTable, s_EnumStub, &args);
  }
template<class KeyClass, class DataType, class UserDataType>
PRUint32 nsBaseHashtable< KeyClass, DataType, UserDataType >::EnumerateRead ( EnumReadFunction  enumFunc,
void userArg 
) const [inline]

enumerate entries in the hashtable, without allowing changes

Parameters:
enumFuncenumeration callback
userArgpassed unchanged to the EnumReadFunction

Definition at line 180 of file nsBaseHashtable.h.

  {
    NS_ASSERTION(this->mTable.entrySize,
                 "nsBaseHashtable was not initialized properly.");

    s_EnumReadArgs enumData = { enumFunc, userArg };
    return PL_DHashTableEnumerate(NS_CONST_CAST(PLDHashTable*, &this->mTable),
                                  s_EnumReadStub,
                                  &enumData);
  }

Here is the caller graph for this function:

template<class KeyClass, class DataType, class UserDataType>
PRBool nsBaseHashtable< KeyClass, DataType, UserDataType >::Get ( KeyType  aKey,
UserDataType *  pData 
) const [inline]

retrieve the value for a key.

Parameters:
aKeythe key to retreive
pDatadata associated with this key will be placed at this pointer. If you only need to check if the key exists, pData may be null.
Returns:
PR_TRUE if the key exists. If key does not exist, pData is not modified.

Reimplemented in nsBaseHashtableMT< KeyClass, DataType, UserDataType >, nsBaseHashtableMT< KeyClass, DataType, DataType >, nsRefPtrHashtable< KeyClass, RefPtr >, nsInterfaceHashtable< KeyClass, Interface >, nsClassHashtable< KeyClass, T >, nsClassHashtable< nsDepCharHashKey, INIValue >, and nsClassHashtable< nsCStringHashKey, SignonHashEntry >.

Definition at line 124 of file nsBaseHashtable.h.

  {
    EntryType* ent = GetEntry(aKey);

    if (!ent)
      return PR_FALSE;

    if (pData)
      *pData = ent->mData;

    return PR_TRUE;
  }

Here is the caller graph for this function:

nsBaseHashtableET< KeyClass, DataType > * nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >::GetEntry ( KeyType  aKey) const [inline, inherited]

Get the entry associated with a key.

Parameters:
aKeythe key to retrieve
Returns:
pointer to the entry class, if the key exists; nsnull if the key doesn't exist

Definition at line 158 of file nsTHashtable.h.

  {
    NS_ASSERTION(mTable.entrySize, "nsTHashtable was not initialized properly.");
  
    EntryType* entry =
      NS_REINTERPRET_CAST(EntryType*,
                          PL_DHashTableOperate(
                            NS_CONST_CAST(PLDHashTable*,&mTable),
                            EntryType::KeyToPointer(aKey),
                            PL_DHASH_LOOKUP));
    return PL_DHASH_ENTRY_IS_BUSY(entry) ? entry : nsnull;
  }

Here is the caller graph for this function:

template<class KeyClass, class DataType, class UserDataType>
PRBool nsBaseHashtable< KeyClass, DataType, UserDataType >::Init ( PRUint32  initSize = PL_DHASH_MIN_SIZE) [inline]

Initialize the object.

Parameters:
initSizethe initial number of buckets in the hashtable, default 16 locking on all class methods
Returns:
PR_TRUE if the object was initialized properly.

Reimplemented from nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >.

Reimplemented in nsBaseHashtableMT< KeyClass, DataType, UserDataType >, nsBaseHashtableMT< KeyClass, nsCOMPtr< Interface >, Interface * >, nsBaseHashtableMT< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtableMT< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, and nsBaseHashtableMT< KeyClass, DataType, DataType >.

Definition at line 98 of file nsBaseHashtable.h.

  { return nsTHashtable<EntryType>::Init(initSize); }
template<class KeyClass, class DataType, class UserDataType>
PRBool nsBaseHashtable< KeyClass, DataType, UserDataType >::IsInitialized ( ) const [inline]

Check whether the table has been initialized.

This function is especially useful for static hashtables.

Returns:
PR_TRUE if the table has been initialized.

Reimplemented from nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >.

Reimplemented in nsBaseHashtableMT< KeyClass, DataType, UserDataType >, nsBaseHashtableMT< KeyClass, nsCOMPtr< Interface >, Interface * >, nsBaseHashtableMT< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtableMT< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, and nsBaseHashtableMT< KeyClass, DataType, DataType >.

Definition at line 106 of file nsBaseHashtable.h.

{ return this->mTable.entrySize; }

Here is the caller graph for this function:

template<class KeyClass, class DataType, class UserDataType>
PRBool nsBaseHashtable< KeyClass, DataType, UserDataType >::Put ( KeyType  aKey,
UserDataType  aData 
) [inline]

put a new value for the associated key

Parameters:
aKeythe key to put
aDatathe new data
Returns:
always PR_TRUE, unless memory allocation failed

Reimplemented in nsBaseHashtableMT< KeyClass, DataType, UserDataType >, and nsBaseHashtableMT< KeyClass, DataType, DataType >.

Definition at line 143 of file nsBaseHashtable.h.

  {
    EntryType* ent = PutEntry(aKey);

    if (!ent)
      return PR_FALSE;

    ent->mData = aData;

    return PR_TRUE;
  }
nsBaseHashtableET< KeyClass, DataType > * nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >::PutEntry ( KeyType  aKey) [inline, inherited]

Get the entry associated with a key, or create a new entry,.

Parameters:
aKeythe key to retrieve
Returns:
pointer to the entry class retreived; nsnull only if memory can't be allocated

Definition at line 177 of file nsTHashtable.h.

  {
    NS_ASSERTION(mTable.entrySize, "nsTHashtable was not initialized properly.");
    
    return NS_STATIC_CAST(EntryType*,
                          PL_DHashTableOperate(
                            &mTable,
                            EntryType::KeyToPointer(aKey),
                            PL_DHASH_ADD));
  }

Here is the caller graph for this function:

void nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >::RawRemoveEntry ( nsBaseHashtableET< KeyClass, DataType > *  aEntry) [inline, inherited]

Remove the entry associated with a key, but don't resize the hashtable.

This is a low-level method, and is not recommended unless you know what you're doing and you need the extra performance. This method can be used during enumeration, while RemoveEntry() cannot.

Parameters:
aEntrythe entry-pointer to remove (obtained from GetEntry or the enumerator

Definition at line 209 of file nsTHashtable.h.

template<class KeyClass, class DataType, class UserDataType>
void nsBaseHashtable< KeyClass, DataType, UserDataType >::Remove ( KeyType  aKey) [inline]

remove the data for the associated key

Parameters:
aKeythe key to remove from the hashtable

Reimplemented in nsBaseHashtableMT< KeyClass, DataType, UserDataType >, nsBaseHashtableMT< KeyClass, nsCOMPtr< Interface >, Interface * >, nsBaseHashtableMT< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtableMT< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, and nsBaseHashtableMT< KeyClass, DataType, DataType >.

Definition at line 159 of file nsBaseHashtable.h.

{ RemoveEntry(aKey); }

Here is the caller graph for this function:

void nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >::RemoveEntry ( KeyType  aKey) [inline, inherited]

Remove the entry associated with a key.

Parameters:
aKeyof the entry to remove

Definition at line 192 of file nsTHashtable.h.

  {
    NS_ASSERTION(mTable.entrySize, "nsTHashtable was not initialized properly.");

    PL_DHashTableOperate(&mTable,
                         EntryType::KeyToPointer(aKey),
                         PL_DHASH_REMOVE);
  }

Here is the caller graph for this function:

static void PR_CALLBACK nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >::s_ClearEntry ( PLDHashTable table,
PLDHashEntryHdr entry 
) [static, protected, inherited]
static void PR_CALLBACK nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >::s_CopyEntry ( PLDHashTable table,
const PLDHashEntryHdr from,
PLDHashEntryHdr to 
) [static, protected, inherited]
template<class KeyClass , class DataType , class UserDataType >
PLDHashOperator nsBaseHashtable< KeyClass, DataType, UserDataType >::s_EnumReadStub ( PLDHashTable table,
PLDHashEntryHdr hdr,
PRUint32  number,
void arg 
) [static, protected]

Definition at line 322 of file nsBaseHashtable.h.

{
  EntryType* ent = NS_STATIC_CAST(EntryType*, hdr);
  s_EnumReadArgs* eargs = (s_EnumReadArgs*) arg;

  PLDHashOperator res = (eargs->func)(ent->GetKey(), ent->mData, eargs->userArg);

  NS_ASSERTION( !(res & PL_DHASH_REMOVE ),
                "PL_DHASH_REMOVE return during const enumeration; ignoring.");

  if (res & PL_DHASH_STOP)
    return PL_DHASH_STOP;

  return PL_DHASH_NEXT;
}

Here is the caller graph for this function:

template<class KeyClass , class DataType , class UserDataType >
PLDHashOperator nsBaseHashtable< KeyClass, DataType, UserDataType >::s_EnumStub ( PLDHashTable table,
PLDHashEntryHdr hdr,
PRUint32  number,
void arg 
) [static, protected]

Reimplemented from nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >.

Definition at line 341 of file nsBaseHashtable.h.

{
  EntryType* ent = NS_STATIC_CAST(EntryType*, hdr);
  s_EnumArgs* eargs = (s_EnumArgs*) arg;

  return (eargs->func)(ent->GetKey(), ent->mData, eargs->userArg);
}

Here is the caller graph for this function:

static const void* PR_CALLBACK nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >::s_GetKey ( PLDHashTable table,
PLDHashEntryHdr entry 
) [static, protected, inherited]
static PLDHashNumber PR_CALLBACK nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >::s_HashKey ( PLDHashTable table,
const void key 
) [static, protected, inherited]
static PRBool PR_CALLBACK nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >::s_InitEntry ( PLDHashTable table,
PLDHashEntryHdr entry,
const void key 
) [static, protected, inherited]
static PRBool PR_CALLBACK nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >::s_MatchEntry ( PLDHashTable table,
const PLDHashEntryHdr entry,
const void key 
) [static, protected, inherited]

Member Data Documentation

PLDHashTable nsTHashtable< nsBaseHashtableET< KeyClass, DataType > >::mTable [protected, inherited]

Definition at line 252 of file nsTHashtable.h.


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