/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2009.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: sgx/include/sgx/core/settings/configuration.hpp

*/

#ifndef SGX_CORE_SETTINGS_CONFIGURATION_HPP
#define SGX_CORE_SETTINGS_CONFIGURATION_HPP	1

class CConfiguration {
public:
	static CConfiguration *get();

	CConfiguration();

	// By convention, use UPPER_CASE for configuration options present within the SYSTEM
	// and use lower_case for anything game-oriented.
	tBOOL	getOption(tINT32 &result, const sgxString &opt, const tINT32 opt_default=0);
	tBOOL	getOption(sgxString &result, const sgxString &opt, const sgxString &opt_default=sgxString(""));
	tINT32	getOption(const sgxString &opt, tINT32 opt_default=0);	// BUGWARN: we'll phase this out

	void	setOption(const sgxString &opt, tINT32 value);
	void	setOption(const sgxString &opt, const sgxString &value);
	
	void    complete(void);	//* Completion denies all future setOption's

protected:
	static CConfiguration		*m_pSingleton;

	typedef sgxMap<sgxString, sgxString> sgxOptionMap;
	sgxOptionMap				m_Options;

private:
	tBOOL						m_bcomplete;
};

#endif /* SGX_CORE_SETTINGS_CONFIGURATION_HPP */
