|
Unicorn XML Toolkit Version 1.50.00 |
|||||||||
� PREV CLASS ��NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
template<class TYPE> class XHashTable { public: XHashTable(int nSize); XHashTable(const XHashTable &source); ~XHashTable(); public: int GetCount(); TYPE *Enter(const WCHAR *pszKey); TYPE *Find(const WCHAR *pszKey); void Remove(const WCHAR *pszKey); };
The simple hash table template.
Constructor/Destructor Summary | |
XHashTable
(int nSize);
����������Constructs the empty hash table with the given initial size. |
|
XHashTable
(const XHashTable &source);
����������Constructs the hash table copying all entries from the specified source hash table. |
|
~XHashTable
();
����������Destroys the hash table. |
Function Summary | |
int
|
GetCount
();
����������Returns a number of keys in this hash table. |
TYPE�*
|
Enter
(const WCHAR *pszKey);
����������Enters a new key in this hash table, returns pointer to a storage area allocated to keep corresponding data. |
TYPE�*
|
Find
(const WCHAR *pszKey);
����������Looks up the specified key in this hash table. |
void
|
Remove
(const WCHAR *pszKey);
����������Removes the specified key from this hash table. |
Constructor/Destructor Detail |
XHashTable(int nSize);
Constructs the empty hash table with the given initial size.
nSize
- the initial table sizeXHashTable(const XHashTable &source);
Constructs the hash table copying all entries from the specified source hash table.
source
- the hash table to copy~XHashTable();
Destroys the hash table.
Function Detail |
int GetCount();
Returns a number of keys in this hash table.
TYPE *Enter(const WCHAR *pszKey);
Enters a new key in this hash table, returns pointer to a storage area allocated to keep corresponding data.
If the specified key is already present in this hash table, no changes is made and the pointer to the previously allocated storage is returned; otherwise the specified key is added to the hash table and the new data storage area is allocated.
pszKey
- the keyTYPE *Find(const WCHAR *pszKey);
Looks up the specified key in this hash table.
pszKey
- the key to look upNULL
if the key is not found in this hash tablevoid Remove(const WCHAR *pszKey);
Removes the specified key from this hash table.
The function has no effect is the specified key is not found in this hash table.
pszKey
- the key to remove
|
Unicorn XML Toolkit Version 1.50.00 |
|||||||||
� PREV CLASS ��NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |