Classes | Typedefs | Functions

nsHashKeys.h File Reference

standard HashKey classes for nsBaseHashtable and relatives. More...

#include "nsID.h"
#include "nsISupports.h"
#include "nsIHashable.h"
#include "nsCOMPtr.h"
#include "pldhash.h"
#include <new>
#include "nsStringGlue.h"
#include "nsCRTGlue.h"
#include <stdlib.h>
#include <string.h>
Include dependency graph for nsHashKeys.h:
This graph shows which files directly or indirectly include this file:

Classes

class  nsStringHashKey
 hashkey wrapper using nsAString KeyType More...
class  nsCStringHashKey
 hashkey wrapper using nsACString KeyType More...
class  nsUint32HashKey
 hashkey wrapper using PRUint32 KeyType More...
class  nsUint64HashKey
 hashkey wrapper using PRUint64 KeyType More...
class  nsISupportsHashKey
 hashkey wrapper using nsISupports* KeyType More...
class  nsPtrHashKey< T >
 hashkey wrapper using T* KeyType More...
class  nsClearingPtrHashKey< T >
 hashkey wrapper using T* KeyType that sets key to NULL upon destruction. More...
class  nsIDHashKey
 hashkey wrapper using nsID KeyType More...
class  nsDepCharHashKey
 hashkey wrapper for "dependent" const char*; this class does not "own" its string pointer. More...
class  nsCharPtrHashKey
 hashkey wrapper for const char*; at construction, this class duplicates a string pointed to by the pointer so that it doesn't matter whether or not the string lives longer than the hash table. More...
class  nsUnicharPtrHashKey
 hashkey wrapper for const PRUnichar*; at construction, this class duplicates a string pointed to by the pointer so that it doesn't matter whether or not the string lives longer than the hash table. More...
class  nsHashableHashKey
 Hashtable key class to use with objects that support nsIHashable. More...

Typedefs

typedef nsPtrHashKey< const void > nsVoidPtrHashKey
typedef nsClearingPtrHashKey
< const void > 
nsClearingVoidPtrHashKey

Functions

PRUint32 HashString (const nsAString &aStr)
PRUint32 HashString (const nsACString &aStr)
PRUint32 HashString (const char *aKey)
PRUint32 HashString (const PRUnichar *aKey)

Detailed Description

standard HashKey classes for nsBaseHashtable and relatives.

Each of these classes follows the nsTHashtable::EntryType specification

Lightweight keytypes provided here: nsStringHashKey nsCStringHashKey nsUint32HashKey nsUint64HashKey nsPtrHashkey nsClearingPtrHashKey nsVoidPtrHashKey nsClearingVoidPtrHashKey nsISupportsHashKey nsIDHashKey nsDepCharHashKey nsCharPtrHashKey nsUnicharPtrHashKey nsHashableHashKey


Typedef Documentation

typedef nsPtrHashKey<const void> nsVoidPtrHashKey

Function Documentation

PRUint32 HashString ( const nsAString aStr  ) 
PRUint32 HashString ( const PRUnichar aKey  ) 
PRUint32 HashString ( const char *  aKey  ) 
PRUint32 HashString ( const nsACString aStr  )