Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members

CCM::Block Class Reference

Inheritance diagram for CCM::Block:

CCM::Statement List of all members.

Detailed Description

Statement block (list of Statements).


Public Member Functions

 Block (Block parent)
 Create empty block as a subblock of parent (null for toplevel blocks).

Block getParent ()
 Return the block's parent (null for toplevel blocks).

void addStm (Statement s)
 Add the given statement to the end of the block.

void addStm (IList sl)
 Add given list of Statements to the end of the block.

override void execute ()
 Execute statement.

void addVar (Variable v)
 Add given local variable to the block.

Variable getVar (string name)
 Return the local variable with given name.


Static Public Member Functions

Block getCurrentBlock ()
 Return the block that is currently executed.


Static Public Attributes

bool breakFlag = false
 If true, the current loop must be break'ed.

bool continueFlag = false
 If true, the current loop must be continue'd.


Private Attributes

Hashtable vars
 Local variables (string -> Variable).

IList stm
 Contained Statements.

Block parent
 Parent block (null for toplevel blocks).


Static Private Attributes

Block currentBlock = null
 Global pointer to get the current variable scope; handled by execute().


Constructor & Destructor Documentation

CCM::Block::Block Block  parent  ) 
 

Create empty block as a subblock of parent (null for toplevel blocks).


Member Function Documentation

void CCM::Block::addStm IList  sl  ) 
 

Add given list of Statements to the end of the block.

void CCM::Block::addStm Statement  s  ) 
 

Add the given statement to the end of the block.

void CCM::Block::addVar Variable  v  ) 
 

Add given local variable to the block.

override void CCM::Block::execute  )  [virtual]
 

Execute statement.

Implements CCM::Statement.

Block CCM::Block::getCurrentBlock  )  [static]
 

Return the block that is currently executed.

Block CCM::Block::getParent  ) 
 

Return the block's parent (null for toplevel blocks).

Variable CCM::Block::getVar string  name  ) 
 

Return the local variable with given name.

Also looks for variables in parent blocks.


Member Data Documentation

bool CCM::Block::breakFlag = false [static]
 

If true, the current loop must be break'ed.

bool CCM::Block::continueFlag = false [static]
 

If true, the current loop must be continue'd.

Block CCM::Block::currentBlock = null [static, private]
 

Global pointer to get the current variable scope; handled by execute().

Block CCM::Block::parent [private]
 

Parent block (null for toplevel blocks).

IList CCM::Block::stm [private]
 

Contained Statements.

Hashtable CCM::Block::vars [private]
 

Local variables (string -> Variable).


The documentation for this class was generated from the following file:
Generated on Mon Jun 21 01:20:50 2004 for cs2ccmb by doxygen 1.3.7