Public Member Functions

SourceMod::IBasicTrie Class Reference

A "Trie" data type. More...

#include <public/IADTFactory.h>

List of all members.

Public Member Functions

virtual bool Insert (const char *key, void *value)=0
 Inserts a key/value pair.
virtual bool Retrieve (const char *key, void **value)=0
 Retrieves the value of a key.
virtual bool Delete (const char *key)=0
 Deletes a key.
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.

Detailed Description

A "Trie" data type.

Definition at line 50 of file IADTFactory.h.


Member Function Documentation

virtual bool SourceMod::IBasicTrie::Insert ( const char *  key,
void *  value 
) [pure virtual]

Inserts a key/value pair.

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

Retrieves the value of a key.

Parameters:
key Key string (null terminated).
value Optional pointer to store value pointer.
Returns:
True on success, false if key was not found.
virtual bool SourceMod::IBasicTrie::Delete ( const char *  key  )  [pure virtual]

Deletes a key.

Parameters:
key Key string (null terminated).
Returns:
True on success, false if key was not found.
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:
key Key string (null terminated).
value Value pointer (may be anything).
Returns:
True on success, false on failure.

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