Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
OperatorMng.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* OperatorMng.h (C) 2000-2004 */
9/* */
10/* Stocke tous les types d'opérateur possibles sur les expressions. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_UTILS_OPERATORMNG_H
13#define ARCANE_UTILS_OPERATORMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/expr/UnaryExpressionImpl.h"
18#include "arcane/expr/BinaryExpressionImpl.h"
19#include "arcane/expr/WhereExpressionImpl.h"
20#include "arcane/expr/LitteralExpressionImpl.h"
21
22//%% ARCANE_EXPR_SUPPRESS_BEGIN
23#include "arcane/VariableExpressionImpl.h"
24//%% ARCANE_EXPR_SUPPRESS_END
25
26#include <map>
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31ARCANE_BEGIN_NAMESPACE
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
35
39class ARCANE_EXPR_EXPORT OperatorMng
40{
41 protected:
44
45 public:
46 static OperatorMng* instance();
47
48 public:
50 VariantBase::eType type,
51 UnaryExpressionImpl::eOperationType operation);
52
54 VariantBase::eType type,
55 BinaryExpressionImpl::eOperationType operation);
56
58 VariantBase::eType type);
59
61 VariantBase::eType type);
62
63//%% ARCANE_EXPR_SUPPRESS_BEGIN
65 VariantBase::eType type);
66//%% ARCANE_EXPR_SUPPRESS_END
67
68 private:
69 static OperatorMng* m_instance;
70
71 private:
72 typedef std::map<VariantBase::eType, UnaryOperator*,
73 std::less<VariantBase::eType> > UnaryOpMap;
74 UnaryOpMap m_unary_op[UnaryExpressionImpl::NbOperationType];
75
76 typedef std::map<VariantBase::eType, BinaryOperator*,
77 std::less<Integer> > BinaryOpMap;
78 BinaryOpMap m_binary_op[BinaryExpressionImpl::NbOperationType];
79
80 typedef std::map<VariantBase::eType, WhereOperator*,
81 std::less<VariantBase::eType> > WhereOpMap;
82 WhereOpMap m_where_op;
83
84 typedef std::map<VariantBase::eType, LitteralOperator*,
85 std::less<VariantBase::eType> > LitteralOpMap;
86 LitteralOpMap m_litteral_op;
87
88//%% ARCANE_EXPR_SUPPRESS_BEGIN
89 typedef std::map<VariantBase::eType, VariableOperator*,
90 std::less<VariantBase::eType> > VariableOpMap;
91 VariableOpMap m_variable_op;
92//%% ARCANE_EXPR_SUPPRESS_END
93};
94
95/*---------------------------------------------------------------------------*/
96/*---------------------------------------------------------------------------*/
97
98ARCANE_END_NAMESPACE
99
100/*---------------------------------------------------------------------------*/
101/*---------------------------------------------------------------------------*/
102
103#endif
Implementation d'une expression binaire.
Operateur binaire generique pour les expressions.
Implementation d'une expression litterale contenant un scalaire.
Operateur de cast generique pour les litteraux.
Stocke tous les types d'operateur possibles sur les expressions.
Definition OperatorMng.h:40
Implementation d'une expression unaire.
Operateur unaire generique pour les expressions.
Operateur binaire generique pour les expressions.
Implementation d'une expression binaire.
Operateur generique pour les expressions conditionnnelle.