2007-10-13 15:28:00 +00:00
|
|
|
/*
|
2007-10-18 23:51:00 +00:00
|
|
|
* $Id: Context.java,v 1.6 2007/10/17 14:38:28 bacon Exp $
|
2007-10-13 15:28:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
package ase.awk;
|
|
|
|
|
|
|
|
public class Context
|
|
|
|
{
|
2007-10-17 00:30:00 +00:00
|
|
|
private Awk awk;
|
|
|
|
private long runid;
|
2007-10-13 15:28:00 +00:00
|
|
|
private Object custom;
|
|
|
|
|
2007-10-17 00:30:00 +00:00
|
|
|
Context (Awk awk)
|
2007-10-13 15:28:00 +00:00
|
|
|
{
|
2007-10-17 00:30:00 +00:00
|
|
|
this.awk = awk;
|
|
|
|
this.runid = 0;
|
|
|
|
this.custom = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Awk getAwk ()
|
|
|
|
{
|
|
|
|
return awk;
|
2007-10-13 15:28:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public long getId ()
|
|
|
|
{
|
2007-10-17 00:30:00 +00:00
|
|
|
return this.runid;
|
2007-10-13 15:28:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void setCustom (Object custom)
|
|
|
|
{
|
|
|
|
this.custom = custom;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Object getCustom ()
|
|
|
|
{
|
|
|
|
return this.custom;
|
|
|
|
}
|
2007-10-17 00:30:00 +00:00
|
|
|
|
|
|
|
public void setConsoleInputName (String name) throws Exception
|
|
|
|
{
|
|
|
|
awk.setfilename (this.runid, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setConsoleOutputName (String name) throws Exception
|
|
|
|
{
|
|
|
|
awk.setofilename (this.runid, name);
|
|
|
|
}
|
|
|
|
|
2007-10-17 23:38:00 +00:00
|
|
|
public void stop ()
|
|
|
|
{
|
2007-10-18 23:51:00 +00:00
|
|
|
stop (this.runid);
|
2007-10-17 23:38:00 +00:00
|
|
|
}
|
|
|
|
|
2007-10-18 23:51:00 +00:00
|
|
|
protected native void stop (long runid);
|
|
|
|
|
2007-10-17 00:30:00 +00:00
|
|
|
// TODO:
|
|
|
|
// setGlobal
|
|
|
|
// getGlobal
|
|
|
|
// setError
|
|
|
|
// getError
|
2007-10-13 15:28:00 +00:00
|
|
|
}
|