ROSE
0.11.132.0
|
Iterates over valid subdomains whose inputs are valid.
This is intended to be used in a "for" loop inside a RISC operation, such as:
This RiscOperator's before() and after() methods are automatically invoked around the body of the "for" loop by the Cursor constructor and next() methods.
Definition at line 378 of file MultiSemantics.h.
#include <Rose/BinaryAnalysis/InstructionSemantics/MultiSemantics.h>
Public Types | |
typedef std::vector< SValuePtr > | Inputs |
Public Member Functions | |
Cursor (RiscOperators *ops, const SValuePtr &arg1=SValuePtr(), const SValuePtr &arg2=SValuePtr(), const SValuePtr &arg3=SValuePtr()) | |
Cursor (RiscOperators *ops, const Inputs &inputs) | |
bool | at_end () const |
Returns true when the cursor has gone past the last valid subdomain. More... | |
void | next () |
Advance to the next valid subdomain. More... | |
size_t | idx () const |
Return the subdomain index for the current cursor position. More... | |
BaseSemantics::RiscOperatorsPtr | operator-> () const |
Return the subdomain for the current cursor position. More... | |
BaseSemantics::RiscOperatorsPtr | operator* () const |
Return the subdomain for the current cursor position. More... | |
BaseSemantics::SValuePtr | operator() (const BaseSemantics::SValuePtr &) const |
Returns subdomain value of its multidomain argument. More... | |
Static Public Member Functions | |
static Inputs | inputs (const BaseSemantics::SValuePtr &arg1=BaseSemantics::SValuePtr(), const BaseSemantics::SValuePtr &arg2=BaseSemantics::SValuePtr(), const BaseSemantics::SValuePtr &arg3=BaseSemantics::SValuePtr()) |
Class method to construct the array of inputs from a variable number of arguments. More... | |
Protected Member Functions | |
void | init (const SValuePtr &arg1, const SValuePtr &arg2, const SValuePtr &arg3) |
void | init () |
void | skip_invalid () |
bool | inputs_are_valid () const |
Protected Attributes | |
RiscOperators * | ops_ |
Inputs | inputs_ |
size_t | idx_ |
|
static |
Class method to construct the array of inputs from a variable number of arguments.
This is used only by the SUBDOMAINS macro in the MultiSemantics source code so that the input values can be passed as a parenthesized group as the macro's second argument.
bool Rose::BinaryAnalysis::InstructionSemantics::MultiSemantics::RiscOperators::Cursor::at_end | ( | ) | const |
Returns true when the cursor has gone past the last valid subdomain.
void Rose::BinaryAnalysis::InstructionSemantics::MultiSemantics::RiscOperators::Cursor::next | ( | ) |
Advance to the next valid subdomain.
size_t Rose::BinaryAnalysis::InstructionSemantics::MultiSemantics::RiscOperators::Cursor::idx | ( | ) | const |
Return the subdomain index for the current cursor position.
BaseSemantics::RiscOperatorsPtr Rose::BinaryAnalysis::InstructionSemantics::MultiSemantics::RiscOperators::Cursor::operator-> | ( | ) | const |
Return the subdomain for the current cursor position.
BaseSemantics::RiscOperatorsPtr Rose::BinaryAnalysis::InstructionSemantics::MultiSemantics::RiscOperators::Cursor::operator* | ( | ) | const |
Return the subdomain for the current cursor position.
BaseSemantics::SValuePtr Rose::BinaryAnalysis::InstructionSemantics::MultiSemantics::RiscOperators::Cursor::operator() | ( | const BaseSemantics::SValuePtr & | ) | const |
Returns subdomain value of its multidomain argument.