rvl.swv
Class StataEngine

java.lang.Object
  extended by rvl.swv.AbstractEngine
      extended by rvl.swv.StataEngine
All Implemented Interfaces:
EngineInterface

public class StataEngine
extends AbstractEngine

Engine for Stata


Field Summary
 
Fields inherited from class rvl.swv.AbstractEngine
codeExt, commentEnd, commentStart, endCode, engineName, medExt, okfigfmts, outExt, startupCode
 
Constructor Summary
StataEngine()
           
 
Method Summary
 void closeFig()
          Put code to close the graphics file created by setupFig
 void postProcess()
          Post-process the output file produced by runCode().
AbstractEngine does nothing but can override it
 void putCode(java.lang.String line)
          Stata overrides putCode so as to test for Mata mode.
 void putExpr(java.lang.String expr)
          Exactly what kind of expression to evaluate is ambiguous.
 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)
          Startup code
 FigFile setupFig(java.lang.String chunkName)
          Put code that will set up a file to receive figure output This method uses the contents of AbstractEngine.okfigfmts and negotiates with the current FileInterface to determine what figure format to actually use, and how to size it.
 
Methods inherited from class rvl.swv.AbstractEngine
closeCodeFile, deleteCodeFile, getFileNames, openCodeFile, putComment, runCode, setBinary, setParents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StataEngine

public StataEngine()
Method Detail

putStartup

public void putStartup(boolean weaving)
Description copied from class: AbstractEngine
Startup code

Specified by:
putStartup in interface EngineInterface
Overrides:
putStartup in class AbstractEngine

putSeparator

public void putSeparator(java.lang.String text)
Description copied from class: AbstractEngine
Put code that will add the given text in a separate line of the engine's output. This is used by the parent to keep track of beginnings and ends of output chunks.

Specified by:
putSeparator in interface EngineInterface
Overrides:
putSeparator in class AbstractEngine

putCode

public void putCode(java.lang.String line)
Stata overrides putCode so as to test for Mata mode.

Specified by:
putCode in interface EngineInterface
Overrides:
putCode in class AbstractEngine

putExpr

public void putExpr(java.lang.String expr)
Exactly what kind of expression to evaluate is ambiguous. In Mata, we just evaluate a matrix expression. Outside Mata, we'll evaluate it using egen and display the result.

Specified by:
putExpr in interface EngineInterface
Overrides:
putExpr in class AbstractEngine

setupFig

public FigFile setupFig(java.lang.String chunkName)
Description copied from class: AbstractEngine
Put code that will set up a file to receive figure output This method uses the contents of AbstractEngine.okfigfmts and negotiates with the current FileInterface to determine what figure format to actually use, and how to size it. The extending class should call this as a superclass method, then use the properties of the returned object as needed in outputting the needed setup code for the figure

Specified by:
setupFig in interface EngineInterface
Overrides:
setupFig in class AbstractEngine
Returns:
null if no format can be found; otherwise the object can be used by the extending class to finish setting up the figure.

closeFig

public void closeFig()
Description copied from class: AbstractEngine
Put code to close the graphics file created by setupFig

Specified by:
closeFig in interface EngineInterface
Overrides:
closeFig in class AbstractEngine

postProcess

public void postProcess()
Description copied from class: AbstractEngine
Post-process the output file produced by runCode().
AbstractEngine does nothing but can override it

Specified by:
postProcess in interface EngineInterface
Overrides:
postProcess in class AbstractEngine