![]() |
nsbaci 1.0
|
Executes instructions for threads within a program context. More...
#include <interpreter.h>

Public Member Functions | |
| virtual InterpreterResult | executeInstruction (Thread &t, Program &program)=0 |
| Executes the current instruction for the given thread with the program context. | |
| virtual void | provideInput (const std::string &input)=0 |
| Provide input to a thread waiting for input. | |
| virtual bool | isWaitingForInput () const =0 |
| Check if interpreter is waiting for input. | |
| virtual void | setOutputCallback (OutputCallback callback)=0 |
| Set the output callback for print operations. | |
| virtual void | setDrawingCallback (DrawingCallback callback)=0 |
| Set the drawing callback for drawing operations. | |
| virtual void | reset ()=0 |
| Reset interpreter state for a new run. | |
Executes instructions for threads within a program context.
The Interpreter is responsible for fetching and executing instructions based on the current thread's program counter.
|
pure virtual |
Executes the current instruction for the given thread with the program context.
| t | The thread whose instruction should be executed. |
| program | The program context in which to execute the instruction |
Implemented in nsbaci::services::runtime::NsbaciInterpreter.
|
pure virtual |
Check if interpreter is waiting for input.
Implemented in nsbaci::services::runtime::NsbaciInterpreter.
|
pure virtual |
Provide input to a thread waiting for input.
| input | The input string. |
Implemented in nsbaci::services::runtime::NsbaciInterpreter.
|
pure virtual |
Reset interpreter state for a new run.
Clears any pending input and waiting state.
Implemented in nsbaci::services::runtime::NsbaciInterpreter.
|
pure virtual |
Set the drawing callback for drawing operations.
| callback | Function to call when drawing is requested. |
Implemented in nsbaci::services::runtime::NsbaciInterpreter.
|
pure virtual |
Set the output callback for print operations.
| callback | Function to call when output is produced. |
Implemented in nsbaci::services::runtime::NsbaciInterpreter.