InstructionIterator

class InstructionIterator

The InstructionIterator provides a mechanism for a pre-order traversal of an Instruction tree.

Public Functions

InstructionIterator(std::shared_ptr<Instruction> r)

The constructor, takes the root of the tree as input.

Parameters
  • r:

bool hasNext()

Return true if there are still instructions left to traverse.

Return

std::shared_ptr<Instruction> next()

Return the next Instruction in the tree.

Return