/** 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/sgxlib/commandline.hpp

*/

#ifndef SGX_CORE_SGXLIB_COMMANDLINE_HPP
#define SGX_CORE_SGXLIB_COMMANDLINE_HPP	1

#include "sgx/core/stl/stl.hpp"
#include "sgx/core/helpers/trace.hpp"

class CCommandLine {
public:
	CCommandLine(int argc, char *argv[]);

	tBOOL	getOption(sgxString &result, const char opt) const;
	tBOOL	getArgument(sgxString &result, const tUINT32 idx) const;
	tBOOL	getArgumentString(sgxString &result, const tUINT32 from_idx) const;
	tBOOL	getArgumentString(sgxString &result, const tUINT32 from_idx, const tUINT32 to_idx) const;
	void	getArgumentString(sgxString &result) const;

	void debug();
private:
	CCommandLine() { sgxError("No default construction, please!"); }

	sgxString				m_Executable;
	sgxString				m_ArgumentString;
	sgxVector<sgxString>	m_Arguments;
	sgxMap<char, sgxString>	m_Options;
};

#endif /* SGX_CORE_SGXLIB_COMMANDLINE_HPP */
