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

# Xabsl2ConditionalExpression Class Reference

Represents an ANSI C (condition?expression:expression) question mark operator. More...

`#include <Xabsl2DecimalExpression.h>`

Inheritance diagram for Xabsl2ConditionalExpression:

[legend]
Collaboration diagram for Xabsl2ConditionalExpression:

[legend]
List of all members.

## Public Member Functions
| Xabsl2ConditionalExpression (Xabsl2InputSource &input, Xabsl2Option *subsequentOption, Xabsl2ErrorHandler &errorHandler, Xabsl2Array< double > &parameters, Xabsl2Symbols &symbols, unsigned long &timeOfOptionExecution, unsigned long &timeOfStateExecution)
| Constructor.
| ~Xabsl2ConditionalExpression ()
| Destructor.
virtual double | getValue ()
| Calculates the value of the decimal expression.
## Private Attributes
Xabsl2BooleanExpression * | condition
| The condition.
Xabsl2DecimalExpression * | expression1
| The expression that is returned when the condition evaluates true.
Xabsl2DecimalExpression * | expression2
| The expression that is returned when the condition evaluates false.

## Detailed Description

Represents an ANSI C (condition?expression:expression) question mark operator.

Author:
  Martin Lötzsch

Definition at line 349 of file Xabsl2DecimalExpression.h.

## Constructor & Destructor Documentation

Xabsl2ConditionalExpression::Xabsl2ConditionalExpression | ( | Xabsl2InputSource & | input,
|  | Xabsl2Option * | subsequentOption,
|  | Xabsl2ErrorHandler & | errorHandler,
|  | Xabsl2Array< double > & | parameters,
|  | Xabsl2Symbols & | symbols,
|  | unsigned long & | timeOfOptionExecution,
|  | unsigned long & | timeOfStateExecution
| ) |

  | Constructor. Creates the expression Parameters:
  input | An input source for the intermediate code. It must be opened and read until A position where a expression starts.
  subsequentOption | The subsequent option of the state. 0 if the subsequent behavior is a basic behavior
  errorHandler | A reference to a Xabsl2ErrorHandler instance
  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 307 of file Xabsl2DecimalExpression.cpp. References condition, Xabsl2BooleanExpression::create(), Xabsl2DecimalExpression::createOperand(), Xabsl2ErrorHandler::error(), Xabsl2ErrorHandler::errorsOccurred, expression1, expression2, Xabsl2ErrorHandler::message(), and XABSL2_DEBUG_INIT.

Here is the call graph for this function:

Xabsl2ConditionalExpression::~Xabsl2ConditionalExpression | ( |  | ) |

| Destructor. Definition at line 346 of file Xabsl2DecimalExpression.cpp. References condition, expression1, and expression2.

## Member Function Documentation

double Xabsl2ConditionalExpression::getValue | ( |  | ) | `[virtual]`

| Calculates the value of the decimal expression. Implements Xabsl2DecimalExpression. Definition at line 353 of file Xabsl2DecimalExpression.cpp. References condition, expression1, expression2, Xabsl2DecimalExpression::getValue(), and Xabsl2BooleanExpression::getValue().

Here is the call graph for this function:

## Member Data Documentation

Xabsl2BooleanExpression* Xabsl2ConditionalExpression::condition`[private]`

| The condition. Definition at line 379 of file Xabsl2DecimalExpression.h. Referenced by getValue(), Xabsl2ConditionalExpression(), and ~Xabsl2ConditionalExpression().

Xabsl2DecimalExpression* Xabsl2ConditionalExpression::expression1`[private]`

| The expression that is returned when the condition evaluates true. Definition at line 382 of file Xabsl2DecimalExpression.h. Referenced by getValue(), Xabsl2ConditionalExpression(), and ~Xabsl2ConditionalExpression().

Xabsl2DecimalExpression* Xabsl2ConditionalExpression::expression2`[private]`

| The expression that is returned when the condition evaluates false. Definition at line 385 of file Xabsl2DecimalExpression.h. Referenced by getValue(), Xabsl2ConditionalExpression(), and ~Xabsl2ConditionalExpression().

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

- Tools/Xabsl2/Xabsl2Engine/Xabsl2DecimalExpression.h
- Tools/Xabsl2/Xabsl2Engine/Xabsl2DecimalExpression.cpp