/** 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: src/sgx/core/system/execute.cpp

*/

#include "sgx/core/core.hpp"

sgxExecuteProperties::sgxExecuteProperties()
{
	sgxError("Must have at least a command");
}


sgxExecuteProperties::sgxExecuteProperties(const sgxString &command)
: m_Command(command)
{
}

sgxExecuteProperties::sgxExecuteProperties(const sgxString &command, const sgxString &arguments)
: m_Command(command), m_Arguments(arguments)
{
}

sgxExecuteProperties::sgxExecuteProperties(const sgxString &command, const sgxVector<sgxString> &arglist)
: m_Command(command)
{
sgxVector<sgxString>::const_iterator cit = arglist.begin();

	for(;;) {
		m_Arguments += (*cit);
		if (++cit == arglist.end()) {
			break;
		} else {
			m_Arguments += " ";
		}
	}
}

tINT32	
sgxExecuteProperties::execute()
{
	return sgxSystemExecute(*this);
}



