|
wavelength 1.0.0
|
Hash table of the names of the files and directories of an archive. More...
#include <arkhash.h>
Public Member Functions | |
| ArkHash () | |
| Construct an empty table. | |
| int | GetHashValue (const char *pszName) const |
| Find the slot of a name, probing the following slots in turn. | |
| void | Read (BinStream &stream) |
| Replace the table with the one a stream stores. | |
| ArkHash () | |
| Create an empty table. | |
| ~ArkHash () | |
| Free the strings and the table. | |
| int | GetHashValue (const char *str) |
| Find a string. | |
| void | Read (BinStream &stream) |
| Replace the strings and the table with the ones a stream stores. | |
Public Attributes | |
| char * | mHeap |
| char * | mHeapEnd |
| char * | mFree |
Hash table of the names of the files and directories of an archive.
Open-addressed hash table of the archive's file and directory names.
The class is not polymorphic and emits no RTTI. The name is taken from the tag of its allocations. The stream stores the offset of each name in the string block, which Read() converts in place to a pointer into mStrings. Zero marks an empty slot.
The object is 0x14 bytes. The class name comes from the allocation name ArkHash.
| ArkHash::ArkHash | ( | ) |
Construct an empty table.
| ArkHash::ArkHash | ( | ) |
Create an empty table.
| ArkHash::~ArkHash | ( | ) |
Free the strings and the table.
| int ArkHash::GetHashValue | ( | const char * | pszName | ) | const |
Find the slot of a name, probing the following slots in turn.
| pszName | The name. |
| void ArkHash::Read | ( | BinStream & | stream | ) |
Replace the table with the one a stream stores.
| stream | The stream. |
| int ArkHash::GetHashValue | ( | const char * | str | ) |
Find a string.
| str | The string. |
| void ArkHash::Read | ( | BinStream & | stream | ) |
Replace the strings and the table with the ones a stream stores.
The stream stores the size of the strings, the strings, the number of slots, and one offset into the strings per slot, where zero marks an empty slot.
| stream | The stream. |
| char* ArkHash::mHeap |
The strings.
| char* ArkHash::mHeapEnd |
One past the strings.
| char* ArkHash::mFree |
One past the strings in use, the same as mHeapEnd.