de.projectory.addingmachine
Class AddingContext

java.lang.Object
  extended by de.projectory.koivima.core.ExecutionContext
      extended by de.projectory.addingmachine.AddingContext

public class AddingContext
extends ExecutionContext

This is an example for an extended execution context. This context contains some memory and a register.


Field Summary
 DataElement[] memory
          Main memory
(package private)  int memorySize
          Number of memory cells
 DataElement registerA
          Register to perform calculations
 
Fields inherited from class de.projectory.koivima.core.ExecutionContext
codeBlock, dataStack
 
Constructor Summary
AddingContext()
          Creates a new AddingContext and adds some data to the memory cells.
 
Method Summary
 AddingContext copy()
          Returns a shallo copy of this execution context.
 
Methods inherited from class de.projectory.koivima.core.ExecutionContext
onError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

memorySize

final int memorySize
Number of memory cells

See Also:
Constant Field Values

memory

public DataElement[] memory
Main memory


registerA

public DataElement registerA
Register to perform calculations

Constructor Detail

AddingContext

public AddingContext()
Creates a new AddingContext and adds some data to the memory cells.

Method Detail

copy

public AddingContext copy()
Returns a shallo copy of this execution context.

Overrides:
copy in class ExecutionContext