ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

A script command with control flow information. More...

#include <command.h>

Inheritance diagram for Stark::Tools::CFGCommand:
Collaboration diagram for Stark::Tools::CFGCommand:

List of all members.

Public Member Functions

 CFGCommand (Resources::Command *resource)
bool isEntryPoint () const
 Is this command an entry point for the whole script?
bool isBranch () const
 Can this command influence the control flow?
bool isBranchTarget () const
 Is this command a jump target?
CFGCommandgetFollower () const
 Commands are linked together in the command graph with these relationships:

  • follower: The natural follower of the command.

CFGCommandgetTrueBranch () const
CFGCommandgetFalseBranch () const
BlockgetBlock () const
 Commands are aggregated into blocks.
void setBlock (Block *block)
void linkBranches (const Common::Array< CFGCommand * > &commands)
 Add the command to the command graph.

Protected Member Functions

void initBranches ()
 Set the link indices from the argument values.

Static Protected Member Functions

static CFGCommandfindCommandWithIndex (const Common::Array< CFGCommand * > &commands, int32 index)
 Gets the command with the specifed index.

Protected Attributes

int32 _followerIndex
int32 _trueBranchIndex
int32 _falseBranchIndex
CFGCommand_follower
CFGCommand_trueBranch
CFGCommand_falseBranch
Common::Array< CFGCommand * > _predecessors
Block_block

Detailed Description

A script command with control flow information.

This class is a node in the disassembly command control flow graph. It is referenced by the blocks in the block control flow graph.

Definition at line 95 of file tools/command.h.


Constructor & Destructor Documentation

Stark::Tools::CFGCommand::CFGCommand ( Resources::Command resource  ) 

Definition at line 216 of file tools/command.cpp.


Member Function Documentation

CFGCommand * Stark::Tools::CFGCommand::findCommandWithIndex ( const Common::Array< CFGCommand * > &  commands,
int32  index 
) [static, protected]

Gets the command with the specifed index.

Definition at line 299 of file tools/command.cpp.

Block * Stark::Tools::CFGCommand::getBlock (  )  const

Commands are aggregated into blocks.

Definition at line 262 of file tools/command.cpp.

CFGCommand * Stark::Tools::CFGCommand::getFalseBranch (  )  const

Definition at line 278 of file tools/command.cpp.

CFGCommand * Stark::Tools::CFGCommand::getFollower (  )  const

Commands are linked together in the command graph with these relationships:

  • follower: The natural follower of the command.

Used when the command is not a branch, nor an end point.

  • true branch: The next command when the command's condition evaluates to true.
  • false branch: The next command when the command's condition evaluates to false.
  • predecessors: A list of commands whose execution can lead to this command.

Definition at line 270 of file tools/command.cpp.

CFGCommand * Stark::Tools::CFGCommand::getTrueBranch (  )  const

Definition at line 274 of file tools/command.cpp.

void Stark::Tools::CFGCommand::initBranches (  )  [protected]

Set the link indices from the argument values.

Definition at line 230 of file tools/command.cpp.

bool Stark::Tools::CFGCommand::isBranch (  )  const

Can this command influence the control flow?

Definition at line 254 of file tools/command.cpp.

bool Stark::Tools::CFGCommand::isBranchTarget (  )  const

Is this command a jump target?

Definition at line 258 of file tools/command.cpp.

bool Stark::Tools::CFGCommand::isEntryPoint (  )  const

Is this command an entry point for the whole script?

Definition at line 250 of file tools/command.cpp.

void Stark::Tools::CFGCommand::linkBranches ( const Common::Array< CFGCommand * > &  commands  ) 

Add the command to the command graph.

This sets the graph edges concerning this command.

Definition at line 282 of file tools/command.cpp.

void Stark::Tools::CFGCommand::setBlock ( Block block  ) 

Definition at line 266 of file tools/command.cpp.


Member Data Documentation

Definition at line 148 of file tools/command.h.

Definition at line 145 of file tools/command.h.

Definition at line 141 of file tools/command.h.

Definition at line 143 of file tools/command.h.

Definition at line 139 of file tools/command.h.

Definition at line 144 of file tools/command.h.

Definition at line 140 of file tools/command.h.


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


Generated on Sat Mar 16 2019 05:07:15 for ResidualVM by doxygen 1.7.1
curved edge   curved edge