15#include "arcane/utils/ArcanePrecomp.h"
17#include "arcane/IVariableAccessor.h"
18#include "arcane/ISubDomain.h"
19#include "arcane/ArcaneException.h"
20#include "arcane/VariableExpressionImpl.h"
22#include "arcane/expr/OperatorMng.h"
23#include "arcane/expr/BadOperationException.h"
33VariableExpressionImpl::
34VariableExpressionImpl(IVariable* var)
38 VariantBase::eType type = VariantBase::fromDataType(m_variable->dataType());
39 m_op = m_op_mng->find(
this, type);
41 throw BadOperationException(
"VariableExpressionImpl::VariableExpressionImpl",
"",type);
47void VariableExpressionImpl::
48assign(IExpressionImpl* expr)
50 ExpressionResult result(m_variable);
57void VariableExpressionImpl::
58assign(IExpressionImpl* expr, IntegerConstArrayView indices)
60 ExpressionResult result(indices);
61 result.allocate(VariantBase::fromDataType(m_variable->dataType()));
63 m_op->assign(&result, m_variable);
69void VariableExpressionImpl::
70apply(ExpressionResult* result)
72 m_op->evaluate(result, m_variable);
81 if (m_variable->dimension()!=1)
83 return m_variable->nbElement();
Int32 Integer
Type représentant un entier.