Main Page   Class Hierarchy   Compound List   File List   Compound Members  

MyControl Class Reference

Inheritance diagram for MyControl:

CMa::Control< Word_int > List of all members.

Public Methods

void onException (Exception *e)
void onComplete (Word_int result)
int onBreak ()
Word_int onInput () throw (Failure)
void onOutput_int (Word_int value) throw (Failure)
void onOutput_char (Word_int value) throw (Failure)

Detailed Description

A bit more elaborated control class. Allows to debug C-machine:


Member Function Documentation

int MyControl::onBreak   [inline, 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

Implements CMa::Control< Word_int >.

void MyControl::onComplete Word_int    result [inline, virtual]
 

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

Author:
OM

Implements CMa::Control< Word_int >.

void MyControl::onException Exception *    e [inline, 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

Implements CMa::Control< Word_int >.

Word_int MyControl::onInput   throw (Failure) [inline, virtual]
 

Called when instruction READI is executed.

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

Implements CMa::Control< Word_int >.

void MyControl::onOutput_char Word_int    value throw (Failure) [inline, 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

Implements CMa::Control< Word_int >.

void MyControl::onOutput_int Word_int    value throw (Failure) [inline, 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

Implements CMa::Control< Word_int >.


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