|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EngineInterface
This interface specifies the methods needed to buffer code and run it in the desired program.
In most cases, the easiest way to implement this interface is to instead
extend AbstractEngine
, and overriding just a few of its methods.
If you do implement this interface directly, you need to have it call openCodeFile and setParent in the constructor.
Method Summary | |
---|---|
void |
closeCodeFile()
Close the code file |
void |
closeFig()
Put code to close the graphics file created by setupFig |
void |
deleteCodeFile()
Delete the code file |
java.lang.String[] |
getFileNames()
Return code and output file names |
boolean |
openCodeFile(java.lang.String baseName)
Open a file for saving the code. |
void |
postProcess()
Post-process the output file produced by runCode() .This could be useful if you need to do some cleaning-up operations to get the output file in suitable shape |
void |
putCode(java.lang.String line)
Add a line of code to the code file |
void |
putComment(java.lang.String text)
Put a comment line into the source code. |
void |
putExpr(java.lang.String expr)
Evaluate an expression and put it in the output stream |
void |
putSeparator(java.lang.String text)
Put code that will add the given text in a separate line of the engine's output. |
void |
putStartup(boolean weaving)
Put startup code in the Code file. |
java.lang.Process |
runCode()
Run the code, and return the its Process object. |
void |
setBinary(java.lang.String binloc)
Set where to find the program to run on the code. |
void |
setParents(StatWeave parent,
FileInterface filei)
Set the parents that drive this instance |
FigFile |
setupFig(java.lang.String chunkName)
Put code that will set up a file to receive figure output, and return its specs in a FigFile object |
Method Detail |
---|
boolean openCodeFile(java.lang.String baseName)
void closeCodeFile()
void deleteCodeFile()
java.lang.String[] getFileNames()
void setParents(StatWeave parent, FileInterface filei)
void setBinary(java.lang.String binloc)
void putCode(java.lang.String line)
void putExpr(java.lang.String expr)
void putStartup(boolean weaving)
void putSeparator(java.lang.String text)
void putComment(java.lang.String text)
FigFile setupFig(java.lang.String chunkName)
void closeFig()
java.lang.Process runCode()
void postProcess()
runCode()
.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |