Clean up include file.
This commit is contained in:
parent
9ac3763267
commit
0c1931284e
@ -25,75 +25,76 @@ enum Snapshot
|
|||||||
* been internally replaced with hash tables, which have O(1) insertion time
|
* been internally replaced with hash tables, which have O(1) insertion time
|
||||||
* instead of O(n).
|
* instead of O(n).
|
||||||
*
|
*
|
||||||
* @return New Map Handle, which must be freed via TrieDestroy().
|
* @return New Map handle, which must be freed via TrieDestroy().
|
||||||
*/
|
*/
|
||||||
native Trie:TrieCreate();
|
native Trie:TrieCreate();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears all entries from a Map.
|
* Clears all entries from a Map.
|
||||||
*
|
*
|
||||||
* @param handle Map Handle.
|
* @param handle Map handle.
|
||||||
*
|
*
|
||||||
* @error Invalid Handle.
|
* @error Invalid handle.
|
||||||
*/
|
*/
|
||||||
native TrieClear(Trie:handle);
|
native TrieClear(Trie:handle);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a value in a hash map, either inserting a new entry or replacing an old one.
|
* Sets a value in a hash map, either inserting a new entry or replacing an old one.
|
||||||
*
|
*
|
||||||
* @param handle Map Handle.
|
* @param handle Map handle.
|
||||||
* @param key Key string.
|
* @param key Key string.
|
||||||
* @param value Value to store at this key.
|
* @param value Value to store at this key.
|
||||||
* @param replace If false, operation will fail if the key is already set.
|
* @param replace If false, operation will fail if the key is already set.
|
||||||
*
|
*
|
||||||
* @return True on success, false on failure.
|
* @return True on success, false on failure.
|
||||||
* @error Invalid Handle.
|
* @error Invalid handle.
|
||||||
*/
|
*/
|
||||||
native TrieSetCell(Trie:handle, const key[], any:value, bool:replace = true);
|
native TrieSetCell(Trie:handle, const key[], any:value, bool:replace = true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a string value in a Map, either inserting a new entry or replacing an old one.
|
* Sets a string value in a Map, either inserting a new entry or replacing an old one.
|
||||||
*
|
*
|
||||||
* @param handle Map Handle.
|
* @param handle Map handle.
|
||||||
* @param key Key string.
|
* @param key Key string.
|
||||||
* @param value String to store.
|
* @param value String to store.
|
||||||
* @param replace If false, operation will fail if the key is already set.
|
* @param replace If false, operation will fail if the key is already set.
|
||||||
*
|
*
|
||||||
* @return True on success, false on failure.
|
* @return True on success, false on failure.
|
||||||
* @error Invalid Handle.
|
* @error Invalid handle.
|
||||||
*/
|
*/
|
||||||
native TrieSetString(Trie:handle, const key[], const value[], bool:replace = true);
|
native TrieSetString(Trie:handle, const key[], const value[], bool:replace = true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets an array value in a Map, either inserting a new entry or replacing an old one.
|
* Sets an array value in a Map, either inserting a new entry or replacing an old one.
|
||||||
*
|
*
|
||||||
* @param handle Map Handle.
|
* @param handle Map handle.
|
||||||
* @param key Key string.
|
* @param key Key string.
|
||||||
* @param buffer Array to store.
|
* @param buffer Array to store.
|
||||||
* @param size Number of items in the array.
|
* @param size Number of items in the array.
|
||||||
* @param replace If false, operation will fail if the key is already set.
|
* @param replace If false, operation will fail if the key is already set.
|
||||||
*
|
*
|
||||||
* @return True on success, false on failure.
|
* @return True on success, false on failure.
|
||||||
* @error Invalid Handle.
|
* @error Invalid handle.
|
||||||
|
* Invalid array size.
|
||||||
*/
|
*/
|
||||||
native TrieSetArray(Trie:handle, const key[], const any:buffer[], size, bool:replace = true);
|
native TrieSetArray(Trie:handle, const key[], const any:buffer[], size, bool:replace = true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves a value in a Map.
|
* Retrieves a value in a Map.
|
||||||
*
|
*
|
||||||
* @param handle Map Handle.
|
* @param handle Map handle.
|
||||||
* @param key Key string.
|
* @param key Key string.
|
||||||
* @param value Variable to store value.
|
* @param value Variable to store value.
|
||||||
* @return True on success. False if the key is not set, or the key is set
|
* @return True on success. False if the key is not set, or the key is set
|
||||||
* as an array or string (not a value).
|
* as an array or string (not a value).
|
||||||
* @error Invalid Handle.
|
* @error Invalid handle.
|
||||||
*/
|
*/
|
||||||
native bool:TrieGetCell(Trie:handle, const key[], &any:value);
|
native bool:TrieGetCell(Trie:handle, const key[], &any:value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves a string in a Map.
|
* Retrieves a string in a Map.
|
||||||
*
|
*
|
||||||
* @param handle Map Handle.
|
* @param handle Map handle.
|
||||||
* @param key Key string.
|
* @param key Key string.
|
||||||
* @param output Buffer to store value.
|
* @param output Buffer to store value.
|
||||||
* @param outputsize Maximum size of string buffer.
|
* @param outputsize Maximum size of string buffer.
|
||||||
@ -101,14 +102,15 @@ native bool:TrieGetCell(Trie:handle, const key[], &any:value);
|
|||||||
*
|
*
|
||||||
* @return True on success. False if the key is not set, or the key is set
|
* @return True on success. False if the key is not set, or the key is set
|
||||||
* as a value or array (not a string).
|
* as a value or array (not a string).
|
||||||
* @error Invalid Handle.
|
* @error Invalid handle.
|
||||||
|
* Invalid buffer size.
|
||||||
*/
|
*/
|
||||||
native bool:TrieGetString(Trie:handle, const key[], output[], outputsize, &size = 0);
|
native bool:TrieGetString(Trie:handle, const key[], output[], outputsize, &size = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves an array in a Map.
|
* Retrieves an array in a Map.
|
||||||
*
|
*
|
||||||
* @param handle Map Handle.
|
* @param handle Map handle.
|
||||||
* @param key Key string.
|
* @param key Key string.
|
||||||
* @param output Buffer to store array.
|
* @param output Buffer to store array.
|
||||||
* @param outputsize Maximum size of array buffer.
|
* @param outputsize Maximum size of array buffer.
|
||||||
@ -116,49 +118,50 @@ native bool:TrieGetString(Trie:handle, const key[], output[], outputsize, &size
|
|||||||
*
|
*
|
||||||
* @return True on success. False if the key is not set, or the key is set
|
* @return True on success. False if the key is not set, or the key is set
|
||||||
* as a value or string (not an array).
|
* as a value or string (not an array).
|
||||||
* @error Invalid Handle.
|
* @error Invalid handle.
|
||||||
|
* Invalid array size.
|
||||||
*/
|
*/
|
||||||
native bool:TrieGetArray(Trie:handle, const key[], any:output[], outputsize, &size = 0);
|
native bool:TrieGetArray(Trie:handle, const key[], any:output[], outputsize, &size = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes a key entry from a Map.
|
* Removes a key entry from a Map.
|
||||||
*
|
*
|
||||||
* @param handle Map Handle.
|
* @param handle Map handle.
|
||||||
* @param key Key string.
|
* @param key Key string.
|
||||||
*
|
*
|
||||||
* @return True on success, false if the value was never set.
|
* @return True on success, false if the value was never set.
|
||||||
* @error Invalid Handle.
|
* @error Invalid handle.
|
||||||
*/
|
*/
|
||||||
native bool:TrieDeleteKey(Trie:handle, const key[]);
|
native bool:TrieDeleteKey(Trie:handle, const key[]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks a key entry existence from a Map.
|
* Checks a key entry existence from a Map.
|
||||||
*
|
*
|
||||||
* @param handle Map Handle.
|
* @param handle Map handle.
|
||||||
* @param key Key string.
|
* @param key Key string.
|
||||||
*
|
*
|
||||||
* @return True on success, false if the value was never set.
|
* @return True on success, false if the value was never set.
|
||||||
* @error Invalid Handle.
|
* @error Invalid handle.
|
||||||
*/
|
*/
|
||||||
native bool:TrieKeyExists(Trie:handle, const key[]);
|
native bool:TrieKeyExists(Trie:handle, const key[]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroys a Map.
|
* Destroys a Map.
|
||||||
*
|
*
|
||||||
* @param handle Map Handle.
|
* @param handle Map handle.
|
||||||
*
|
*
|
||||||
* @return True on success, false if the value was never set.
|
* @return True on success, false if the value was never set.
|
||||||
* @error Invalid Handle.
|
* @error Invalid handle.
|
||||||
*/
|
*/
|
||||||
native TrieDestroy(&Trie:handle);
|
native TrieDestroy(&Trie:handle);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the number of elements in a map.
|
* Retrieves the number of elements in a map.
|
||||||
*
|
*
|
||||||
* @param handle Map Handle.
|
* @param handle Map handle.
|
||||||
*
|
*
|
||||||
* @return Number of elements in the trie.
|
* @return Number of elements in the trie.
|
||||||
* @error Invalid Handle.
|
* @error Invalid handle.
|
||||||
*/
|
*/
|
||||||
native TrieGetSize(Trie:handle);
|
native TrieGetSize(Trie:handle);
|
||||||
|
|
||||||
@ -181,7 +184,7 @@ native Snapshot:TrieSnapshotCreate(Trie:handle);
|
|||||||
* @param handle Map snapshot.
|
* @param handle Map snapshot.
|
||||||
*
|
*
|
||||||
* @return Number of keys.
|
* @return Number of keys.
|
||||||
* @error Invalid Handle.
|
* @error Invalid handle.
|
||||||
*/
|
*/
|
||||||
native TrieSnapshotLength(Snapshot:handle);
|
native TrieSnapshotLength(Snapshot:handle);
|
||||||
|
|
||||||
@ -193,7 +196,7 @@ native TrieSnapshotLength(Snapshot:handle);
|
|||||||
* @param index Key index (starting from 0).
|
* @param index Key index (starting from 0).
|
||||||
*
|
*
|
||||||
* @return Buffer size required to store the key string.
|
* @return Buffer size required to store the key string.
|
||||||
* @error Invalid Handle or index out of range.
|
* @error Invalid handle or index out of range.
|
||||||
*/
|
*/
|
||||||
native TrieSnapshotKeyBufferSize(Snapshot:handle, index);
|
native TrieSnapshotKeyBufferSize(Snapshot:handle, index);
|
||||||
|
|
||||||
@ -206,7 +209,7 @@ native TrieSnapshotKeyBufferSize(Snapshot:handle, index);
|
|||||||
* @param maxlength Maximum buffer length.
|
* @param maxlength Maximum buffer length.
|
||||||
*
|
*
|
||||||
* @return Number of bytes written to the buffer.
|
* @return Number of bytes written to the buffer.
|
||||||
* @error Invalid Handle or index out of range.
|
* @error Invalid handle or index out of range.
|
||||||
*/
|
*/
|
||||||
native TrieSnapshotGetKey(Snapshot:handle, index, buffer[], maxlength);
|
native TrieSnapshotGetKey(Snapshot:handle, index, buffer[], maxlength);
|
||||||
|
|
||||||
@ -216,6 +219,6 @@ native TrieSnapshotGetKey(Snapshot:handle, index, buffer[], maxlength);
|
|||||||
* @param handle Map snapshot.
|
* @param handle Map snapshot.
|
||||||
*
|
*
|
||||||
* @return True on success, false if the value was never set.
|
* @return True on success, false if the value was never set.
|
||||||
* @error Invalid Handle.
|
* @error Invalid handle.
|
||||||
*/
|
*/
|
||||||
native TrieSnapshotDestroy(&Snapshot:handle);
|
native TrieSnapshotDestroy(&Snapshot:handle);
|
||||||
|
Loading…
Reference in New Issue
Block a user