Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
IDataVisitor.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2023 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/* IDataVisitor.h (C) 2000-2023 */
9/* */
10/* Interface du pattern visitor pour une donnée. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_IDATAVISITOR_H
13#define ARCANE_IDATAVISITOR_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/ArcaneTypes.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28class IData;
29class IScalarData;
30class IArrayData;
31class IArray2Data;
32class IMultiArray2Data;
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
42class ARCANE_CORE_EXPORT IDataVisitor
43{
44 public:
45
46 virtual ~IDataVisitor() {}
47
48 public:
49
50 virtual void applyDataVisitor(IScalarData* data) = 0;
51 virtual void applyDataVisitor(IArrayData* data) = 0;
52 virtual void applyDataVisitor(IArray2Data* data) = 0;
53 // No longer used. Throw NotSupportedException
54 virtual void applyDataVisitor(IMultiArray2Data*);
55};
56
57/*---------------------------------------------------------------------------*/
58/*---------------------------------------------------------------------------*/
62class ARCANE_CORE_EXPORT IScalarDataVisitor
63{
64 public:
65
66 virtual ~IScalarDataVisitor() {}
67
68 public:
69
70 virtual void applyVisitor(IScalarDataT<Byte>* data) = 0;
71 virtual void applyVisitor(IScalarDataT<Real>* data) = 0;
72 virtual void applyVisitor(IScalarDataT<Int16>* data) = 0;
73 virtual void applyVisitor(IScalarDataT<Int32>* data) = 0;
74 virtual void applyVisitor(IScalarDataT<Int64>* data) = 0;
75 virtual void applyVisitor(IScalarDataT<Real2>* data) = 0;
76 virtual void applyVisitor(IScalarDataT<Real3>* data) = 0;
77 virtual void applyVisitor(IScalarDataT<Real2x2>* data) = 0;
78 virtual void applyVisitor(IScalarDataT<Real3x3>* data) = 0;
79 virtual void applyVisitor(IScalarDataT<String>* data) = 0;
80};
81
82/*---------------------------------------------------------------------------*/
83/*---------------------------------------------------------------------------*/
87class ARCANE_CORE_EXPORT IArrayDataVisitor
88{
89 public:
90
91 virtual ~IArrayDataVisitor() {}
92
93 public:
94
95 virtual void applyVisitor(IArrayDataT<Byte>* data) = 0;
96 virtual void applyVisitor(IArrayDataT<Real>* data) = 0;
97 virtual void applyVisitor(IArrayDataT<Int16>* data) = 0;
98 virtual void applyVisitor(IArrayDataT<Int32>* data) = 0;
99 virtual void applyVisitor(IArrayDataT<Int64>* data) = 0;
100 virtual void applyVisitor(IArrayDataT<Real2>* data) = 0;
101 virtual void applyVisitor(IArrayDataT<Real3>* data) = 0;
102 virtual void applyVisitor(IArrayDataT<Real2x2>* data) = 0;
103 virtual void applyVisitor(IArrayDataT<Real3x3>* data) = 0;
104 virtual void applyVisitor(IArrayDataT<String>* data) = 0;
105};
106
107/*---------------------------------------------------------------------------*/
108/*---------------------------------------------------------------------------*/
112class ARCANE_CORE_EXPORT IArray2DataVisitor
113{
114 public:
115
116 virtual ~IArray2DataVisitor() {}
117
118 public:
119
120 virtual void applyVisitor(IArray2DataT<Byte>* data) = 0;
121 virtual void applyVisitor(IArray2DataT<Real>* data) = 0;
122 virtual void applyVisitor(IArray2DataT<Int16>* data) = 0;
123 virtual void applyVisitor(IArray2DataT<Int32>* data) = 0;
124 virtual void applyVisitor(IArray2DataT<Int64>* data) = 0;
125 virtual void applyVisitor(IArray2DataT<Real2>* data) = 0;
126 virtual void applyVisitor(IArray2DataT<Real3>* data) = 0;
127 virtual void applyVisitor(IArray2DataT<Real2x2>* data) = 0;
128 virtual void applyVisitor(IArray2DataT<Real3x3>* data) = 0;
129};
130
131/*---------------------------------------------------------------------------*/
132/*---------------------------------------------------------------------------*/
138class ARCANE_CORE_EXPORT IMultiArray2DataVisitor
139{
140 public:
141
142 virtual ~IMultiArray2DataVisitor() {}
143
144 public:
145
146 virtual void applyVisitor(IMultiArray2DataT<Byte>*) {}
147 virtual void applyVisitor(IMultiArray2DataT<Real>*) {}
148 virtual void applyVisitor(IMultiArray2DataT<Int16>*) {}
149 virtual void applyVisitor(IMultiArray2DataT<Int32>*) {}
150 virtual void applyVisitor(IMultiArray2DataT<Int64>*) {}
151 virtual void applyVisitor(IMultiArray2DataT<Real2>*) {}
152 virtual void applyVisitor(IMultiArray2DataT<Real3>*) {}
153 virtual void applyVisitor(IMultiArray2DataT<Real2x2>*) {}
154 virtual void applyVisitor(IMultiArray2DataT<Real3x3>*) {}
155};
156
157/*---------------------------------------------------------------------------*/
158/*---------------------------------------------------------------------------*/
159
160} // namespace Arcane
161
162/*---------------------------------------------------------------------------*/
163/*---------------------------------------------------------------------------*/
164
165#endif
Interface du pattern visitor pour une donnée tableau 2D.
Interface d'une donnée tableau 2D.
Definition IData.h:340
Interface du pattern visitor pour une donnée tableau.
Interface d'une donnée tableau 1D.
Definition IData.h:276
Interface du pattern visitor pour une donnée.
Interface du pattern visitor pour une donnée tableau 2D à taille variable.
Interface d'une donnée tableau multi 2D.
Definition IData.h:351
Interface du pattern visitor pour une donnée scalaire.
Interface d'une donnée scalaire.
Definition IData.h:227
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-