core/provider/console.h
author Scott Ehlert <ds@alliedmods.net>
Thu Oct 29 10:57:27 2009 -0500 (2009-10-29)
changeset 669 2ae87570fab2
parent 637 b66489d8aedc
child 725 9eec529c3caa
permissions -rw-r--r--
Added support for Left 4 Dead 2 (bug 4078, r=dvander).
     1 /**
     2  * vim: set ts=4 :
     3  * ======================================================
     4  * Metamod:Source
     5  * Copyright (C) 2004-2008 AlliedModders LLC and authors.
     6  * All rights reserved.
     7  * ======================================================
     8  *
     9  * This software is provided 'as-is', without any express or implied warranty.
    10  * In no event will the authors be held liable for any damages arising from 
    11  * the use of this software.
    12  * 
    13  * Permission is granted to anyone to use this software for any purpose, 
    14  * including commercial applications, and to alter it and redistribute it 
    15  * freely, subject to the following restrictions:
    16  *
    17  * 1. The origin of this software must not be misrepresented; you must not 
    18  * claim that you wrote the original software. If you use this software in a 
    19  * product, an acknowledgment in the product documentation would be 
    20  * appreciated but is not required.
    21  * 2. Altered source versions must be plainly marked as such, and must not be
    22  * misrepresented as being the original software.
    23  * 3. This notice may not be removed or altered from any source distribution.
    24  *
    25  * Version: $Id$
    26  */
    27 
    28 #ifndef _INCLUDE_CONSOLE_MMS_H_
    29 #define _INCLUDE_CONSOLE_MMS_H_
    30 
    31 #if defined _DEBUG
    32 #define DEBUG2
    33 #undef _DEBUG
    34 #endif
    35 #include <interface.h>
    36 #include "convar.h"
    37 #include <eiface.h>
    38 #include <sh_list.h>
    39 #if defined DEBUG2
    40 #undef DEBUG2
    41 #define _DEBUG
    42 #endif
    43 
    44 class SMConVarAccessor : public IConCommandBaseAccessor
    45 {
    46 public:
    47 	bool RegisterConCommandBase(ConCommandBase *pCommand);
    48 	bool Register(ConCommandBase *pCommand);
    49 	void Unregister(ConCommandBase *pCommand);
    50 	void RemoveMetamodCommands();
    51 #if SOURCE_ENGINE == SE_DARKMESSIAH
    52 	bool InitConCommandBaseList();
    53 private:
    54 	ConCommandBase **m_TopConCommandBase;
    55 #endif
    56 private:
    57 	SourceHook::List<ConCommandBase *> m_RegisteredCommands;
    58 };
    59 
    60 extern SMConVarAccessor g_SMConVarAccessor;
    61 
    62 #endif //_INCLUDE_CONSOLE_MMS_H_
    63