psengines
Class ExecutionEngine

java.lang.Object
  extended bypsengines.ExecutionEngine

public class ExecutionEngine
extends java.lang.Object

It describes the Execution Engine component of PS-View.

Execution engine is responsible for taking a PSObject and depending on what it is it puts in the the stack or it execute it(if it is command).


Constructor Summary
ExecutionEngine()
          Creates an instance of the Execution Engine.
 
Method Summary
static PSObject execExecutableArray(PSStack s, PSExecArray execArray)
          Retrieves a PSobject from the executable array.
 java.lang.String getString()
          Returns a copy of the text that it's going to be written on the main window.
 void retrievePSObject(PSObject o)
          Retrieves a PSobject from program loader and if it is a command it executes it.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionEngine

public ExecutionEngine()
Creates an instance of the Execution Engine.

Precondition : -.
Postcondition : A new execution engine will be created.

Method Detail

retrievePSObject

public void retrievePSObject(PSObject o)
Retrieves a PSobject from program loader and if it is a command it executes it.

Precondition : A valid instance of PSObject.
Postcondition : The command will be executed.

Parameters:
o - The PSObject retrieved by program loader.

execExecutableArray

public static PSObject execExecutableArray(PSStack s,
                                           PSExecArray execArray)
Retrieves a PSobject from the executable array.

Precondition : A valid instance of a stack and an executable array.
Postcondition : Continious calls to this method will give elements from the execArray.

Parameters:
s - The stack where the data are pushed.
execArray - The executable array that was retrieved.
Returns:
A PSObject from the executable array.

getString

public java.lang.String getString()
Returns a copy of the text that it's going to be written on the main window.

Precondition : A valid instance of execution engine.
Postcondition : The text that is going to be written to the main window.

Returns:
The string that is going to be written to the main window,null otherwise.