Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Xabsl2IfElseBlock Class Reference

An element of a decision tree that that contains of an if - (else-if) - else block. More...

#include <Xabsl2Option.h>

Inheritance diagram for Xabsl2IfElseBlock:

Inheritance graph
[legend]
Collaboration diagram for Xabsl2IfElseBlock:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Xabsl2IfElseBlock (Xabsl2InputSource &input, Xabsl2Option *subsequentOption, Xabsl2ErrorHandler &errorHandler, Xabsl2Array< Xabsl2State * > &states, Xabsl2Array< double > &parameters, Xabsl2Symbols &symbols, unsigned long &timeOfOptionExecution, unsigned long &timeOfStateExecution)
 Constructor.

 ~Xabsl2IfElseBlock ()
 Destructor.

virtual Xabsl2StategetNextState ()
 Executes the statement and determines the next active state (can be the same).


Private Attributes

Xabsl2BooleanExpressionifCondition
 The boolean expression that is evaluated for the if case.

Xabsl2StatementifStatement
 The statement that is executed if the if condition is true.

Xabsl2Array< Xabsl2BooleanExpression * > elseIfConditions
 The boolean expressions for the else-if cases.

Xabsl2Array< Xabsl2Statement * > elseIfStatements
 The statements that are executed if the else-if condition are true.

Xabsl2StatementelseStatement
 The statement that is executed if all if and else-if conditions fail.


Detailed Description

An element of a decision tree that that contains of an if - (else-if) - else block.

Author:
Martin Lötzsch. l

Definition at line 65 of file Xabsl2Option.h.


Constructor & Destructor Documentation

Xabsl2IfElseBlock::Xabsl2IfElseBlock Xabsl2InputSource input,
Xabsl2Option subsequentOption,
Xabsl2ErrorHandler errorHandler,
Xabsl2Array< Xabsl2State * > &  states,
Xabsl2Array< double > &  parameters,
Xabsl2Symbols symbols,
unsigned long &  timeOfOptionExecution,
unsigned long &  timeOfStateExecution
 

Constructor.

Creates the if / else statement

Parameters:
input An input source for the intermediate code. It must be opened and read until A position where a transition starts.
subsequentOption The subsequent option of the state. 0 if the subsequent behavior is a basic behavior
errorHandler A reference to a Xabsl2ErrorHandler instance
states All states of the option
parameters The parameters of the option
symbols All available symbols
timeOfOptionExecution The time how long the option is already active
timeOfStateExecution The time how long the state is already active

Definition at line 41 of file Xabsl2Option.cpp.

References Xabsl2Array< Xabsl2Statement * >::append(), Xabsl2Array< Xabsl2BooleanExpression * >::append(), Xabsl2BooleanExpression::create(), Xabsl2Statement::createStatement(), elseIfConditions, elseIfStatements, elseStatement, Xabsl2ErrorHandler::error(), Xabsl2ErrorHandler::errorsOccurred, ifCondition, ifStatement, Xabsl2ErrorHandler::message(), Xabsl2InputSource::readValue(), and XABSL2_DEBUG_INIT.

Here is the call graph for this function:

Xabsl2IfElseBlock::~Xabsl2IfElseBlock  ) 
 

Destructor.

Deletes all statements and conditions

Definition at line 105 of file Xabsl2Option.cpp.

References elseIfConditions, elseIfStatements, elseStatement, Xabsl2Array< Xabsl2Statement * >::getSize(), ifCondition, and ifStatement.

Here is the call graph for this function:


Member Function Documentation

Xabsl2State * Xabsl2IfElseBlock::getNextState  )  [virtual]
 

Executes the statement and determines the next active state (can be the same).

Implements Xabsl2Statement.

Definition at line 122 of file Xabsl2Option.cpp.

References elseIfConditions, elseIfStatements, elseStatement, Xabsl2Statement::getNextState(), Xabsl2Array< Xabsl2BooleanExpression * >::getSize(), Xabsl2BooleanExpression::getValue(), ifCondition, and ifStatement.

Here is the call graph for this function:


Member Data Documentation

Xabsl2BooleanExpression* Xabsl2IfElseBlock::ifCondition [private]
 

The boolean expression that is evaluated for the if case.

Definition at line 98 of file Xabsl2Option.h.

Referenced by getNextState(), Xabsl2IfElseBlock(), and ~Xabsl2IfElseBlock().

Xabsl2Statement* Xabsl2IfElseBlock::ifStatement [private]
 

The statement that is executed if the if condition is true.

Definition at line 101 of file Xabsl2Option.h.

Referenced by getNextState(), Xabsl2IfElseBlock(), and ~Xabsl2IfElseBlock().

Xabsl2Array<Xabsl2BooleanExpression*> Xabsl2IfElseBlock::elseIfConditions [private]
 

The boolean expressions for the else-if cases.

Definition at line 104 of file Xabsl2Option.h.

Referenced by getNextState(), Xabsl2IfElseBlock(), and ~Xabsl2IfElseBlock().

Xabsl2Array<Xabsl2Statement*> Xabsl2IfElseBlock::elseIfStatements [private]
 

The statements that are executed if the else-if condition are true.

Definition at line 107 of file Xabsl2Option.h.

Referenced by getNextState(), Xabsl2IfElseBlock(), and ~Xabsl2IfElseBlock().

Xabsl2Statement* Xabsl2IfElseBlock::elseStatement [private]
 

The statement that is executed if all if and else-if conditions fail.

Definition at line 110 of file Xabsl2Option.h.

Referenced by getNextState(), Xabsl2IfElseBlock(), and ~Xabsl2IfElseBlock().


The documentation for this class was generated from the following files:
Generated on Thu Sep 23 20:12:34 2004 for GT2004 by doxygen 1.3.6