/*********************************************************************

Name:		Raytracer
Author:		Kamil Szatkowski "Netrix" (C)
Website:	http://www.netrix.org.pl/

*********************************************************************/
#pragma once
#include "Arguments.hpp"

typedef bool (*CommandCallback)(Arguments& pArguments);

class CommandWalker
{
	struct Command
	{
		const char* szCommand;
		const char* szHelp;
		CommandCallback pCallback;
	};

public:
	CommandWalker(int argc, const char* argv[]);

	~CommandWalker();

	void AddCommand(const char* szCommand, const char* szHelp, CommandCallback pCallback);

	void AddDefault(CommandCallback pCallback);

	void PrintCommands();

	bool ParseCommands();

private:
	Arguments m_arguments;
	NIne::NDataVector<Command> m_vCommands;

	CommandCallback m_pDefaultAction;
};