DiaDes  0.1
DIAgnosis of Discrete-Event System
Public Member Functions | Private Attributes | Friends | List of all members
Diades::Altarica::NeqExpression Class Reference

#include <Expression.hh>

Public Member Functions

 NeqExpression (Expression *logicalComparison, Expression *arithmeticExpr)
 
virtual bool valid () const
 
int type () const
 
bool eval (Value &result) const
 
virtual Type valueType () const
 
Expressionleft () const
 
Expressionright () const
 
virtual bool isConstant () const
 
ConstraintOperator constraintOperator () const
 
- Public Member Functions inherited from Diades::Altarica::Expression
 Expression ()
 
VariableIterator beginOfVariables () const
 
VariableIterator endOfVariables () const
 
SizeType supportSize () const
 

Private Attributes

Expression_logicalComparison
 
Expression_arithmeticExpr
 

Friends

ostream & operator<< (ostream &os, const Expression &expression)
 

Additional Inherited Members

- Public Types inherited from Diades::Altarica::Expression
typedef Utils::Exception< ExpressionException
 
typedef vector< Variable >::const_iterator VariableIterator
 
typedef vector< Variable >::size_type SizeType
 
typedef vector< VariableSupport
 
- Static Public Member Functions inherited from Diades::Altarica::Expression
static string typeName ()
 
- Protected Attributes inherited from Diades::Altarica::Expression
Support _varSupport
 
Type _returnedType
 Variables that are supporting the Expression. More...
 

Detailed Description

Definition at line 418 of file Expression.hh.

Constructor & Destructor Documentation

Diades::Altarica::NeqExpression::NeqExpression ( Expression logicalComparison,
Expression arithmeticExpr 
)
inline

Member Function Documentation

ConstraintOperator Diades::Altarica::NeqExpression::constraintOperator ( ) const
inline

Definition at line 457 of file Expression.hh.

References Diades::Altarica::Neq.

bool Diades::Altarica::NeqExpression::eval ( Value value) const
virtual

Expression evaluation: this operation evaluates the expression with the current value associated to the variables that support the Expression. The evaluation is failing if there is a variable of the support that is still free (that is an unassigned variable).

Parameters
valuethe Value resulting from the evaluation of the current Expression.
Returns
true if the operation succeeds, false otherwise.

Implements Diades::Altarica::Expression.

virtual bool Diades::Altarica::NeqExpression::isConstant ( ) const
inlinevirtual
Returns
true if the Expression is constant

Implements Diades::Altarica::Expression.

Definition at line 453 of file Expression.hh.

References Diades::Altarica::Expression::isConstant(), left(), and right().

Expression* Diades::Altarica::NeqExpression::left ( ) const
inline

Definition at line 445 of file Expression.hh.

References _logicalComparison.

Referenced by isConstant().

Expression* Diades::Altarica::NeqExpression::right ( ) const
inline

Definition at line 449 of file Expression.hh.

References _arithmeticExpr.

Referenced by isConstant().

int Diades::Altarica::NeqExpression::type ( ) const
inlinevirtual

Type of an expression

Returns
an integer that determines the current type of the Expression. It is way to avoid the use of RTTI and gets a lighter implementation. The returned type is one the the altarica type: that is AR_TREE_ITE, AR_TREE_CASE, AR_TREE_OR,... See arsyntax/altarica-tree.h for the exhaustive list of expression types.

Implements Diades::Altarica::Expression.

Definition at line 435 of file Expression.hh.

virtual bool Diades::Altarica::NeqExpression::valid ( ) const
inlinevirtual

Validity of an Expression

Returns
true if the current Expression is valid.

Implements Diades::Altarica::Expression.

Definition at line 431 of file Expression.hh.

References Diades::Altarica::Expression::valid().

virtual Type Diades::Altarica::NeqExpression::valueType ( ) const
inlinevirtual

Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const Expression expression 
)
friend

Member Data Documentation

Expression* Diades::Altarica::NeqExpression::_arithmeticExpr
private

Definition at line 422 of file Expression.hh.

Referenced by NeqExpression(), and right().

Expression* Diades::Altarica::NeqExpression::_logicalComparison
private

Definition at line 421 of file Expression.hh.

Referenced by left(), and NeqExpression().


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