//-------------------------------------------------------------------------------------------------
// <copyright file="LWCloseLuaInternalCmd.h" company="LiquidRobotics">
//  Copyright (c) Liquid Robotics Corporation, confidential and proprietary.  All rights reserved. 
// </copyright>
//
// <summary>
//	Declarations for the LWCloseLuaInternalCmd class, which is queued up to be
//	executed on a thread specific to a lua interpreter.  It calls back to the
//	controller to actually close a lua instance.
// </summary>
//
// <owner>Mike Cookson</owner>
//-------------------------------------------------------------------------------------------------

#ifndef __LWCloseLuaInternalCmd_h__
#define __LWCloseLuaInternalCmd_h__

#include "LWConcreteCmd.h"

namespace LiquidRobotics {

namespace SMACFramework {
	class CmdLineParser;
	class Logger;
}

namespace LuaWrapper {

class SHARED_LIB_PUBLIC LWCloseLuaInternalCmd : public LWConcreteCmd
{
public:

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

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

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

	// get the output of the command
	virtual string GetResult();

private:

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

}
}

#endif
