Public Types | Public Member Functions

nsClassHashtable< KeyClass, T > Class Template Reference

templated hashtable class maps keys to C++ object pointers. More...

#include <nsClassHashtable.h>

Inheritance diagram for nsClassHashtable< KeyClass, T >:
Collaboration diagram for nsClassHashtable< KeyClass, T >:

List of all members.

Public Types

typedef KeyClass::KeyType KeyType
 KeyType is typedef'ed for ease of use.
typedef T * UserDataType

Public Member Functions

PRBool Get (KeyType aKey, UserDataType *pData) const

Detailed Description

template<class KeyClass, class T>
class nsClassHashtable< KeyClass, T >

templated hashtable class maps keys to C++ object pointers.

See nsBaseHashtable for complete declaration.

Parameters:
KeyClass a wrapper-class for the hashtable key, see nsHashKeys.h for a complete specification.
Class the class-type being wrapped
See also:
nsInterfaceHashtable, nsClassHashtable

Member Typedef Documentation

template<class KeyClass, class T>
typedef KeyClass::KeyType nsClassHashtable< KeyClass, T >::KeyType

KeyType is typedef'ed for ease of use.

Reimplemented from nsBaseHashtable< KeyClass, nsAutoPtr< T >, T * >.

template<class KeyClass, class T>
typedef T* nsClassHashtable< KeyClass, T >::UserDataType

Member Function Documentation

template<class KeyClass, class T>
PRBool nsClassHashtable< KeyClass, T >::Get ( KeyType  aKey,
UserDataType pData 
) const

retrieve the value for a key.

Parameters:
aKey the key to retreive
pData data 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.
Parameters:
pData if the key doesn't exist, pData will be set to nsnull.

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