Added amb1600: trie natives

This commit is contained in:
Steve Dudenhoeffer
2008-04-14 19:52:11 +00:00
parent 683f453b6f
commit 53ed817183
9 changed files with 732 additions and 2 deletions

View File

@ -22,6 +22,7 @@
#include <vector>
#include <sorting>
#include <cellarray>
#include <celltrie>
#include <newmenus>
/* Function is called just after server activation.

View File

@ -0,0 +1,26 @@
#if defined _celltrie_included
#endinput
#endif
#define _celltrie_included
enum Trie
{
Invalid_Trie = 0
};
native Trie:TrieCreate();
native TrieClear(Trie:handle);
native TrieSetCell(Trie:handle, const key[], any:value);
native TrieSetString(Trie:handle, const key[], const value[]);
native TrieSetArray(Trie:handle, const key[], const any:buffer[], size);
native bool:TrieGetCell(Trie:handle, const key[], &any:value);
native bool:TrieGetString(Trie:handle, const key[], output[], outputsize);
native bool:TrieGetArray(Trie:handle, const key[], any:output[], outputsize);
native bool:TrieDeleteKey(Trie:handle, const key[]);
native bool:TrieKeyExists(Trie:handle, const key[]);
native TrieDestroy(&Trie:handle);