14#include "arcane/utils/ArcanePrecomp.h"
16#include "arcane/expr/BinaryExpressionImpl.h"
17#include "arcane/expr/OperatorMng.h"
18#include "arcane/expr/BadOperationException.h"
31 eOperationType operation)
35, m_operation(operation)
42String BinaryExpressionImpl::
43operationName(eOperationType type)
65 return "LessOrEqualThan";
66 case GreaterOrEqualThan:
67 return "GreaterOrEqualThan";
76void BinaryExpressionImpl::
77apply(ExpressionResult* result)
85 ExpressionResult first_op(result->indices());
86 m_first->apply(&first_op);
87 ExpressionResult second_op(result->indices());
88 m_second->apply(&second_op);
91 VariantBase::eType type = first_op.data()->type();
92 BinaryOperator* op = m_op_mng->find(
this, type, m_operation);
94 throw BadOperationException(
"BinaryExpressionImpl::apply",
95 operationName(), type);
97 op->evaluate(result, first_op.data(), second_op.data());
Base class for the expression implementation.
Interface for the different implementations of an expression.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --