/*
 * Galatea Dialog Manager:
 * (c)2003 Takuya NISHIMOTO (nishi@hil.t.u-tokyo.ac.jp)
 * Based on Phoenix By Takuya NISHIMOTO and Mitsuhiro KIZU
 *
 * $Id: OutItem.java,v 1.2 2006/11/20 01:13:35 nishi Exp $
 */

package galatea.outitem;

//import galatea.io.OutputDevice;
import galatea.dialog.RuntimeError;
import galatea.scripting.*;


public abstract class OutItem      
{
	
	protected boolean isInstant_ = false;   // non-blocking output 
	protected boolean isImportant_ = false; // unskippable when bargein occurs
	protected String arg_ = "";
	protected ECMAScript ecmascript_ = null;
	protected boolean bargein_ = true;
	
	public void setECMAScript(ECMAScript sc)
	{
		ecmascript_ = sc;
	}
	
//	public void setBargein(boolean b) 
//	{ 
//		bargein_ = b; 
//	}
	
	// TODO: use bargein attribute !!
	public boolean getBargein() 
	{ 
		return bargein_; 
	}
	
//	
//	public final boolean canInput()
//	{
//		return bargein_;
//	}
	
	public final boolean isInstant()
	{
		return isInstant_;
	}
	
	public final boolean isImportant()
	{
		return isImportant_;
	}
	
	public void doEvaluate() throws RuntimeError
	{
		arg_ = "";
	}
	
//	public void doOutput(OutputDevice outputDevice)
//	{
//		outputDevice.outputDeviceStart(this);
//	}
//	
//	public void doStop(OutputDevice outputDevice)
//	{
//		outputDevice.outputDeviceStop(this);
//	}
	
	public String getArg() 
	{ 
		return arg_;
	}
	
}
