/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2008.
     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: include/sgx/core/settings/statistics.hpp

*/

#ifndef SGX_CORE_SETTINGS_STATISTICS_HPP
#define SGX_CORE_SETTINGS_STATISTICS_HPP	1

class CStatisticsOptions : public CConfiguration
{
public:
	virtual void	reset()
	{
		m_Options.clear();
	}
	
	virtual tINT32	IncOption(const sgxString &opt)
	{
		sgxOptionMap::iterator it = m_Options.find(opt);

		if (it == m_Options.end()) {
			setOption(opt, 1);
			return 1;
		}

		return ++(*it).second;
	}

	virtual void	ReportAll()
	{
		sgxOptionMap::iterator it = m_Options.begin();
		while(it != m_Options.end())
		{
			sgxTrace("%s => %d", (*it).first.c_str(), (*it).second);
			++it;
		}

	}
};

#endif /* SGX_CORE_SETTINGS_STATISTICS_HPP */
