LAMA
|
The template class Expression represents a mathematical expression. More...
#include <Expression.hpp>
Public Types | |
typedef T1 | Arg1Type |
typedef T2 | Arg2Type |
typedef Expression | ExpressionType |
typedef const ExpressionType | ExpressionMemberType |
Public Member Functions | |
Expression (const Arg1Type &arg1, const Arg2Type &arg2) | |
This constructor creates a Expression for the given types. | |
virtual | ~Expression () |
The destructor destroys this Expression. | |
ExpressionTypes | getExpressionType () const |
getExpressionType returns the expression type of this Expression. | |
const Arg1Type & | getArg1 () const |
getArg1() returns a reference to the first operand of this Expression. | |
const Arg2Type & | getArg2 () const |
getArg2() returns a reference to the second operand of this Expression. | |
Private Attributes | |
const ExpressionTypes | mExpressionType |
Arg1Type::ExpressionMemberType | mArg1 |
Arg2Type::ExpressionMemberType | mArg2 |
The template class Expression represents a mathematical expression.
The template class Expression represents a mathematical expression with two operands. The supported operators are defined with ExpressionTypes. The expression holds references to the two operands.
T1 | the type of the first operand of the expression |
T2 | the type of the second operand of the expression |
type | the type of the operation |
An object of class expression is comparable to an abstract syntax tree for a binary expression. Operations on this object are just the constructor, the getter for the expression type and the two getters for the operands.
typedef T1 lama::Expression< T1, T2, type >::Arg1Type |
typedef T2 lama::Expression< T1, T2, type >::Arg2Type |
typedef const ExpressionType lama::Expression< T1, T2, type >::ExpressionMemberType |
typedef Expression lama::Expression< T1, T2, type >::ExpressionType |
lama::Expression< T1, T2, type >::Expression | ( | const Arg1Type & | arg1, |
const Arg2Type & | arg2 | ||
) | [inline] |
This constructor creates a Expression for the given types.
arg1 | the first operand of the expression |
arg2 | the second operand of the expression |
virtual lama::Expression< T1, T2, type >::~Expression | ( | ) | [inline, virtual] |
The destructor destroys this Expression.
const Arg1Type& lama::Expression< T1, T2, type >::getArg1 | ( | ) | const [inline] |
getArg1() returns a reference to the first operand of this Expression.
References lama::Expression< T1, T2, type >::mArg1.
Referenced by lama::operator*(), lama::operator+(), lama::operator-(), lama::Vector::operator=(), and lama::Matrix::operator=().
const Arg2Type& lama::Expression< T1, T2, type >::getArg2 | ( | ) | const [inline] |
getArg2() returns a reference to the second operand of this Expression.
References lama::Expression< T1, T2, type >::mArg2.
Referenced by lama::operator*(), lama::operator+(), lama::operator-(), lama::Vector::operator=(), and lama::Matrix::operator=().
ExpressionTypes lama::Expression< T1, T2, type >::getExpressionType | ( | ) | const [inline] |
getExpressionType returns the expression type of this Expression.
References lama::Expression< T1, T2, type >::mExpressionType.
Arg1Type::ExpressionMemberType lama::Expression< T1, T2, type >::mArg1 [private] |
Referenced by lama::Expression< T1, T2, type >::getArg1().
Arg2Type::ExpressionMemberType lama::Expression< T1, T2, type >::mArg2 [private] |
Referenced by lama::Expression< T1, T2, type >::getArg2().
const ExpressionTypes lama::Expression< T1, T2, type >::mExpressionType [private] |
Referenced by lama::Expression< T1, T2, type >::getExpressionType().