#include <robbase.h>
Inheritance diagram for rt::Instr:

Public Methods | |
| virtual | ~Instr () |
| virtual ExecReturnType | exec (Task *task)=0 |
| Executes this instruction on the given bot (represented by its active task). More... | |
| virtual rint | getNumCycles (Task *task) |
| Return the number of cycles this instruction takes, considering the given bot (represented by its active task). This includes checking for errors as well! This function just returns cycles and will probably not be enough for most instructions. More... | |
| virtual TimingMode | getTimingMode () |
| Returns the timing mode for this instruction. More... | |
| virtual lrt::String | getName ()=0 |
| Return the instruction name here. | |
| virtual lrt::String | print (int instrPos=0) |
| Returns a String representation of this instruction. More... | |
Protected Methods | |
| Instr (int numParams) | |
| Initializes the operand array. | |
| rint | getValue (Task *task, int opNum, bool absolute=false) |
| HACK: Task ops return their value + 1. More... | |
| void | setValue (Task *task, int opNum, rint value) |
Sets the game (bot, task) variable given by the op at opNum of the bot given by task to the given value. | |
| void | initOps (const lrt::Array< Op > &ops) |
| Sets the ops up. | |
| lrt::String | printOp (int opNum, int instrPos) |
| Prints the op. | |
| lrt::String | printOps (int instrPos) |
| Prints all ops in a comma-separated list. | |
Protected Attributes | |
| Op * | ops |
| The operand array. | |
| int | numOps |
| The number of ops this instruction has. | |
| rint | cycles |
| The number of cycles this instruction takes. | |
|
|
Executes this instruction on the given bot (represented by its active task).
If this function doesn't return |
|
|
Return the number of cycles this instruction takes, considering the given bot (represented by its active task).
|
|
|
Returns the timing mode for this instruction.
The method of class
|
|
||||||||||||||||
|
HACK: Task ops return their value + 1.
|
|
|
Returns a String representation of this instruction.
|