Canola  0.8.D001
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
calculator_proxy Class Reference

#include <proxy.h>

Inheritance diagram for calculator_proxy:
calculator

List of all members.

Public Member Functions

virtual ~calculator_proxy ()
 calculator_proxy (calculator &deeper)
void forward (int addr)

Protected Member Functions

void on_error_v (const char *fmt, va_list ap)
void run (void)
void clock_tick_start_running (void)
void derived_print (const display &value)
void derived_feed (void)
void derived_off (void)
void derived_update_display (const display &value)
void printer_timer_start_running (void)

Private Member Functions

 calculator_proxy ()
 calculator_proxy (const calculator_proxy &rhs)
calculator_proxyoperator= (const calculator_proxy &rhs)

Private Attributes

calculatordeeper

Detailed Description

The calculator_proxy class is used to represent a half-way house for code, as we animate the crd reader, and feed one opcode at a time, at the same reate as the card reder does on the original.

Definition at line 28 of file proxy.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 21 of file proxy.cc.

The constructor.

Definition at line 26 of file proxy.cc.

The default constructor. Do not use.

The copy constructor. Do not use.

Parameters:
rhsThe right hand side of the initialization.

Member Function Documentation

void calculator_proxy::clock_tick_start_running ( void  ) [protected, virtual]

The clock_tick_start_running method is called by the calculator to inform the derived class that it should kick off a clock tick idle handler. This will happen when opcode_extended_start is seen, for example. Derived classes should not assume when clocks stop and start, instend they will be explicitly informed via this method.

Implements calculator.

Definition at line 46 of file proxy.cc.

void calculator_proxy::derived_feed ( void  ) [protected, virtual]

The derived_feed method is used to implement the FD opcode, in the cases where it is valid.

Implements calculator.

Definition at line 58 of file proxy.cc.

void calculator_proxy::derived_off ( void  ) [protected, virtual]

The derived_off method is used to implement the OFF key.

Implements calculator.

Definition at line 64 of file proxy.cc.

void calculator_proxy::derived_print ( const display value) [protected, virtual]

The derived_print method is used to implement the PRINT opcode, in the cases where it is valid.

Parameters:
valueThe value to be printed.
Note:
FIXME: this will not serve, once we start printing program listings.

Implements calculator.

Definition at line 52 of file proxy.cc.

void calculator_proxy::derived_update_display ( const display value) [protected, virtual]

The derived_update_display method is used when interpreting opcodes to indicate that the display needs to be updated to track the calculator's internal state.

Parameters:
valueThe value to be displayed by the calculator display.

Implements calculator.

Definition at line 70 of file proxy.cc.

void calculator_proxy::forward ( int  addr)

The forward method is used to forward the instruction at the given address to the deeper instance. This is how we simulate receiving instructions as the card reading animation progresses.

Definition at line 82 of file proxy.cc.

void calculator_proxy::on_error_v ( const char *  fmt,
va_list  ap 
) [protected, virtual]

Implements calculator.

Definition at line 33 of file proxy.cc.

calculator_proxy& calculator_proxy::operator= ( const calculator_proxy rhs) [private]

The assignment operator. Do not use.

Parameters:
rhsThe right hand side of the assignment.
void calculator_proxy::printer_timer_start_running ( void  ) [protected, virtual]

The printer_timer_start_running method is called by the calculator to inform the derived class that it should kick off a printer delay 420ms timer. This will happen when opcode_print or opcode_feed opcode is seen. Derived classes should not assume when printer delays stop and start, instend they will be explicitly informed via this method.

Implements calculator.

Definition at line 76 of file proxy.cc.

void calculator_proxy::run ( void  ) [protected, virtual]

The run method is used to run the calculator, from interactive input, via the GUI, or equivalent.

Implements calculator.

Definition at line 40 of file proxy.cc.


Member Data Documentation

The deeper instance variable is used to remember the deeper calculator instance that we will forward opcodes to.

Definition at line 79 of file proxy.h.


The documentation for this class was generated from the following files: