>xabsl   The Extensible Agent Behavior Specification Language

XabslEngine Class Library Reference

 

xabsl::ConditionalDecimalExpression Class Reference

#include <XabslDecimalExpression.h>

Inheritance diagram for xabsl::ConditionalDecimalExpression:

Inheritance graph
[legend]
Collaboration diagram for xabsl::ConditionalDecimalExpression:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

Author:
Martin Loetzsch

Max Risler

Definition at line 346 of file XabslDecimalExpression.h.


Public Member Functions

 ConditionalDecimalExpression (InputSource &input, ErrorHandler &errorHandler, Symbols &symbols, Option &option, State &state)
 Constructor.

 ~ConditionalDecimalExpression ()
 Destructor.

virtual double getValue () const
 Calculates the value of the decimal expression.


Private Attributes

BooleanExpressioncondition
 The condition.

DecimalExpressionexpression1
 The expression that is returned when the condition evaluates true.

DecimalExpressionexpression2
 The expression that is returned when the condition evaluates false.


Constructor & Destructor Documentation

xabsl::ConditionalDecimalExpression::ConditionalDecimalExpression InputSource input,
ErrorHandler errorHandler,
Symbols symbols,
Option option,
State state
 

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.
errorHandler A reference to a ErrorHandler instance
symbols All available symbols
option The current option
state The current state

Definition at line 286 of file XabslDecimalExpression.cpp.

References condition, xabsl::ErrorHandler::error(), xabsl::ErrorHandler::errorsOccurred, expression1, expression2, xabsl::ErrorHandler::message(), and XABSL_DEBUG_INIT.

Here is the call graph for this function:

xabsl::ConditionalDecimalExpression::~ConditionalDecimalExpression  ) 
 

Destructor.

Definition at line 322 of file XabslDecimalExpression.cpp.

References condition, expression1, and expression2.


Member Function Documentation

double xabsl::ConditionalDecimalExpression::getValue  )  const [virtual]
 

Calculates the value of the decimal expression.

Implements xabsl::DecimalExpression.

Definition at line 329 of file XabslDecimalExpression.cpp.

References condition, expression1, expression2, xabsl::DecimalExpression::getValue(), and xabsl::BooleanExpression::getValue().

Here is the call graph for this function:


Member Data Documentation

BooleanExpression* xabsl::ConditionalDecimalExpression::condition [private]
 

The condition.

Definition at line 372 of file XabslDecimalExpression.h.

Referenced by ConditionalDecimalExpression(), getValue(), and ~ConditionalDecimalExpression().

DecimalExpression* xabsl::ConditionalDecimalExpression::expression1 [private]
 

The expression that is returned when the condition evaluates true.

Definition at line 375 of file XabslDecimalExpression.h.

Referenced by ConditionalDecimalExpression(), getValue(), and ~ConditionalDecimalExpression().

DecimalExpression* xabsl::ConditionalDecimalExpression::expression2 [private]
 

The expression that is returned when the condition evaluates false.

Definition at line 378 of file XabslDecimalExpression.h.

Referenced by ConditionalDecimalExpression(), getValue(), and ~ConditionalDecimalExpression().


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

Up | Main Page | Generated at Wed Aug 19 17:32:30 2009.