Public Types | Public Member Functions | Static Public Member Functions

nsCharPtrHashKey Class Reference

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...

#include <nsHashKeys.h>

Inheritance diagram for nsCharPtrHashKey:
Collaboration diagram for nsCharPtrHashKey:

List of all members.

Public Types

enum  { ALLOW_MEMMOVE = 1 }
typedef const char * KeyType
typedef const char * KeyTypePointer

Public Member Functions

 nsCharPtrHashKey (const char *aKey)
 nsCharPtrHashKey (const nsCharPtrHashKey &toCopy)
 ~nsCharPtrHashKey ()
const char * GetKey () const
PRBool KeyEquals (KeyTypePointer aKey) const

Static Public Member Functions

static KeyTypePointer KeyToPointer (KeyType aKey)
static PLDHashNumber HashKey (KeyTypePointer aKey)

Detailed Description

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.


Member Typedef Documentation

typedef const char* nsCharPtrHashKey::KeyType
typedef const char* nsCharPtrHashKey::KeyTypePointer

Member Enumeration Documentation

anonymous enum
Enumerator:
ALLOW_MEMMOVE 

Constructor & Destructor Documentation

nsCharPtrHashKey::nsCharPtrHashKey ( const char *  aKey  )  [inline]
nsCharPtrHashKey::nsCharPtrHashKey ( const nsCharPtrHashKey toCopy  )  [inline]
nsCharPtrHashKey::~nsCharPtrHashKey (  )  [inline]

Member Function Documentation

const char* nsCharPtrHashKey::GetKey (  )  const [inline]
static PLDHashNumber nsCharPtrHashKey::HashKey ( KeyTypePointer  aKey  )  [inline, static]
PRBool nsCharPtrHashKey::KeyEquals ( KeyTypePointer  aKey  )  const [inline]
static KeyTypePointer nsCharPtrHashKey::KeyToPointer ( KeyType  aKey  )  [inline, static]

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