SourceMod SDK  1.7
IADTFactory.h
Go to the documentation of this file.
1 
32 #ifndef _INCLUDE_SOURCEMOD_ADT_FACTORY_H_
33 #define _INCLUDE_SOURCEMOD_ADT_FACTORY_H_
34 
35 #include <IShareSys.h>
36 
37 #define SMINTERFACE_ADTFACTORY_NAME "IADTFactory"
38 #define SMINTERFACE_ADTFACTORY_VERSION 2
39 
45 namespace SourceMod
46 {
50  class IBasicTrie
51  {
52  public:
60  virtual bool Insert(const char *key, void *value) =0;
61 
69  virtual bool Retrieve(const char *key, void **value) =0;
70 
77  virtual bool Delete(const char *key) =0;
78 
82  virtual void Clear() =0;
83 
88  virtual void Destroy() =0;
89 
98  virtual bool Replace(const char *key, void *value) =0;
99  };
100 
101  class IADTFactory : public SMInterface
102  {
103  public:
110  virtual IBasicTrie *CreateBasicTrie() =0;
111  };
112 }
113 
114 #endif //_INCLUDE_SOURCEMOD_ADT_FACTORY_H_
virtual bool Retrieve(const char *key, void **value)=0
Retrieves the value of a key.
A hash table data type.
Definition: IADTFactory.h:50
virtual void Destroy()=0
Destroys the IBasicTrie object and frees all associated memory.
virtual bool Delete(const char *key)=0
Deletes a key.
virtual bool Replace(const char *key, void *value)=0
Inserts a key/value pair, replacing an old inserted value if it already exists.
Defines the Share System, responsible for shared resources and dependencies.
Defines the base functionality required by a shared interface.
Definition: IShareSys.h:92
virtual bool Insert(const char *key, void *value)=0
Inserts a key/value pair.
Definition: IADTFactory.h:101
Definition: IAdminSystem.h:63
virtual void Clear()=0
Flushes the entire trie of all keys.
virtual IBasicTrie * CreateBasicTrie()=0
Creates a basic Trie object.