core/CoreConfig.h
author David Anderson <dvander@alliedmods.net>
Sun Jun 17 18:48:46 2007 +0000 (2007-06-17)
changeset 972 63d848bccec5
parent 663 b526b82e256e
child 978 54782a83a1ef
permissions -rw-r--r--
fixed bug amb401
     1 /**
     2  * vim: set ts=4 :
     3  * ===============================================================
     4  * SourceMod (C)2004-2007 AlliedModders LLC.  All rights reserved.
     5  * ===============================================================
     6  *
     7  * This file is not open source and may not be copied without explicit
     8  * written permission of AlliedModders LLC.  This file may not be redistributed 
     9  * in whole or significant part.
    10  * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
    11  *
    12  * Version: $Id$
    13  */
    14 
    15 #ifndef _INCLUDE_SOURCEMOD_CORECONFIG_H_
    16 #define _INCLUDE_SOURCEMOD_CORECONFIG_H_
    17 
    18 #include "sm_globals.h"
    19 #include <ITextParsers.h>
    20 #include <IRootConsoleMenu.h>
    21 
    22 using namespace SourceMod;
    23 
    24 class CoreConfig : 
    25 	public SMGlobalClass,
    26 	public ITextListener_SMC,
    27 	public IRootConsoleCommand
    28 {
    29 public: // SMGlobalClass
    30 	void OnSourceModAllInitialized();
    31 	void OnSourceModShutdown();
    32 public: // ITextListener_SMC
    33 	SMCParseResult ReadSMC_KeyValue(const char *key, const char *value, bool key_quotes, bool value_quotes);
    34 public: // IRootConsoleCommand
    35 	void OnRootConsoleCommand(const char *command, unsigned int argcount);
    36 public:
    37 	/**
    38 	 * Initializes CoreConfig by reading from core.cfg file
    39 	 */
    40 	void Initialize();
    41 private:
    42 	/**
    43 	 * Sets configuration option by notifying SourceMod components that rely on core.cfg
    44 	 */
    45 	ConfigResult SetConfigOption(const char *option, const char *value, ConfigSource, char *Error, size_t maxlength);
    46 };
    47 
    48 extern CoreConfig g_CoreConfig;
    49 
    50 #endif // _INCLUDE_SOURCEMOD_CORECONFIG_H_