![]() |
Scanframe Modular Application 0.1.0
|
Executable instruction as result of interpreting the script. More...
#include <ScriptInterpreter.h>
Public Types | |
enum | EInstr { eiGoto = -3 , eiContinue = -2 , eiBreak = -1 , eiNone = 0 , eiCalculate , eiTestJump , eiJump , eiCall , eiRetFunction , eiLastEntry } |
Interpreter available instructions. More... | |
Public Member Functions | |
Instruction ()=default | |
Default constructor. | |
Instruction (EInstr instr, ip_type ip, const CodePos &pos, std::string script=std::string()) | |
Initializing constructor. | |
const char * | getMnemonic () const |
Gets the mnemonic of the current instruction. | |
ip_type | getJumpIp () const |
Gets the jump ip from this instruction when applicable. | |
Public Attributes | |
EInstr | _instr {eiNone} |
Operation instruction. | |
CodePos | _codePos {0, 0} |
Position in the source. | |
std::string | _script {} |
Partial script to calculate and to be used for a decision to jump or not. | |
ip_type | _absIp {-1} |
Absolute instruction pointer address for jump instruction. | |
Executable instruction as result of interpreting the script.
|
default |
Default constructor.
sf::ScriptInterpreter::Instruction::Instruction | ( | EInstr | instr, |
ip_type | ip, | ||
const CodePos & | pos, | ||
std::string | script = std::string() |
||
) |
Initializing constructor.
ip_type sf::ScriptInterpreter::Instruction::getJumpIp | ( | ) | const |
Gets the jump ip from this instruction when applicable.
const char * sf::ScriptInterpreter::Instruction::getMnemonic | ( | ) | const |
Gets the mnemonic of the current instruction.
ip_type sf::ScriptInterpreter::Instruction::_absIp {-1} |
Absolute instruction pointer address for jump instruction.
CodePos sf::ScriptInterpreter::Instruction::_codePos {0, 0} |
Position in the source.
std::string sf::ScriptInterpreter::Instruction::_script {} |
Partial script to calculate and to be used for a decision to jump or not.