SourceMod SDK  1.7
SourceMod::IBasicTrie Class Referenceabstract

A hash table data type. More...

#include <public/IADTFactory.h>

Public Member Functions

virtual bool Insert (const char *key, void *value)=0
 Inserts a key/value pair. More...
 
virtual bool Retrieve (const char *key, void **value)=0
 Retrieves the value of a key. More...
 
virtual bool Delete (const char *key)=0
 Deletes a key. More...
 
virtual void Clear ()=0
 Flushes the entire trie of all keys.
 
virtual void Destroy ()=0
 Destroys the IBasicTrie object and frees all associated memory.
 
virtual bool Replace (const char *key, void *value)=0
 Inserts a key/value pair, replacing an old inserted value if it already exists. More...
 

Detailed Description

A hash table data type.

Member Function Documentation

virtual bool SourceMod::IBasicTrie::Delete ( const char *  key)
pure virtual

Deletes a key.

Parameters
keyKey string (null terminated).
Returns
True on success, false if key was not found.
virtual bool SourceMod::IBasicTrie::Insert ( const char *  key,
void *  value 
)
pure virtual

Inserts a key/value pair.

Parameters
keyKey string (null terminated).
valueValue pointer (may be anything).
Returns
True on success, false if key already exists.
virtual bool SourceMod::IBasicTrie::Replace ( const char *  key,
void *  value 
)
pure virtual

Inserts a key/value pair, replacing an old inserted value if it already exists.

Parameters
keyKey string (null terminated).
valueValue pointer (may be anything).
Returns
True on success, false on failure.
virtual bool SourceMod::IBasicTrie::Retrieve ( const char *  key,
void **  value 
)
pure virtual

Retrieves the value of a key.

Parameters
keyKey string (null terminated).
valueOptional pointer to store value pointer.
Returns
True on success, false if key was not found.

The documentation for this class was generated from the following file: