sourcemod/core/CConVarManager.h
David Anderson 682e7d4ab6 fixed build on linux problems
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40470
2007-02-11 00:17:54 +00:00

56 lines
1.6 KiB
C++

/**
* ===============================================================
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
* ===============================================================
*
* This file is not open source and may not be copied without explicit
* written permission of AlliedModders LLC. This file may not be redistributed
* in whole or significant part.
* For information, see LICENSE.txt or http://www.sourcemod.net/license.php
*
* Version: $Id$
*/
#ifndef _INCLUDE_SOURCEMOD_CCONVARMANAGER_H_
#define _INCLUDE_SOURCEMOD_CCONVARMANAGER_H_
#include "sm_globals.h"
#include "sourcemm_api.h"
#include "HandleSys.h"
#include "sm_trie.h"
#include <IRootConsoleMenu.h>
class CConVarManager :
public SMGlobalClass,
public IHandleTypeDispatch,
public IRootConsoleCommand
{
public:
CConVarManager();
~CConVarManager();
public: // SMGlobalClass
void OnSourceModAllInitialized();
void OnSourceModShutdown();
public: // IHandleTypeDispatch
void OnHandleDestroy(HandleType_t type, void *object);
public: //IRootConsoleCommand
void OnRootConsoleCommand(const char *command, unsigned int argcount);
public:
inline HandleType_t GetHandleType()
{
return m_ConVarType;
}
public:
Handle_t CreateConVar(IPluginContext *pContext, const char *name, const char *defaultVal, const char *helpText,
int flags, bool hasMin, float min, bool hasMax, float max);
Handle_t FindConVar(const char* name);
private:
HandleType_t m_ConVarType;
Trie *m_CvarCache;
};
extern CConVarManager g_ConVarManager;
#endif // _INCLUDE_SOURCEMOD_CCONVARMANAGER_H_