public class IOLibrary extends Library
Modifier and Type | Field and Description |
---|---|
static String |
consoleExecution
Added the variable consoleExecution and graphicExecution
|
static String |
graphicExecution |
protected UserContextInputStream |
input |
protected InputStream |
inputStream |
protected String |
inputStreamName
Current inputStream and outputStream initialized as StandardInput and StandardOutput*
|
protected OutputStream |
outputStream |
protected String |
outputStreamName |
protected InputStream |
stdIn |
protected OutputStream |
stdOut |
Constructor and Description |
---|
IOLibrary() |
Modifier and Type | Method and Description |
---|---|
boolean |
get_1(Term arg0) |
boolean |
get0_1(Term arg0) |
OutputStream |
getOutputStream() |
InputStream |
getStandardInputStream() |
String |
getTheory()
Gets the theory provided with the library
Empty theory is provided by default.
|
UserContextInputStream |
getUserContextInputStream()
Mirco Mastrovito - Input da Console
|
boolean |
nl_0() |
boolean |
print_1(Term arg0) |
boolean |
put_1(Term arg) |
boolean |
rand_float_1(Term t) |
boolean |
rand_int_2(Term argNum,
Term num) |
boolean |
read_1(Term arg0) |
boolean |
see_1(Term arg) |
boolean |
seeing_1(Term t) |
boolean |
seen_0() |
boolean |
set_seed_1(Term t)
Sets an arbitrary seed for the Random object.
|
void |
setExecutionType(String executionType)
This method defines whether you use the graphical version or version by console
|
void |
setStandardInput(InputStream is)
Added getters and setters of StandardInput and StandardOutput for JSR-223
|
void |
setStandardOutput(OutputStream os) |
boolean |
solve_file_goal_guard_2(Term arg0,
Term arg1) |
boolean |
tab_1(Term arg) |
boolean |
tell_1(Term arg) |
boolean |
telling_1(Term arg0) |
boolean |
text_from_file_2(Term file_name,
Term text)
reads a source text from a file.
|
boolean |
told_0() |
boolean |
write_1(Term arg0) |
boolean |
write_base_1(Term arg0) |
dismiss, evalExpression, getEngine, getName, getPrimitives, getSynonymMap, getTheory, match, onSolveBegin, onSolveEnd, onSolveHalt, setEngine, unify
public static final String consoleExecution
public static final String graphicExecution
protected InputStream stdIn
protected OutputStream stdOut
protected String inputStreamName
protected InputStream inputStream
protected String outputStreamName
protected OutputStream outputStream
protected UserContextInputStream input
public UserContextInputStream getUserContextInputStream()
public void setExecutionType(String executionType)
executionType
- public void setStandardInput(InputStream is)
public void setStandardOutput(OutputStream os)
public InputStream getStandardInputStream()
public OutputStream getOutputStream()
public boolean see_1(Term arg) throws PrologError
PrologError
public boolean seen_0()
public boolean seeing_1(Term t)
public boolean tell_1(Term arg) throws PrologError
PrologError
public boolean told_0()
public boolean telling_1(Term arg0)
public boolean put_1(Term arg) throws PrologError
PrologError
public boolean get0_1(Term arg0) throws PrologError
PrologError
public boolean get_1(Term arg0) throws PrologError
PrologError
public boolean tab_1(Term arg) throws PrologError
PrologError
public boolean read_1(Term arg0) throws PrologError
PrologError
public boolean write_1(Term arg0) throws PrologError
PrologError
public boolean print_1(Term arg0) throws PrologError
PrologError
public boolean nl_0() throws PrologError
PrologError
public boolean text_from_file_2(Term file_name, Term text) throws PrologError
It's useful used with agent predicate: text_from_file(File,Source), agent(Source).
PrologError
public boolean set_seed_1(Term t) throws PrologError
seed
- Seed to usePrologError
public boolean rand_float_1(Term t)
public String getTheory()
Library
public boolean solve_file_goal_guard_2(Term arg0, Term arg1) throws PrologError
PrologError
public boolean write_base_1(Term arg0) throws PrologError
PrologError