sourcemm/concommands.h
author Scott Ehlert <ds@alliedmods.net>
Sun May 22 04:33:58 2005 +0000 (2005-05-22)
changeset 66 ddefc8bfb9fa
parent 64 ad98b9f2d80c
child 67 1753f7a9b2f2
permissions -rw-r--r--
Added macro so that ConCommands created with the SDK's CON_COMMAND and CON_COMMAND_F macros can be properly registered and unregisterd
     1 /* ======== SourceMM ========
     2 * Copyright (C) 2004-2005 Metamod:Source Development Team
     3 * No warranties of any kind
     4 *
     5 * License: zlib/libpng
     6 *
     7 * Author(s): David "BAILOPAN" Anderson
     8 * ============================
     9 */
    10 
    11 #ifndef _INCLUDE_CONCOMMANDS_H
    12 #define _INCLUDE_CONCOMMANDS_H
    13 
    14 /**
    15  * @brief Header for console commands
    16  * @file concommands.h
    17  */
    18 
    19 #include <interface.h>
    20 #include <eiface.h>
    21 #include "sourcemm.h"
    22 #include <convar.h>
    23 #include <list>
    24 
    25 class SMConVarAccessor : public IConCommandBaseAccessor
    26 {
    27 	std::list<ConCommandBase*> m_RegisteredCommands;
    28 public:
    29 	virtual bool RegisterConCommandBase(ConCommandBase *pCommand);
    30 	void MarkCommandsAsGameDLL();
    31 	void Unregister(ConCommandBase *pCvar);
    32 };
    33 
    34 extern SMConVarAccessor g_SMConVarAccessor;
    35 
    36 #endif //_INCLUDE_CONCOMMANDS_H