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