TorqueScript  0.2
Public Member Functions | List of all members
TorqueScript::Instructions::PushLoopInstruction Class Reference

Used to keep track of loops in the virtual instructions. This instruction marks the start of a loop control construct. More...

#include <instructions.hpp>

Inheritance diagram for TorqueScript::Instructions::PushLoopInstruction:
Inheritance graph
[legend]
Collaboration diagram for TorqueScript::Instructions::PushLoopInstruction:
Collaboration graph
[legend]

Public Member Functions

 PushLoopInstruction (const std::size_t loopSize)
 Constructs a new instance of PushLoopInstruction. More...
 
virtual AddressOffsetType execute (std::shared_ptr< ExecutionState > state) override
 Main execution method of the instruction. This serves as our switching statement that determines how opcodes will behave. More...
 
virtual std::string disassemble () override
 Helper routine to produce a disassembly for this instruction.
 

Additional Inherited Members

- Public Attributes inherited from TorqueScript::Instructions::Instruction
std::string mComment
 Compiler generated comment, used for generating easier to follow disassembly.
 

Detailed Description

Used to keep track of loops in the virtual instructions. This instruction marks the start of a loop control construct.

Constructor & Destructor Documentation

◆ PushLoopInstruction()

TorqueScript::Instructions::PushLoopInstruction::PushLoopInstruction ( const std::size_t  loopSize)
inline

Constructs a new instance of PushLoopInstruction.

Parameters
loopSizeThe number of instructions contained in this loop.

Member Function Documentation

◆ execute()

virtual AddressOffsetType TorqueScript::Instructions::PushLoopInstruction::execute ( std::shared_ptr< ExecutionState state)
inlineoverridevirtual

Main execution method of the instruction. This serves as our switching statement that determines how opcodes will behave.

Parameters
stateThe current execution state to act upon.

Implements TorqueScript::Instructions::Instruction.


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