Back to index

lightning-sunbird  0.9+nobinonly
Classes | Public Types | Public Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions
nsTHashtable< EntryType > Class Template Reference

a base class for templated hashtables. More...

#include <nsTHashtable.h>

Inherited by nsBaseHashtable< IDKey, nsCString, nsCString > [protected], nsBaseHashtable< IDKey, nsTArray< nsCString > *, nsTArray< nsCString > * > [protected], nsBaseHashtable< JavaClassMemberKey, void *, void * > [protected], nsBaseHashtable< nsAttrHashKey, nsCOMPtr< nsIDOMNode >, nsIDOMNode * > [protected], nsBaseHashtable< nsCStringHashKey, nsAutoPtr< nsPresState >, nsPresState * > [protected], nsBaseHashtable< nsCStringHashKey, nsAutoPtr< SignonHashEntry >, SignonHashEntry * > [protected], nsBaseHashtable< nsCStringHashKey, nsCOMPtr< calITimezone >, calITimezone * > [protected], nsBaseHashtable< nsCStringHashKey, nsCOMPtr< nsIDOMStorage >, nsIDOMStorage * > [protected], nsBaseHashtable< nsCStringHashKey, nsCOMPtr< nsIURI >, nsIURI * > [protected], nsBaseHashtable< nsCStringHashKey, nsCString, nsCString > [protected], nsBaseHashtable< nsCStringHashKey, nsRefPtr< nsDownload >, nsDownload * > [protected], nsBaseHashtable< nsCStringHashKey, PRInt32, PRInt32 > [protected], nsBaseHashtable< nsCStringHashKey, PRUint32, PRUint32 > [protected], nsBaseHashtable< nsDepCharHashKey, nsAutoPtr< CategoryNode >, CategoryNode * > [protected], nsBaseHashtable< nsDepCharHashKey, nsAutoPtr< INIValue >, INIValue * > [protected], nsBaseHashtable< nsIDHashKey, nsRefPtr< ipcTargetData >, ipcTargetData * > [protected], nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsString >, nsString * > [protected], nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsXFormsMDGNode >, nsXFormsMDGNode * > [protected], nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsXFormsNodeState >, nsXFormsNodeState * > [protected], nsBaseHashtable< nsISupportsHashKey, nsCOMPtr< nsIWeakReference >, nsIWeakReference * > [protected], nsBaseHashtable< nsISupportsHashKey, nsCOMPtr< nsXMLEventsListener >, nsXMLEventsListener * > [protected], nsBaseHashtable< nsISupportsHashKey, nsCString, nsCString > [protected], nsBaseHashtable< nsISupportsHashKey, nsRefPtr< nsXBLBinding >, nsXBLBinding * > [protected], nsBaseHashtable< nsISupportsHashKey, nsRefPtr< nsXFormsControlListItem >, nsXFormsControlListItem * > [protected], nsBaseHashtable< nsISupportsHashKey, PRInt32, PRInt32 > [protected], nsBaseHashtable< nsISupportsHashKey, PRUint32, PRUint32 > [protected], nsBaseHashtable< nsISupportsHashKey, RequestEntry, RequestEntry > [protected], nsBaseHashtable< nsISupportsHashKey, RestyleData, RestyleData > [protected], nsBaseHashtable< nsPtrHashKey< nsIDocument >, DocumentEntry, DocumentEntry > [protected], nsBaseHashtable< nsPtrHashKey< nsIDOMWindow >, PRUint32, PRUint32 > [protected], nsBaseHashtable< nsStringHashKey, const nsString *, const nsString * > [protected], nsBaseHashtable< nsStringHashKey, nsAutoPtr< nsCounterList >, nsCounterList * > [protected], nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIAtom >, nsIAtom * > [protected], nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIDOMHTMLInputElement >, nsIDOMHTMLInputElement * > [protected], nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIDOMStorage >, nsIDOMStorage * > [protected], nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIFile >, nsIFile * > [protected], nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIMetricsCollector >, nsIMetricsCollector * > [protected], nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIRDFResource >, nsIRDFResource * > [protected], nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchema >, nsISchema * > [protected], nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttribute >, nsISchemaAttribute * > [protected], nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttributeComponent >, nsISchemaAttributeComponent * > [protected], nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttributeGroup >, nsISchemaAttributeGroup * > [protected], nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaElement >, nsISchemaElement * > [protected], nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaModelGroup >, nsISchemaModelGroup * > [protected], nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaType >, nsISchemaType * > [protected], nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISupports >, nsISupports * > [protected], nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIVariant >, nsIVariant * > [protected], nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIXFormsContextInfo >, nsIXFormsContextInfo * > [protected], nsBaseHashtable< nsStringHashKey, nsString, nsString > [protected], nsBaseHashtable< nsStringHashKey, nsTreeImageCacheEntry, nsTreeImageCacheEntry > [protected], nsBaseHashtable< nsStringHashKey, PRBool, PRBool > [protected], nsBaseHashtable< nsUint32HashKey, float, float > [protected], nsBaseHashtable< nsUint32HashKey, nsCOMPtr< nsIXTFElementFactory >, nsIXTFElementFactory * > [protected], nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsICSSStyleSheet >, nsICSSStyleSheet * > [protected], nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIObserver >, nsIObserver * > [protected], nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIStreamListener >, nsIStreamListener * > [protected], nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIURI >, nsIURI * > [protected], nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIXBLDocumentInfo >, nsIXBLDocumentInfo * > [protected], nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIXULPrototypeDocument >, nsIXULPrototypeDocument * > [protected], nsBaseHashtable< nsURIHashKey, PRUint32, PRUint32 > [protected], nsBaseHashtable< nsURIHashKey, SheetLoadData *, SheetLoadData * > [protected], nsBaseHashtable< nsURIHashKey, void *, void * > [protected], nsBaseHashtable< nsVoidHashKey, nsCOMPtr< nsIAccessNode >, nsIAccessNode * > [protected], nsBaseHashtable< nsVoidPtrHashKey, nsAutoPtr< DConnectInstance >, DConnectInstance * > [protected], nsBaseHashtable< nsVoidPtrHashKey, nsCOMPtr< nsIEventQueue >, nsIEventQueue * > [protected], nsBaseHashtable< nsVoidPtrHashKey, nsCOMPtr< nsIWeakReference >, nsIWeakReference * > [protected], and nsBaseHashtable< PrincipalKey, nsCOMPtr< nsIPrincipal >, nsIPrincipal * > [protected].

List of all members.

Classes

struct  s_EnumArgs
 passed internally during enumeration. More...

Public Types

typedef EntryType::KeyType KeyType
 KeyType is typedef'ed for ease of use.
typedef EntryType::KeyTypePointer KeyTypePointer
 KeyTypePointer is typedef'ed for ease of use.
typedef PLDHashOperator(* PR_CALLBACK )(EntryType *aEntry, void *userArg)
 client must provide an Enumerator function for EnumerateEntries

Public Member Functions

 nsTHashtable ()
 A dummy constructor; you must call Init() before using this class.
 ~nsTHashtable ()
 destructor, cleans up and deallocates
PRBool Init (PRUint32 initSize=PL_DHASH_MIN_SIZE)
 Initialize the table.
PRBool IsInitialized () const
 Check whether the table has been initialized.
PRUint32 Count () const
 Return the number of entries in the table.
EntryType * GetEntry (KeyType aKey) const
 Get the entry associated with a key.
EntryType * 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 (EntryType *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.
void Clear ()
 remove all entries, return hashtable to "pristine" state ;)

Static Protected Member Functions

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)
static PLDHashOperator PR_CALLBACK s_EnumStub (PLDHashTable *table, PLDHashEntryHdr *entry, PRUint32 number, void *arg)

Protected Attributes

PLDHashTable mTable

Private Member Functions

 nsTHashtable (nsTHashtable< EntryType > &toCopy)
nsTHashtable< EntryType > & operator= (nsTHashtable< EntryType > &toEqual)

Detailed Description

template<class EntryType>
class nsTHashtable< EntryType >

a base class for templated hashtables.

Clients will rarely need to use this class directly. Check the derived classes first, to see if they will meet your needs.

Parameters:
EntryTypethe templated entry-type class that is managed by the hashtable. EntryType must extend the following declaration, and must not declare any virtual functions or derive from classes with virtual functions. Any vtable pointer would break the PLDHashTable code.
   class EntryType : public PLDHashEntryHdr
   {
   public: or friend nsTHashtable<EntryType>;
     // KeyType is what we use when Get()ing or Put()ing this entry
     // this should either be a simple datatype (PRUint32, nsISupports*) or
     // a const reference (const nsAString&)
     typedef something KeyType;
     // KeyTypePointer is the pointer-version of KeyType, because pldhash.h
     // requires keys to cast to const void*
     typedef const something* KeyTypePointer;

EntryType(KeyTypePointer aKey);

    // the copy constructor must be defined, even if AllowMemMove() == true
     // or you will cause link errors!
     EntryType(const EntryType& aEnt);
    // the destructor must be defined... or you will cause link errors!
     ~EntryType();
    // return the key of this entry
     const KeyTypePointer GetKeyPointer() const;
    // KeyEquals(): does this entry match this key?
     PRBool KeyEquals(KeyTypePointer aKey) const;
    // KeyToPointer(): Convert KeyType to KeyTypePointer
     static KeyTypePointer KeyToPointer(KeyType aKey);
    // HashKey(): calculate the hash number
     static PLDHashNumber HashKey(KeyTypePointer aKey);
    // ALLOW_MEMMOVE can we move this class with memmove(), or do we have
     // to use the copy constructor?
     enum { ALLOW_MEMMOVE = PR_(TRUE or FALSE) };
   }
See also:
nsInterfaceHashtable
nsDataHashtable
nsClassHashtable
Author:
"Benjamin Smedberg <bsmedberg@covad.net>"

Definition at line 109 of file nsTHashtable.h.


Class Documentation

struct nsTHashtable::s_EnumArgs

template<class EntryType>
struct nsTHashtable< EntryType >::s_EnumArgs

passed internally during enumeration.

Allocated on the stack.

Parameters:
userFuncthe Enumerator function passed to EnumerateEntries by the client
userArgthe userArg passed unaltered

Definition at line 282 of file nsTHashtable.h.

Class Members
void * userArg
Enumerator userFunc

Member Typedef Documentation

template<class EntryType>
typedef EntryType::KeyType nsTHashtable< EntryType >::KeyType

KeyType is typedef'ed for ease of use.

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 >, nsBaseHashtable< KeyClass, DataType, UserDataType >, nsBaseHashtable< nsURIHashKey, void *, void * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaModelGroup >, nsISchemaModelGroup * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIXFormsContextInfo >, nsIXFormsContextInfo * >, nsBaseHashtable< nsPtrHashKey< nsIDocument >, DocumentEntry, DocumentEntry >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchema >, nsISchema * >, nsBaseHashtable< nsISupportsHashKey, PRInt32, PRInt32 >, nsBaseHashtable< nsCStringHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIXULPrototypeDocument >, nsIXULPrototypeDocument * >, nsBaseHashtable< nsVoidHashKey, nsCOMPtr< nsIAccessNode >, nsIAccessNode * >, nsBaseHashtable< nsStringHashKey, nsString, nsString >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< nsIDOMStorage >, nsIDOMStorage * >, nsBaseHashtable< KeyClass, nsCOMPtr< Interface >, Interface * >, nsBaseHashtable< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtable< nsDepCharHashKey, nsAutoPtr< CategoryNode >, CategoryNode * >, nsBaseHashtable< nsISupportsHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIRDFResource >, nsIRDFResource * >, nsBaseHashtable< IDKey, nsTArray< nsCString > *, nsTArray< nsCString > * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIObserver >, nsIObserver * >, nsBaseHashtable< nsStringHashKey, nsTreeImageCacheEntry, nsTreeImageCacheEntry >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< calITimezone >, calITimezone * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsXFormsMDGNode >, nsXFormsMDGNode * >, nsBaseHashtable< nsCStringHashKey, nsAutoPtr< nsPresState >, nsPresState * >, nsBaseHashtable< nsISupportsHashKey, nsCOMPtr< nsIWeakReference >, nsIWeakReference * >, nsBaseHashtable< nsUint32HashKey, nsCOMPtr< nsIXTFElementFactory >, nsIXTFElementFactory * >, nsBaseHashtable< nsVoidPtrHashKey, nsCOMPtr< nsIEventQueue >, nsIEventQueue * >, nsBaseHashtable< nsISupportsHashKey, RequestEntry, RequestEntry >, nsBaseHashtable< nsCStringHashKey, nsAutoPtr< SignonHashEntry >, SignonHashEntry * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttributeGroup >, nsISchemaAttributeGroup * >, nsBaseHashtable< nsAttrHashKey, nsCOMPtr< nsIDOMNode >, nsIDOMNode * >, nsBaseHashtable< JavaClassMemberKey, void *, void * >, nsBaseHashtable< nsStringHashKey, PRBool, PRBool >, nsBaseHashtable< IDKey, nsCString, nsCString >, nsBaseHashtable< nsUint32HashKey, float, float >, nsBaseHashtable< nsIDHashKey, nsRefPtr< ipcTargetData >, ipcTargetData * >, nsBaseHashtable< nsCStringHashKey, nsCString, nsCString >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaType >, nsISchemaType * >, nsBaseHashtable< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, nsBaseHashtable< KeyClass, DataType, DataType >, nsBaseHashtable< nsDepCharHashKey, nsAutoPtr< INIValue >, INIValue * >, nsBaseHashtable< nsISupportsHashKey, nsRefPtr< nsXBLBinding >, nsXBLBinding * >, nsBaseHashtable< nsVoidPtrHashKey, nsAutoPtr< DConnectInstance >, DConnectInstance * >, nsBaseHashtable< nsISupportsHashKey, RestyleData, RestyleData >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsICSSStyleSheet >, nsICSSStyleSheet * >, nsBaseHashtable< nsCStringHashKey, PRInt32, PRInt32 >, nsBaseHashtable< nsCStringHashKey, nsRefPtr< nsDownload >, nsDownload * >, nsBaseHashtable< PrincipalKey, nsCOMPtr< nsIPrincipal >, nsIPrincipal * >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< nsIURI >, nsIURI * >, nsBaseHashtable< nsISupportsHashKey, nsCString, nsCString >, nsBaseHashtable< nsPtrHashKey< nsIDOMWindow >, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIStreamListener >, nsIStreamListener * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIFile >, nsIFile * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIURI >, nsIURI * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIXBLDocumentInfo >, nsIXBLDocumentInfo * >, nsBaseHashtable< nsStringHashKey, const nsString *, const nsString * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIDOMStorage >, nsIDOMStorage * >, nsBaseHashtable< nsStringHashKey, nsAutoPtr< nsCounterList >, nsCounterList * >, nsBaseHashtable< nsISupportsHashKey, nsCOMPtr< nsXMLEventsListener >, nsXMLEventsListener * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttributeComponent >, nsISchemaAttributeComponent * >, nsBaseHashtable< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtable< nsVoidPtrHashKey, nsCOMPtr< nsIWeakReference >, nsIWeakReference * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIAtom >, nsIAtom * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttribute >, nsISchemaAttribute * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsXFormsNodeState >, nsXFormsNodeState * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsString >, nsString * >, nsBaseHashtable< nsURIHashKey, SheetLoadData *, SheetLoadData * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaElement >, nsISchemaElement * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIVariant >, nsIVariant * >, nsBaseHashtable< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIMetricsCollector >, nsIMetricsCollector * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIDOMHTMLInputElement >, nsIDOMHTMLInputElement * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISupports >, nsISupports * >, nsBaseHashtable< nsISupportsHashKey, nsRefPtr< nsXFormsControlListItem >, nsXFormsControlListItem * >, 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 139 of file nsTHashtable.h.

template<class EntryType>
typedef EntryType::KeyTypePointer nsTHashtable< EntryType >::KeyTypePointer

KeyTypePointer is typedef'ed for ease of use.

Definition at line 144 of file nsTHashtable.h.

template<class EntryType>
typedef PLDHashOperator(* nsTHashtable< EntryType >::PR_CALLBACK)(EntryType *aEntry, void *userArg)

client must provide an Enumerator function for EnumerateEntries

Parameters:
aEntrythe entry being enumerated
userArgpassed unchanged from EnumerateEntries
Returns:
combination of flags PL_DHASH_NEXT , PL_DHASH_STOP , PL_DHASH_REMOVE

Reimplemented in nsBaseHashtable< KeyClass, DataType, UserDataType >, nsBaseHashtable< nsURIHashKey, void *, void * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaModelGroup >, nsISchemaModelGroup * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIXFormsContextInfo >, nsIXFormsContextInfo * >, nsBaseHashtable< nsPtrHashKey< nsIDocument >, DocumentEntry, DocumentEntry >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchema >, nsISchema * >, nsBaseHashtable< nsISupportsHashKey, PRInt32, PRInt32 >, nsBaseHashtable< nsCStringHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIXULPrototypeDocument >, nsIXULPrototypeDocument * >, nsBaseHashtable< nsVoidHashKey, nsCOMPtr< nsIAccessNode >, nsIAccessNode * >, nsBaseHashtable< nsStringHashKey, nsString, nsString >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< nsIDOMStorage >, nsIDOMStorage * >, nsBaseHashtable< KeyClass, nsCOMPtr< Interface >, Interface * >, nsBaseHashtable< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtable< nsDepCharHashKey, nsAutoPtr< CategoryNode >, CategoryNode * >, nsBaseHashtable< nsISupportsHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIRDFResource >, nsIRDFResource * >, nsBaseHashtable< IDKey, nsTArray< nsCString > *, nsTArray< nsCString > * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIObserver >, nsIObserver * >, nsBaseHashtable< nsStringHashKey, nsTreeImageCacheEntry, nsTreeImageCacheEntry >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< calITimezone >, calITimezone * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsXFormsMDGNode >, nsXFormsMDGNode * >, nsBaseHashtable< nsCStringHashKey, nsAutoPtr< nsPresState >, nsPresState * >, nsBaseHashtable< nsISupportsHashKey, nsCOMPtr< nsIWeakReference >, nsIWeakReference * >, nsBaseHashtable< nsUint32HashKey, nsCOMPtr< nsIXTFElementFactory >, nsIXTFElementFactory * >, nsBaseHashtable< nsVoidPtrHashKey, nsCOMPtr< nsIEventQueue >, nsIEventQueue * >, nsBaseHashtable< nsISupportsHashKey, RequestEntry, RequestEntry >, nsBaseHashtable< nsCStringHashKey, nsAutoPtr< SignonHashEntry >, SignonHashEntry * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttributeGroup >, nsISchemaAttributeGroup * >, nsBaseHashtable< nsAttrHashKey, nsCOMPtr< nsIDOMNode >, nsIDOMNode * >, nsBaseHashtable< JavaClassMemberKey, void *, void * >, nsBaseHashtable< nsStringHashKey, PRBool, PRBool >, nsBaseHashtable< IDKey, nsCString, nsCString >, nsBaseHashtable< nsUint32HashKey, float, float >, nsBaseHashtable< nsIDHashKey, nsRefPtr< ipcTargetData >, ipcTargetData * >, nsBaseHashtable< nsCStringHashKey, nsCString, nsCString >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaType >, nsISchemaType * >, nsBaseHashtable< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, nsBaseHashtable< KeyClass, DataType, DataType >, nsBaseHashtable< nsDepCharHashKey, nsAutoPtr< INIValue >, INIValue * >, nsBaseHashtable< nsISupportsHashKey, nsRefPtr< nsXBLBinding >, nsXBLBinding * >, nsBaseHashtable< nsVoidPtrHashKey, nsAutoPtr< DConnectInstance >, DConnectInstance * >, nsBaseHashtable< nsISupportsHashKey, RestyleData, RestyleData >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsICSSStyleSheet >, nsICSSStyleSheet * >, nsBaseHashtable< nsCStringHashKey, PRInt32, PRInt32 >, nsBaseHashtable< nsCStringHashKey, nsRefPtr< nsDownload >, nsDownload * >, nsBaseHashtable< PrincipalKey, nsCOMPtr< nsIPrincipal >, nsIPrincipal * >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< nsIURI >, nsIURI * >, nsBaseHashtable< nsISupportsHashKey, nsCString, nsCString >, nsBaseHashtable< nsPtrHashKey< nsIDOMWindow >, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIStreamListener >, nsIStreamListener * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIFile >, nsIFile * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIURI >, nsIURI * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIXBLDocumentInfo >, nsIXBLDocumentInfo * >, nsBaseHashtable< nsStringHashKey, const nsString *, const nsString * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIDOMStorage >, nsIDOMStorage * >, nsBaseHashtable< nsStringHashKey, nsAutoPtr< nsCounterList >, nsCounterList * >, nsBaseHashtable< nsISupportsHashKey, nsCOMPtr< nsXMLEventsListener >, nsXMLEventsListener * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttributeComponent >, nsISchemaAttributeComponent * >, nsBaseHashtable< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtable< nsVoidPtrHashKey, nsCOMPtr< nsIWeakReference >, nsIWeakReference * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIAtom >, nsIAtom * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttribute >, nsISchemaAttribute * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsXFormsNodeState >, nsXFormsNodeState * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsString >, nsString * >, nsBaseHashtable< nsURIHashKey, SheetLoadData *, SheetLoadData * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaElement >, nsISchemaElement * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIVariant >, nsIVariant * >, nsBaseHashtable< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIMetricsCollector >, nsIMetricsCollector * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIDOMHTMLInputElement >, nsIDOMHTMLInputElement * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISupports >, nsISupports * >, nsBaseHashtable< nsISupportsHashKey, nsRefPtr< nsXFormsControlListItem >, nsXFormsControlListItem * >, nsBaseHashtable< KeyClass, DataType, UserDataType >, nsBaseHashtable< nsURIHashKey, void *, void * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaModelGroup >, nsISchemaModelGroup * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIXFormsContextInfo >, nsIXFormsContextInfo * >, nsBaseHashtable< nsPtrHashKey< nsIDocument >, DocumentEntry, DocumentEntry >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchema >, nsISchema * >, nsBaseHashtable< nsISupportsHashKey, PRInt32, PRInt32 >, nsBaseHashtable< nsCStringHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIXULPrototypeDocument >, nsIXULPrototypeDocument * >, nsBaseHashtable< nsVoidHashKey, nsCOMPtr< nsIAccessNode >, nsIAccessNode * >, nsBaseHashtable< nsStringHashKey, nsString, nsString >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< nsIDOMStorage >, nsIDOMStorage * >, nsBaseHashtable< KeyClass, nsCOMPtr< Interface >, Interface * >, nsBaseHashtable< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtable< nsDepCharHashKey, nsAutoPtr< CategoryNode >, CategoryNode * >, nsBaseHashtable< nsISupportsHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIRDFResource >, nsIRDFResource * >, nsBaseHashtable< IDKey, nsTArray< nsCString > *, nsTArray< nsCString > * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIObserver >, nsIObserver * >, nsBaseHashtable< nsStringHashKey, nsTreeImageCacheEntry, nsTreeImageCacheEntry >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< calITimezone >, calITimezone * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsXFormsMDGNode >, nsXFormsMDGNode * >, nsBaseHashtable< nsCStringHashKey, nsAutoPtr< nsPresState >, nsPresState * >, nsBaseHashtable< nsISupportsHashKey, nsCOMPtr< nsIWeakReference >, nsIWeakReference * >, nsBaseHashtable< nsUint32HashKey, nsCOMPtr< nsIXTFElementFactory >, nsIXTFElementFactory * >, nsBaseHashtable< nsVoidPtrHashKey, nsCOMPtr< nsIEventQueue >, nsIEventQueue * >, nsBaseHashtable< nsISupportsHashKey, RequestEntry, RequestEntry >, nsBaseHashtable< nsCStringHashKey, nsAutoPtr< SignonHashEntry >, SignonHashEntry * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttributeGroup >, nsISchemaAttributeGroup * >, nsBaseHashtable< nsAttrHashKey, nsCOMPtr< nsIDOMNode >, nsIDOMNode * >, nsBaseHashtable< JavaClassMemberKey, void *, void * >, nsBaseHashtable< nsStringHashKey, PRBool, PRBool >, nsBaseHashtable< IDKey, nsCString, nsCString >, nsBaseHashtable< nsUint32HashKey, float, float >, nsBaseHashtable< nsIDHashKey, nsRefPtr< ipcTargetData >, ipcTargetData * >, nsBaseHashtable< nsCStringHashKey, nsCString, nsCString >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaType >, nsISchemaType * >, nsBaseHashtable< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, nsBaseHashtable< KeyClass, DataType, DataType >, nsBaseHashtable< nsDepCharHashKey, nsAutoPtr< INIValue >, INIValue * >, nsBaseHashtable< nsISupportsHashKey, nsRefPtr< nsXBLBinding >, nsXBLBinding * >, nsBaseHashtable< nsVoidPtrHashKey, nsAutoPtr< DConnectInstance >, DConnectInstance * >, nsBaseHashtable< nsISupportsHashKey, RestyleData, RestyleData >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsICSSStyleSheet >, nsICSSStyleSheet * >, nsBaseHashtable< nsCStringHashKey, PRInt32, PRInt32 >, nsBaseHashtable< nsCStringHashKey, nsRefPtr< nsDownload >, nsDownload * >, nsBaseHashtable< PrincipalKey, nsCOMPtr< nsIPrincipal >, nsIPrincipal * >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< nsIURI >, nsIURI * >, nsBaseHashtable< nsISupportsHashKey, nsCString, nsCString >, nsBaseHashtable< nsPtrHashKey< nsIDOMWindow >, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIStreamListener >, nsIStreamListener * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIFile >, nsIFile * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIURI >, nsIURI * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIXBLDocumentInfo >, nsIXBLDocumentInfo * >, nsBaseHashtable< nsStringHashKey, const nsString *, const nsString * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIDOMStorage >, nsIDOMStorage * >, nsBaseHashtable< nsStringHashKey, nsAutoPtr< nsCounterList >, nsCounterList * >, nsBaseHashtable< nsISupportsHashKey, nsCOMPtr< nsXMLEventsListener >, nsXMLEventsListener * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttributeComponent >, nsISchemaAttributeComponent * >, nsBaseHashtable< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtable< nsVoidPtrHashKey, nsCOMPtr< nsIWeakReference >, nsIWeakReference * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIAtom >, nsIAtom * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttribute >, nsISchemaAttribute * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsXFormsNodeState >, nsXFormsNodeState * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsString >, nsString * >, nsBaseHashtable< nsURIHashKey, SheetLoadData *, SheetLoadData * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaElement >, nsISchemaElement * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIVariant >, nsIVariant * >, nsBaseHashtable< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIMetricsCollector >, nsIMetricsCollector * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIDOMHTMLInputElement >, nsIDOMHTMLInputElement * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISupports >, nsISupports * >, and nsBaseHashtable< nsISupportsHashKey, nsRefPtr< nsXFormsControlListItem >, nsXFormsControlListItem * >.

Definition at line 224 of file nsTHashtable.h.


Constructor & Destructor Documentation

template<class EntryType >
nsTHashtable< EntryType >::nsTHashtable ( )

A dummy constructor; you must call Init() before using this class.

Definition at line 305 of file nsTHashtable.h.

{
  // entrySize is our "I'm initialized" indicator
  mTable.entrySize = 0;
}
template<class EntryType >
nsTHashtable< EntryType >::~nsTHashtable ( )

destructor, cleans up and deallocates

Definition at line 312 of file nsTHashtable.h.

Here is the call graph for this function:

template<class EntryType>
nsTHashtable< EntryType >::nsTHashtable ( nsTHashtable< EntryType > &  toCopy) [private]

Member Function Documentation

template<class EntryType>
void nsTHashtable< EntryType >::Clear ( void  ) [inline]

remove all entries, return hashtable to "pristine" state ;)

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 >, nsBaseHashtable< KeyClass, DataType, UserDataType >, nsBaseHashtable< nsURIHashKey, void *, void * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaModelGroup >, nsISchemaModelGroup * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIXFormsContextInfo >, nsIXFormsContextInfo * >, nsBaseHashtable< nsPtrHashKey< nsIDocument >, DocumentEntry, DocumentEntry >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchema >, nsISchema * >, nsBaseHashtable< nsISupportsHashKey, PRInt32, PRInt32 >, nsBaseHashtable< nsCStringHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIXULPrototypeDocument >, nsIXULPrototypeDocument * >, nsBaseHashtable< nsVoidHashKey, nsCOMPtr< nsIAccessNode >, nsIAccessNode * >, nsBaseHashtable< nsStringHashKey, nsString, nsString >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< nsIDOMStorage >, nsIDOMStorage * >, nsBaseHashtable< KeyClass, nsCOMPtr< Interface >, Interface * >, nsBaseHashtable< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtable< nsDepCharHashKey, nsAutoPtr< CategoryNode >, CategoryNode * >, nsBaseHashtable< nsISupportsHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIRDFResource >, nsIRDFResource * >, nsBaseHashtable< IDKey, nsTArray< nsCString > *, nsTArray< nsCString > * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIObserver >, nsIObserver * >, nsBaseHashtable< nsStringHashKey, nsTreeImageCacheEntry, nsTreeImageCacheEntry >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< calITimezone >, calITimezone * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsXFormsMDGNode >, nsXFormsMDGNode * >, nsBaseHashtable< nsCStringHashKey, nsAutoPtr< nsPresState >, nsPresState * >, nsBaseHashtable< nsISupportsHashKey, nsCOMPtr< nsIWeakReference >, nsIWeakReference * >, nsBaseHashtable< nsUint32HashKey, nsCOMPtr< nsIXTFElementFactory >, nsIXTFElementFactory * >, nsBaseHashtable< nsVoidPtrHashKey, nsCOMPtr< nsIEventQueue >, nsIEventQueue * >, nsBaseHashtable< nsISupportsHashKey, RequestEntry, RequestEntry >, nsBaseHashtable< nsCStringHashKey, nsAutoPtr< SignonHashEntry >, SignonHashEntry * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttributeGroup >, nsISchemaAttributeGroup * >, nsBaseHashtable< nsAttrHashKey, nsCOMPtr< nsIDOMNode >, nsIDOMNode * >, nsBaseHashtable< JavaClassMemberKey, void *, void * >, nsBaseHashtable< nsStringHashKey, PRBool, PRBool >, nsBaseHashtable< IDKey, nsCString, nsCString >, nsBaseHashtable< nsUint32HashKey, float, float >, nsBaseHashtable< nsIDHashKey, nsRefPtr< ipcTargetData >, ipcTargetData * >, nsBaseHashtable< nsCStringHashKey, nsCString, nsCString >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaType >, nsISchemaType * >, nsBaseHashtable< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, nsBaseHashtable< KeyClass, DataType, DataType >, nsBaseHashtable< nsDepCharHashKey, nsAutoPtr< INIValue >, INIValue * >, nsBaseHashtable< nsISupportsHashKey, nsRefPtr< nsXBLBinding >, nsXBLBinding * >, nsBaseHashtable< nsVoidPtrHashKey, nsAutoPtr< DConnectInstance >, DConnectInstance * >, nsBaseHashtable< nsISupportsHashKey, RestyleData, RestyleData >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsICSSStyleSheet >, nsICSSStyleSheet * >, nsBaseHashtable< nsCStringHashKey, PRInt32, PRInt32 >, nsBaseHashtable< nsCStringHashKey, nsRefPtr< nsDownload >, nsDownload * >, nsBaseHashtable< PrincipalKey, nsCOMPtr< nsIPrincipal >, nsIPrincipal * >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< nsIURI >, nsIURI * >, nsBaseHashtable< nsISupportsHashKey, nsCString, nsCString >, nsBaseHashtable< nsPtrHashKey< nsIDOMWindow >, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIStreamListener >, nsIStreamListener * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIFile >, nsIFile * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIURI >, nsIURI * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIXBLDocumentInfo >, nsIXBLDocumentInfo * >, nsBaseHashtable< nsStringHashKey, const nsString *, const nsString * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIDOMStorage >, nsIDOMStorage * >, nsBaseHashtable< nsStringHashKey, nsAutoPtr< nsCounterList >, nsCounterList * >, nsBaseHashtable< nsISupportsHashKey, nsCOMPtr< nsXMLEventsListener >, nsXMLEventsListener * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttributeComponent >, nsISchemaAttributeComponent * >, nsBaseHashtable< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtable< nsVoidPtrHashKey, nsCOMPtr< nsIWeakReference >, nsIWeakReference * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIAtom >, nsIAtom * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttribute >, nsISchemaAttribute * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsXFormsNodeState >, nsXFormsNodeState * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsString >, nsString * >, nsBaseHashtable< nsURIHashKey, SheetLoadData *, SheetLoadData * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaElement >, nsISchemaElement * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIVariant >, nsIVariant * >, nsBaseHashtable< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIMetricsCollector >, nsIMetricsCollector * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIDOMHTMLInputElement >, nsIDOMHTMLInputElement * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISupports >, nsISupports * >, and nsBaseHashtable< nsISupportsHashKey, nsRefPtr< nsXFormsControlListItem >, nsXFormsControlListItem * >.

Definition at line 244 of file nsTHashtable.h.

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

    PL_DHashTableEnumerate(&mTable, PL_DHashStubEnumRemove, nsnull);
  }

Here is the caller graph for this function:

template<class EntryType>
PRUint32 nsTHashtable< EntryType >::Count ( void  ) const [inline]

Return the number of entries in the table.

Returns:
number of entries

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 >, nsBaseHashtable< KeyClass, DataType, UserDataType >, nsBaseHashtable< nsURIHashKey, void *, void * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaModelGroup >, nsISchemaModelGroup * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIXFormsContextInfo >, nsIXFormsContextInfo * >, nsBaseHashtable< nsPtrHashKey< nsIDocument >, DocumentEntry, DocumentEntry >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchema >, nsISchema * >, nsBaseHashtable< nsISupportsHashKey, PRInt32, PRInt32 >, nsBaseHashtable< nsCStringHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIXULPrototypeDocument >, nsIXULPrototypeDocument * >, nsBaseHashtable< nsVoidHashKey, nsCOMPtr< nsIAccessNode >, nsIAccessNode * >, nsBaseHashtable< nsStringHashKey, nsString, nsString >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< nsIDOMStorage >, nsIDOMStorage * >, nsBaseHashtable< KeyClass, nsCOMPtr< Interface >, Interface * >, nsBaseHashtable< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtable< nsDepCharHashKey, nsAutoPtr< CategoryNode >, CategoryNode * >, nsBaseHashtable< nsISupportsHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIRDFResource >, nsIRDFResource * >, nsBaseHashtable< IDKey, nsTArray< nsCString > *, nsTArray< nsCString > * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIObserver >, nsIObserver * >, nsBaseHashtable< nsStringHashKey, nsTreeImageCacheEntry, nsTreeImageCacheEntry >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< calITimezone >, calITimezone * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsXFormsMDGNode >, nsXFormsMDGNode * >, nsBaseHashtable< nsCStringHashKey, nsAutoPtr< nsPresState >, nsPresState * >, nsBaseHashtable< nsISupportsHashKey, nsCOMPtr< nsIWeakReference >, nsIWeakReference * >, nsBaseHashtable< nsUint32HashKey, nsCOMPtr< nsIXTFElementFactory >, nsIXTFElementFactory * >, nsBaseHashtable< nsVoidPtrHashKey, nsCOMPtr< nsIEventQueue >, nsIEventQueue * >, nsBaseHashtable< nsISupportsHashKey, RequestEntry, RequestEntry >, nsBaseHashtable< nsCStringHashKey, nsAutoPtr< SignonHashEntry >, SignonHashEntry * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttributeGroup >, nsISchemaAttributeGroup * >, nsBaseHashtable< nsAttrHashKey, nsCOMPtr< nsIDOMNode >, nsIDOMNode * >, nsBaseHashtable< JavaClassMemberKey, void *, void * >, nsBaseHashtable< nsStringHashKey, PRBool, PRBool >, nsBaseHashtable< IDKey, nsCString, nsCString >, nsBaseHashtable< nsUint32HashKey, float, float >, nsBaseHashtable< nsIDHashKey, nsRefPtr< ipcTargetData >, ipcTargetData * >, nsBaseHashtable< nsCStringHashKey, nsCString, nsCString >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaType >, nsISchemaType * >, nsBaseHashtable< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, nsBaseHashtable< KeyClass, DataType, DataType >, nsBaseHashtable< nsDepCharHashKey, nsAutoPtr< INIValue >, INIValue * >, nsBaseHashtable< nsISupportsHashKey, nsRefPtr< nsXBLBinding >, nsXBLBinding * >, nsBaseHashtable< nsVoidPtrHashKey, nsAutoPtr< DConnectInstance >, DConnectInstance * >, nsBaseHashtable< nsISupportsHashKey, RestyleData, RestyleData >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsICSSStyleSheet >, nsICSSStyleSheet * >, nsBaseHashtable< nsCStringHashKey, PRInt32, PRInt32 >, nsBaseHashtable< nsCStringHashKey, nsRefPtr< nsDownload >, nsDownload * >, nsBaseHashtable< PrincipalKey, nsCOMPtr< nsIPrincipal >, nsIPrincipal * >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< nsIURI >, nsIURI * >, nsBaseHashtable< nsISupportsHashKey, nsCString, nsCString >, nsBaseHashtable< nsPtrHashKey< nsIDOMWindow >, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIStreamListener >, nsIStreamListener * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIFile >, nsIFile * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIURI >, nsIURI * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIXBLDocumentInfo >, nsIXBLDocumentInfo * >, nsBaseHashtable< nsStringHashKey, const nsString *, const nsString * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIDOMStorage >, nsIDOMStorage * >, nsBaseHashtable< nsStringHashKey, nsAutoPtr< nsCounterList >, nsCounterList * >, nsBaseHashtable< nsISupportsHashKey, nsCOMPtr< nsXMLEventsListener >, nsXMLEventsListener * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttributeComponent >, nsISchemaAttributeComponent * >, nsBaseHashtable< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtable< nsVoidPtrHashKey, nsCOMPtr< nsIWeakReference >, nsIWeakReference * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIAtom >, nsIAtom * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttribute >, nsISchemaAttribute * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsXFormsNodeState >, nsXFormsNodeState * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsString >, nsString * >, nsBaseHashtable< nsURIHashKey, SheetLoadData *, SheetLoadData * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaElement >, nsISchemaElement * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIVariant >, nsIVariant * >, nsBaseHashtable< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIMetricsCollector >, nsIMetricsCollector * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIDOMHTMLInputElement >, nsIDOMHTMLInputElement * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISupports >, nsISupports * >, and nsBaseHashtable< nsISupportsHashKey, nsRefPtr< nsXFormsControlListItem >, nsXFormsControlListItem * >.

Definition at line 150 of file nsTHashtable.h.

{ return mTable.entryCount; }

Here is the caller graph for this function:

template<class EntryType>
PRUint32 nsTHashtable< EntryType >::EnumerateEntries ( Enumerator  enumFunc,
void userArg 
) [inline]

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);
  }

Here is the caller graph for this function:

template<class EntryType>
EntryType* nsTHashtable< EntryType >::GetEntry ( KeyType  aKey) const [inline]

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 EntryType >
PRBool nsTHashtable< EntryType >::Init ( PRUint32  initSize = PL_DHASH_MIN_SIZE)

Initialize the table.

This function must be called before any other class operations. This can fail due to OOM conditions.

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

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 >, nsBaseHashtable< KeyClass, DataType, UserDataType >, nsBaseHashtable< nsURIHashKey, void *, void * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaModelGroup >, nsISchemaModelGroup * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIXFormsContextInfo >, nsIXFormsContextInfo * >, nsBaseHashtable< nsPtrHashKey< nsIDocument >, DocumentEntry, DocumentEntry >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchema >, nsISchema * >, nsBaseHashtable< nsISupportsHashKey, PRInt32, PRInt32 >, nsBaseHashtable< nsCStringHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIXULPrototypeDocument >, nsIXULPrototypeDocument * >, nsBaseHashtable< nsVoidHashKey, nsCOMPtr< nsIAccessNode >, nsIAccessNode * >, nsBaseHashtable< nsStringHashKey, nsString, nsString >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< nsIDOMStorage >, nsIDOMStorage * >, nsBaseHashtable< KeyClass, nsCOMPtr< Interface >, Interface * >, nsBaseHashtable< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtable< nsDepCharHashKey, nsAutoPtr< CategoryNode >, CategoryNode * >, nsBaseHashtable< nsISupportsHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIRDFResource >, nsIRDFResource * >, nsBaseHashtable< IDKey, nsTArray< nsCString > *, nsTArray< nsCString > * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIObserver >, nsIObserver * >, nsBaseHashtable< nsStringHashKey, nsTreeImageCacheEntry, nsTreeImageCacheEntry >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< calITimezone >, calITimezone * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsXFormsMDGNode >, nsXFormsMDGNode * >, nsBaseHashtable< nsCStringHashKey, nsAutoPtr< nsPresState >, nsPresState * >, nsBaseHashtable< nsISupportsHashKey, nsCOMPtr< nsIWeakReference >, nsIWeakReference * >, nsBaseHashtable< nsUint32HashKey, nsCOMPtr< nsIXTFElementFactory >, nsIXTFElementFactory * >, nsBaseHashtable< nsVoidPtrHashKey, nsCOMPtr< nsIEventQueue >, nsIEventQueue * >, nsBaseHashtable< nsISupportsHashKey, RequestEntry, RequestEntry >, nsBaseHashtable< nsCStringHashKey, nsAutoPtr< SignonHashEntry >, SignonHashEntry * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttributeGroup >, nsISchemaAttributeGroup * >, nsBaseHashtable< nsAttrHashKey, nsCOMPtr< nsIDOMNode >, nsIDOMNode * >, nsBaseHashtable< JavaClassMemberKey, void *, void * >, nsBaseHashtable< nsStringHashKey, PRBool, PRBool >, nsBaseHashtable< IDKey, nsCString, nsCString >, nsBaseHashtable< nsUint32HashKey, float, float >, nsBaseHashtable< nsIDHashKey, nsRefPtr< ipcTargetData >, ipcTargetData * >, nsBaseHashtable< nsCStringHashKey, nsCString, nsCString >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaType >, nsISchemaType * >, nsBaseHashtable< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, nsBaseHashtable< KeyClass, DataType, DataType >, nsBaseHashtable< nsDepCharHashKey, nsAutoPtr< INIValue >, INIValue * >, nsBaseHashtable< nsISupportsHashKey, nsRefPtr< nsXBLBinding >, nsXBLBinding * >, nsBaseHashtable< nsVoidPtrHashKey, nsAutoPtr< DConnectInstance >, DConnectInstance * >, nsBaseHashtable< nsISupportsHashKey, RestyleData, RestyleData >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsICSSStyleSheet >, nsICSSStyleSheet * >, nsBaseHashtable< nsCStringHashKey, PRInt32, PRInt32 >, nsBaseHashtable< nsCStringHashKey, nsRefPtr< nsDownload >, nsDownload * >, nsBaseHashtable< PrincipalKey, nsCOMPtr< nsIPrincipal >, nsIPrincipal * >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< nsIURI >, nsIURI * >, nsBaseHashtable< nsISupportsHashKey, nsCString, nsCString >, nsBaseHashtable< nsPtrHashKey< nsIDOMWindow >, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIStreamListener >, nsIStreamListener * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIFile >, nsIFile * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIURI >, nsIURI * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIXBLDocumentInfo >, nsIXBLDocumentInfo * >, nsBaseHashtable< nsStringHashKey, const nsString *, const nsString * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIDOMStorage >, nsIDOMStorage * >, nsBaseHashtable< nsStringHashKey, nsAutoPtr< nsCounterList >, nsCounterList * >, nsBaseHashtable< nsISupportsHashKey, nsCOMPtr< nsXMLEventsListener >, nsXMLEventsListener * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttributeComponent >, nsISchemaAttributeComponent * >, nsBaseHashtable< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtable< nsVoidPtrHashKey, nsCOMPtr< nsIWeakReference >, nsIWeakReference * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIAtom >, nsIAtom * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttribute >, nsISchemaAttribute * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsXFormsNodeState >, nsXFormsNodeState * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsString >, nsString * >, nsBaseHashtable< nsURIHashKey, SheetLoadData *, SheetLoadData * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaElement >, nsISchemaElement * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIVariant >, nsIVariant * >, nsBaseHashtable< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIMetricsCollector >, nsIMetricsCollector * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIDOMHTMLInputElement >, nsIDOMHTMLInputElement * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISupports >, nsISupports * >, and nsBaseHashtable< nsISupportsHashKey, nsRefPtr< nsXFormsControlListItem >, nsXFormsControlListItem * >.

Definition at line 320 of file nsTHashtable.h.

{
  if (mTable.entrySize)
  {
    NS_ERROR("nsTHashtable::Init() should not be called twice.");
    return PR_TRUE;
  }

  static PLDHashTableOps sOps = 
  {
    ::PL_DHashAllocTable,
    ::PL_DHashFreeTable,
    s_GetKey,
    s_HashKey,
    s_MatchEntry,
    ::PL_DHashMoveEntryStub,
    s_ClearEntry,
    ::PL_DHashFinalizeStub,
    s_InitEntry
  };

  if (!EntryType::ALLOW_MEMMOVE)
  {
    sOps.moveEntry = s_CopyEntry;
  }
  
  if (!PL_DHashTableInit(&mTable, &sOps, nsnull, sizeof(EntryType), initSize))
  {
    // if failed, reset "flag"
    mTable.entrySize = 0;
    return PR_FALSE;
  }

  return PR_TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class EntryType>
PRBool nsTHashtable< EntryType >::IsInitialized ( ) const [inline]

Check whether the table has been initialized.

This can be useful for static hashtables.

Returns:
the initialization state of the class.

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 >, nsBaseHashtable< KeyClass, DataType, UserDataType >, nsBaseHashtable< nsURIHashKey, void *, void * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaModelGroup >, nsISchemaModelGroup * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIXFormsContextInfo >, nsIXFormsContextInfo * >, nsBaseHashtable< nsPtrHashKey< nsIDocument >, DocumentEntry, DocumentEntry >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchema >, nsISchema * >, nsBaseHashtable< nsISupportsHashKey, PRInt32, PRInt32 >, nsBaseHashtable< nsCStringHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIXULPrototypeDocument >, nsIXULPrototypeDocument * >, nsBaseHashtable< nsVoidHashKey, nsCOMPtr< nsIAccessNode >, nsIAccessNode * >, nsBaseHashtable< nsStringHashKey, nsString, nsString >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< nsIDOMStorage >, nsIDOMStorage * >, nsBaseHashtable< KeyClass, nsCOMPtr< Interface >, Interface * >, nsBaseHashtable< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtable< nsDepCharHashKey, nsAutoPtr< CategoryNode >, CategoryNode * >, nsBaseHashtable< nsISupportsHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIRDFResource >, nsIRDFResource * >, nsBaseHashtable< IDKey, nsTArray< nsCString > *, nsTArray< nsCString > * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIObserver >, nsIObserver * >, nsBaseHashtable< nsStringHashKey, nsTreeImageCacheEntry, nsTreeImageCacheEntry >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< calITimezone >, calITimezone * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsXFormsMDGNode >, nsXFormsMDGNode * >, nsBaseHashtable< nsCStringHashKey, nsAutoPtr< nsPresState >, nsPresState * >, nsBaseHashtable< nsISupportsHashKey, nsCOMPtr< nsIWeakReference >, nsIWeakReference * >, nsBaseHashtable< nsUint32HashKey, nsCOMPtr< nsIXTFElementFactory >, nsIXTFElementFactory * >, nsBaseHashtable< nsVoidPtrHashKey, nsCOMPtr< nsIEventQueue >, nsIEventQueue * >, nsBaseHashtable< nsISupportsHashKey, RequestEntry, RequestEntry >, nsBaseHashtable< nsCStringHashKey, nsAutoPtr< SignonHashEntry >, SignonHashEntry * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttributeGroup >, nsISchemaAttributeGroup * >, nsBaseHashtable< nsAttrHashKey, nsCOMPtr< nsIDOMNode >, nsIDOMNode * >, nsBaseHashtable< JavaClassMemberKey, void *, void * >, nsBaseHashtable< nsStringHashKey, PRBool, PRBool >, nsBaseHashtable< IDKey, nsCString, nsCString >, nsBaseHashtable< nsUint32HashKey, float, float >, nsBaseHashtable< nsIDHashKey, nsRefPtr< ipcTargetData >, ipcTargetData * >, nsBaseHashtable< nsCStringHashKey, nsCString, nsCString >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaType >, nsISchemaType * >, nsBaseHashtable< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, nsBaseHashtable< KeyClass, DataType, DataType >, nsBaseHashtable< nsDepCharHashKey, nsAutoPtr< INIValue >, INIValue * >, nsBaseHashtable< nsISupportsHashKey, nsRefPtr< nsXBLBinding >, nsXBLBinding * >, nsBaseHashtable< nsVoidPtrHashKey, nsAutoPtr< DConnectInstance >, DConnectInstance * >, nsBaseHashtable< nsISupportsHashKey, RestyleData, RestyleData >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsICSSStyleSheet >, nsICSSStyleSheet * >, nsBaseHashtable< nsCStringHashKey, PRInt32, PRInt32 >, nsBaseHashtable< nsCStringHashKey, nsRefPtr< nsDownload >, nsDownload * >, nsBaseHashtable< PrincipalKey, nsCOMPtr< nsIPrincipal >, nsIPrincipal * >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< nsIURI >, nsIURI * >, nsBaseHashtable< nsISupportsHashKey, nsCString, nsCString >, nsBaseHashtable< nsPtrHashKey< nsIDOMWindow >, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIStreamListener >, nsIStreamListener * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIFile >, nsIFile * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIURI >, nsIURI * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIXBLDocumentInfo >, nsIXBLDocumentInfo * >, nsBaseHashtable< nsStringHashKey, const nsString *, const nsString * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIDOMStorage >, nsIDOMStorage * >, nsBaseHashtable< nsStringHashKey, nsAutoPtr< nsCounterList >, nsCounterList * >, nsBaseHashtable< nsISupportsHashKey, nsCOMPtr< nsXMLEventsListener >, nsXMLEventsListener * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttributeComponent >, nsISchemaAttributeComponent * >, nsBaseHashtable< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtable< nsVoidPtrHashKey, nsCOMPtr< nsIWeakReference >, nsIWeakReference * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIAtom >, nsIAtom * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttribute >, nsISchemaAttribute * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsXFormsNodeState >, nsXFormsNodeState * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsString >, nsString * >, nsBaseHashtable< nsURIHashKey, SheetLoadData *, SheetLoadData * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaElement >, nsISchemaElement * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIVariant >, nsIVariant * >, nsBaseHashtable< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIMetricsCollector >, nsIMetricsCollector * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIDOMHTMLInputElement >, nsIDOMHTMLInputElement * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISupports >, nsISupports * >, and nsBaseHashtable< nsISupportsHashKey, nsRefPtr< nsXFormsControlListItem >, nsXFormsControlListItem * >.

Definition at line 134 of file nsTHashtable.h.

{ return mTable.entrySize; }

Here is the caller graph for this function:

template<class EntryType>
nsTHashtable<EntryType>& nsTHashtable< EntryType >::operator= ( nsTHashtable< EntryType > &  toEqual) [private]
template<class EntryType>
EntryType* nsTHashtable< EntryType >::PutEntry ( KeyType  aKey) [inline]

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:

template<class EntryType>
void nsTHashtable< EntryType >::RawRemoveEntry ( EntryType *  aEntry) [inline]

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.

Here is the caller graph for this function:

template<class EntryType>
void nsTHashtable< EntryType >::RemoveEntry ( KeyType  aKey) [inline]

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:

template<class EntryType >
void nsTHashtable< EntryType >::s_ClearEntry ( PLDHashTable table,
PLDHashEntryHdr entry 
) [static, protected]

Definition at line 400 of file nsTHashtable.h.

{
  NS_REINTERPRET_CAST(EntryType*,entry)->~EntryType();
}
template<class EntryType >
void nsTHashtable< EntryType >::s_CopyEntry ( PLDHashTable table,
const PLDHashEntryHdr from,
PLDHashEntryHdr to 
) [static, protected]

Definition at line 386 of file nsTHashtable.h.

{
  EntryType* fromEntry =
    NS_CONST_CAST(EntryType*, NS_REINTERPRET_CAST(const EntryType*, from));

  new(to) EntryType(*fromEntry);

  fromEntry->~EntryType();
}
template<class EntryType >
PLDHashOperator nsTHashtable< EntryType >::s_EnumStub ( PLDHashTable table,
PLDHashEntryHdr entry,
PRUint32  number,
void arg 
) [static, protected]

Reimplemented in nsBaseHashtable< KeyClass, DataType, UserDataType >, nsBaseHashtable< nsURIHashKey, void *, void * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaModelGroup >, nsISchemaModelGroup * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIXFormsContextInfo >, nsIXFormsContextInfo * >, nsBaseHashtable< nsPtrHashKey< nsIDocument >, DocumentEntry, DocumentEntry >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchema >, nsISchema * >, nsBaseHashtable< nsISupportsHashKey, PRInt32, PRInt32 >, nsBaseHashtable< nsCStringHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIXULPrototypeDocument >, nsIXULPrototypeDocument * >, nsBaseHashtable< nsVoidHashKey, nsCOMPtr< nsIAccessNode >, nsIAccessNode * >, nsBaseHashtable< nsStringHashKey, nsString, nsString >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< nsIDOMStorage >, nsIDOMStorage * >, nsBaseHashtable< KeyClass, nsCOMPtr< Interface >, Interface * >, nsBaseHashtable< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtable< nsDepCharHashKey, nsAutoPtr< CategoryNode >, CategoryNode * >, nsBaseHashtable< nsISupportsHashKey, PRUint32, PRUint32 >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIRDFResource >, nsIRDFResource * >, nsBaseHashtable< IDKey, nsTArray< nsCString > *, nsTArray< nsCString > * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIObserver >, nsIObserver * >, nsBaseHashtable< nsStringHashKey, nsTreeImageCacheEntry, nsTreeImageCacheEntry >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< calITimezone >, calITimezone * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsXFormsMDGNode >, nsXFormsMDGNode * >, nsBaseHashtable< nsCStringHashKey, nsAutoPtr< nsPresState >, nsPresState * >, nsBaseHashtable< nsISupportsHashKey, nsCOMPtr< nsIWeakReference >, nsIWeakReference * >, nsBaseHashtable< nsUint32HashKey, nsCOMPtr< nsIXTFElementFactory >, nsIXTFElementFactory * >, nsBaseHashtable< nsVoidPtrHashKey, nsCOMPtr< nsIEventQueue >, nsIEventQueue * >, nsBaseHashtable< nsISupportsHashKey, RequestEntry, RequestEntry >, nsBaseHashtable< nsCStringHashKey, nsAutoPtr< SignonHashEntry >, SignonHashEntry * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttributeGroup >, nsISchemaAttributeGroup * >, nsBaseHashtable< nsAttrHashKey, nsCOMPtr< nsIDOMNode >, nsIDOMNode * >, nsBaseHashtable< JavaClassMemberKey, void *, void * >, nsBaseHashtable< nsStringHashKey, PRBool, PRBool >, nsBaseHashtable< IDKey, nsCString, nsCString >, nsBaseHashtable< nsUint32HashKey, float, float >, nsBaseHashtable< nsIDHashKey, nsRefPtr< ipcTargetData >, ipcTargetData * >, nsBaseHashtable< nsCStringHashKey, nsCString, nsCString >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaType >, nsISchemaType * >, nsBaseHashtable< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, nsBaseHashtable< KeyClass, DataType, DataType >, nsBaseHashtable< nsDepCharHashKey, nsAutoPtr< INIValue >, INIValue * >, nsBaseHashtable< nsISupportsHashKey, nsRefPtr< nsXBLBinding >, nsXBLBinding * >, nsBaseHashtable< nsVoidPtrHashKey, nsAutoPtr< DConnectInstance >, DConnectInstance * >, nsBaseHashtable< nsISupportsHashKey, RestyleData, RestyleData >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsICSSStyleSheet >, nsICSSStyleSheet * >, nsBaseHashtable< nsCStringHashKey, PRInt32, PRInt32 >, nsBaseHashtable< nsCStringHashKey, nsRefPtr< nsDownload >, nsDownload * >, nsBaseHashtable< PrincipalKey, nsCOMPtr< nsIPrincipal >, nsIPrincipal * >, nsBaseHashtable< nsCStringHashKey, nsCOMPtr< nsIURI >, nsIURI * >, nsBaseHashtable< nsISupportsHashKey, nsCString, nsCString >, nsBaseHashtable< nsPtrHashKey< nsIDOMWindow >, PRUint32, PRUint32 >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIStreamListener >, nsIStreamListener * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIFile >, nsIFile * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIURI >, nsIURI * >, nsBaseHashtable< nsURIHashKey, nsCOMPtr< nsIXBLDocumentInfo >, nsIXBLDocumentInfo * >, nsBaseHashtable< nsStringHashKey, const nsString *, const nsString * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIDOMStorage >, nsIDOMStorage * >, nsBaseHashtable< nsStringHashKey, nsAutoPtr< nsCounterList >, nsCounterList * >, nsBaseHashtable< nsISupportsHashKey, nsCOMPtr< nsXMLEventsListener >, nsXMLEventsListener * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttributeComponent >, nsISchemaAttributeComponent * >, nsBaseHashtable< KeyClass, nsAutoPtr< T >, T * >, nsBaseHashtable< nsVoidPtrHashKey, nsCOMPtr< nsIWeakReference >, nsIWeakReference * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIAtom >, nsIAtom * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaAttribute >, nsISchemaAttribute * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsXFormsNodeState >, nsXFormsNodeState * >, nsBaseHashtable< nsISupportsHashKey, nsAutoPtr< nsString >, nsString * >, nsBaseHashtable< nsURIHashKey, SheetLoadData *, SheetLoadData * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISchemaElement >, nsISchemaElement * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIVariant >, nsIVariant * >, nsBaseHashtable< KeyClass, nsRefPtr< RefPtr >, RefPtr * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIMetricsCollector >, nsIMetricsCollector * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsIDOMHTMLInputElement >, nsIDOMHTMLInputElement * >, nsBaseHashtable< nsStringHashKey, nsCOMPtr< nsISupports >, nsISupports * >, and nsBaseHashtable< nsISupportsHashKey, nsRefPtr< nsXFormsControlListItem >, nsXFormsControlListItem * >.

Definition at line 418 of file nsTHashtable.h.

{
  // dereferences the function-pointer to the user's enumeration function
  return (* NS_REINTERPRET_CAST(s_EnumArgs*,arg)->userFunc)(
    NS_REINTERPRET_CAST(EntryType*,entry),
    NS_REINTERPRET_CAST(s_EnumArgs*,arg)->userArg);
}
template<class EntryType >
const void * nsTHashtable< EntryType >::s_GetKey ( PLDHashTable table,
PLDHashEntryHdr entry 
) [static, protected]

Definition at line 360 of file nsTHashtable.h.

{
  return ((EntryType*) entry)->GetKeyPointer();
}
template<class EntryType >
PLDHashNumber nsTHashtable< EntryType >::s_HashKey ( PLDHashTable table,
const void key 
) [static, protected]

Definition at line 368 of file nsTHashtable.h.

Here is the call graph for this function:

template<class EntryType >
PRBool nsTHashtable< EntryType >::s_InitEntry ( PLDHashTable table,
PLDHashEntryHdr entry,
const void key 
) [static, protected]

Definition at line 408 of file nsTHashtable.h.

{
  new(entry) EntryType(NS_REINTERPRET_CAST(KeyTypePointer,key));
  return PR_TRUE;
}
template<class EntryType >
PRBool nsTHashtable< EntryType >::s_MatchEntry ( PLDHashTable table,
const PLDHashEntryHdr entry,
const void key 
) [static, protected]

Definition at line 376 of file nsTHashtable.h.

{
  return ((const EntryType*) entry)->KeyEquals(
    NS_REINTERPRET_CAST(const KeyTypePointer, key));
}

Member Data Documentation

template<class EntryType>
PLDHashTable nsTHashtable< EntryType >::mTable [protected]

Definition at line 252 of file nsTHashtable.h.


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