sbHashtableUtils.h File Reference
#include <nsIMutableArray.h>
#include <nsDataHashtable.h>
#include <nsTArray.h>
Include dependency graph for sbHashtableUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<class T >
PLDHashOperator HashCopierEnumerator (typename T::KeyType aKey, typename T::DataType aData, void *userArg)
 
template<class T >
nsresult sbCopyHashtable (typename T::Hashtable const &aSource, typename T::Hashtable &aDest)
 
template<class E >
PLDHashOperator THashCOMPtrCopierToIArrayEnumerator (E *aKey, void *userArg)
 
template<class T >
nsresult sbCopyHashtableToArray (class nsTHashtable< T > &aSource, nsIMutableArray *aDest)
 

Function Documentation

template<class T >
PLDHashOperator HashCopierEnumerator ( typename T::KeyType  aKey,
typename T::DataType  aData,
void *  userArg 
)

Enumerate function to copy hash elements

Definition at line 37 of file sbHashtableUtils.h.

template<class T >
nsresult sbCopyHashtable ( typename T::Hashtable const &  aSource,
typename T::Hashtable &  aDest 
)

Copies one hash table to another Mozilla hash table classes do not have proper traits so users must provide a traits class representing the hashtable class, key and data types. T must be a traits class containing Hashtable, KeyType, and DataType entries describing the hashable Example: struct MyHashtableTraits { typedef nsHashtable<TheKeyType, TheDataType> Hashtable; typedef TheKeyType KeyType; typedef TheDataType DataType; };

Definition at line 65 of file sbHashtableUtils.h.

template<class T >
nsresult sbCopyHashtableToArray ( class nsTHashtable< T > &  aSource,
nsIMutableArray *  aDest 
)

Copies one hash table to a nsIMutableArray

Definition at line 95 of file sbHashtableUtils.h.

Here is the caller graph for this function:

template<class E >
PLDHashOperator THashCOMPtrCopierToIArrayEnumerator ( E aKey,
void *  userArg 
)

Enumerate function to copy hash elements into a nsIMutableArray

Definition at line 78 of file sbHashtableUtils.h.