Public Types | Public Member Functions | Static Public Member Functions

nsDepCharHashKey Class Reference

hashkey wrapper for "dependent" const char*; this class does not "own" its string pointer. More...

#include <nsHashKeys.h>

Inheritance diagram for nsDepCharHashKey:
Collaboration diagram for nsDepCharHashKey:

List of all members.

Public Types

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

Public Member Functions

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

Static Public Member Functions

static const char * KeyToPointer (const char *aKey)
static PLDHashNumber HashKey (const char *aKey)

Detailed Description

hashkey wrapper for "dependent" const char*; this class does not "own" its string pointer.

This class must only be used if the strings have a lifetime longer than the hashtable they occupy. This normally occurs only for static strings or strings that have been arena-allocated.

See also:
nsTHashtable::EntryType for specification

Member Typedef Documentation

typedef const char* nsDepCharHashKey::KeyType
typedef const char* nsDepCharHashKey::KeyTypePointer

Member Enumeration Documentation

anonymous enum
Enumerator:
ALLOW_MEMMOVE 

Constructor & Destructor Documentation

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

Member Function Documentation

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

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