core/ADTFactory.h
author Phong Dang <teame06@gmail.com>
Wed Aug 01 07:29:40 2007 +0000 (2007-08-01)
changeset 1241 2e8046793bc9
parent 1231 17badaf66ce4
child 1306 072c2812d70c
permissions -rw-r--r--
Added check to make sure player are alive to perform sm_slap, sm_burn, sm_slay.
dvander@1231
     1
/**
dvander@1231
     2
 * vim: set ts=4 :
dvander@1231
     3
 * ================================================================
dvander@1231
     4
 * SourceMod
dvander@1231
     5
 * Copyright (C) 2004-2007 AlliedModders LLC.  All rights reserved.
dvander@1231
     6
 * ================================================================
dvander@1231
     7
 *
dvander@1231
     8
 * This program is free software; you can redistribute it and/or 
dvander@1231
     9
 * modify it under the terms of the GNU General Public License, 
dvander@1231
    10
 * version 3.0, as published by the Free Software Foundation.
dvander@1231
    11
 * 
dvander@1231
    12
 * This program is distributed in the hope that it will be useful,
dvander@1231
    13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
dvander@1231
    14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
dvander@1231
    15
 * GNU General Public License for more details.
dvander@1231
    16
 *
dvander@1231
    17
 * You should have received a copy of the GNU General Public License
dvander@1231
    18
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
dvander@1231
    19
 *
dvander@1231
    20
 * As a special exception, AlliedModders LLC gives you permission to 
dvander@1231
    21
 * link the code of this program (as well as its derivative works) to 
dvander@1231
    22
 * "Half-Life 2," the "Source Engine," the "SourcePawn JIT," and any 
dvander@1231
    23
 * Game MODs that run on software by the Valve Corporation.  You must 
dvander@1231
    24
 * obey the GNU General Public License in all respects for all other 
dvander@1231
    25
 * code used. Additionally, AlliedModders LLC grants this exception 
dvander@1231
    26
 * to all derivative works. AlliedModders LLC defines further 
dvander@1231
    27
 * exceptions, found in LICENSE.txt (as of this writing, version 
dvander@1231
    28
 * JULY-31-2007), or <http://www.sourcemod.net/license.php>.
dvander@1231
    29
 *
dvander@1231
    30
 * Version: $Id$
dvander@1231
    31
 */
dvander@1231
    32
dvander@1028
    33
#include <IADTFactory.h>
dvander@1028
    34
#include "sm_globals.h"
dvander@1028
    35
#include "sm_trie.h"
dvander@1028
    36
dvander@1028
    37
using namespace SourceMod;
dvander@1028
    38
dvander@1028
    39
class BaseTrie : public IBasicTrie
dvander@1028
    40
{
dvander@1028
    41
public:
dvander@1028
    42
	BaseTrie();
dvander@1028
    43
	virtual ~BaseTrie();
dvander@1028
    44
	virtual bool Insert(const char *key, void *value);
dvander@1057
    45
	virtual bool Replace(const char *key, void *value);
dvander@1028
    46
	virtual bool Retrieve(const char *key, void **value);
dvander@1028
    47
	virtual bool Delete(const char *key);
dvander@1028
    48
	virtual void Clear();
dvander@1028
    49
	virtual void Destroy();
dvander@1028
    50
private:
dvander@1028
    51
	Trie *m_pTrie;
dvander@1028
    52
};
dvander@1028
    53
dvander@1028
    54
class ADTFactory : 
dvander@1028
    55
	public SMGlobalClass,
dvander@1028
    56
	public IADTFactory
dvander@1028
    57
{
dvander@1028
    58
public: //SMInterface
dvander@1028
    59
	const char *GetInterfaceName();
dvander@1028
    60
	unsigned int GetInterfaceVersion();
dvander@1028
    61
public: //SMGlobalClass
dvander@1028
    62
	void OnSourceModAllInitialized();
dvander@1028
    63
public: //IADTFactory
dvander@1028
    64
	IBasicTrie *CreateBasicTrie();
dvander@1028
    65
};
dvander@1028
    66