//-------------------------------------------------------------------------------------------------
// <copyright file="LWListCmd.h" company="LiquidRobotics">
//  Copyright (c) Liquid Robotics Corporation, confidential and proprietary.  All rights reserved. 
// </copyright>
//
// <summary>
//	Declarations for LWListCmd, a command class that is created from a SendCommand
//	invocation.  Commands are first queued up on a queue and run consecutively on the
//	controller's command thread.  LWListCmd returns a listing of the lua instances
//	that are currently running.
// </summary>
//
// <owner>Mike Cookson</owner>
//-------------------------------------------------------------------------------------------------

#ifndef __LWListCmd_h__
#define __LWListCmd_h__

#include "LWConcreteCmd.h"

namespace LiquidRobotics {

namespace SMACFramework {
	class CmdLineParser;
	class Logger;
}

namespace LuaWrapper {

class SHARED_LIB_PUBLIC LWListCmd : public LWConcreteCmd
{
public:

	typedef LWConcreteCmd::CmdBasePtr CmdPtr;
	typedef LiquidRobotics::SMACFramework::CmdLineParser CmdLineParser;
	typedef LiquidRobotics::SMACFramework::Logger Logger;
	typedef LWControllerBase0::ParsingContext ParsingContext;

	LWListCmd(TCon& _ctrl, const string& _cmd);
	virtual ~LWListCmd();

	// this method is called by the background thread to execute the command
	virtual void Execute();

	// parse the command
	static CmdPtr Parse(const string& arg1, const string& arg2, LWControllerBase0& ctrl, const CmdLineParser& parser, ParsingContext& context, Logger& logger);

private:

	LWControllerBase0& ctrl;
	string cmd;
	string instanceName;
	string fileName;
	string cmdResponse;
};

}
}

#endif
