Main Page   Class Hierarchy   Compound List   File List   Compound Members  

CMa::Control< Word > Class Template Reference

#include <control.h>

List of all members.

Public Methods

virtual void onException (Exception *e)=0
virtual void onComplete (Word result)=0
virtual int onBreak ()=0
virtual Word onInput ()=0 throw (Failure)
virtual void onOutput_int (Word value)=0 throw (Failure)
virtual void onOutput_char (Word value)=0 throw (Failure)


Detailed Description

template<class Word>
class CMa::Control< Word >

A interface through which CMa::Interpeter communicates with its caller.

Author:
OM/ Modified by SL
STATUS OK


Member Function Documentation

template<class Word>
virtual int CMa::Control< Word >::onBreak   [pure virtual]
 

Allows controlling execution of CMa::Interpreter. Before the first instruction is executed, this function is called. Let X > 0 be the return value. After that exactly X instructions are executed, and then the process is repeated. If X == 0, interpreation is stopped and no other function of this interface is called.

Author:
OM

Implemented in MyControl.

template<class Word>
virtual void CMa::Control< Word >::onComplete Word    result [pure virtual]
 

Called when CMa completes its execution and the stack contains exactly one word.

Author:
OM

Implemented in MyControl.

template<class Word>
virtual void CMa::Control< Word >::onException Exception   e [pure virtual]
 

Called when exception occurs in the CMa. No other function of this interface will be called after that and interpreter will stop immediately.

Author:
OM

Implemented in MyControl.

template<class Word>
virtual Word CMa::Control< Word >::onInput   throw (Failure) [pure virtual]
 

Called when instruction READI is executed.

Returns:
the value input
Exceptions:
Failure  it is allowed to throw exception on I/O error
@authorOM

Implemented in MyControl.

template<class Word>
virtual void CMa::Control< Word >::onOutput_char Word    value throw (Failure) [pure virtual]
 

Called when instrucition WRITEC is executed. Writes char into output.

Exceptions:
Failure  it is allowed to throw exception on I/O error
Parameters:
value  the value to be output
Author:
SL

Implemented in MyControl.

template<class Word>
virtual void CMa::Control< Word >::onOutput_int Word    value throw (Failure) [pure virtual]
 

Called when instrucition WRITEI is executed. Writes int into output.

Exceptions:
Failure  it is allowed to throw exception on I/O error
Parameters:
value  the value to be output
Author:
OM

Implemented in MyControl.


The documentation for this class was generated from the following file:
Generated on Tue Oct 12 03:30:45 1999 by doxygen1.2.18