]> gerrit.simantics Code Review - simantics/r.git/blob - bundles/org.simantics.r.scl/src/org/rosuda/REngine/REngineInputInterface.java
(refs #6833) Test RExp inheritance in SCL
[simantics/r.git] / bundles / org.simantics.r.scl / src / org / rosuda / REngine / REngineInputInterface.java
1 package org.rosuda.REngine;
2
3 /** interface defining delegate methods used by {@link REngine} to forward input callbacks from R. */
4 public interface REngineInputInterface {
5         /** called when R enters the read stage of the event loop.
6          *  <p> Important: implementations should never use a direct return! That will cause a tigh-spinning event loop. Implementation must wait for input asynchronously (e.g., declare synchonized RReadConsole and use wait()) and return only when a complete line is available for processing.
7          *  @param eng calling engine
8          *  @param prompt prompt to display in the console
9          *  @param addToHistory flag indicating whether the input is transient (<code>false</code>) or to be recorded in the command history (<code>true</code>).
10          *  @return string to be processed as console input
11          */
12         public String RReadConsole(REngine eng, String prompt, int addToHistory);
13 }