2007-06-30 18:43:11 +02:00
|
|
|
#include <IADTFactory.h>
|
|
|
|
#include "sm_globals.h"
|
|
|
|
#include "sm_trie.h"
|
|
|
|
|
|
|
|
using namespace SourceMod;
|
|
|
|
|
|
|
|
class BaseTrie : public IBasicTrie
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
BaseTrie();
|
|
|
|
virtual ~BaseTrie();
|
|
|
|
virtual bool Insert(const char *key, void *value);
|
2007-07-08 05:17:29 +02:00
|
|
|
virtual bool Replace(const char *key, void *value);
|
2007-06-30 18:43:11 +02:00
|
|
|
virtual bool Retrieve(const char *key, void **value);
|
|
|
|
virtual bool Delete(const char *key);
|
|
|
|
virtual void Clear();
|
|
|
|
virtual void Destroy();
|
|
|
|
private:
|
|
|
|
Trie *m_pTrie;
|
|
|
|
};
|
|
|
|
|
|
|
|
class ADTFactory :
|
|
|
|
public SMGlobalClass,
|
|
|
|
public IADTFactory
|
|
|
|
{
|
|
|
|
public: //SMInterface
|
|
|
|
const char *GetInterfaceName();
|
|
|
|
unsigned int GetInterfaceVersion();
|
|
|
|
public: //SMGlobalClass
|
|
|
|
void OnSourceModAllInitialized();
|
|
|
|
public: //IADTFactory
|
|
|
|
IBasicTrie *CreateBasicTrie();
|
|
|
|
};
|
|
|
|
|