Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
DumpW.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/* DumpW.h (C) 2000-2022 */
9/* */
10/* Wrapper de IDataWriter sous l'ancienne interface IDumpW. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_STD_DUMPW_H
13#define ARCANE_STD_DUMPW_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/IDataWriter.h"
18#include "arcane/ArcaneTypes.h"
19
20#include "arcane/utils/Array.h"
21#include "arcane/utils/Array2.h"
22#include "arcane/utils/Array2View.h"
23#include "arcane/utils/MultiArray2.h"
24#include "arcane/utils/MultiArray2View.h"
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29namespace Arcane
30{
31
32/*---------------------------------------------------------------------------*/
33/*---------------------------------------------------------------------------*/
34
35class IVariable;
36class IData;
37
38/*---------------------------------------------------------------------------*/
39/*---------------------------------------------------------------------------*/
40
43class ARCANE_STD_EXPORT DumpW
44: public IDataWriter
45{
46 public:
47
49 DumpW();
50
52 virtual ~DumpW();
53
54 public:
55
57 void beginWrite(const VariableCollection& vars);
58
60 void write(IVariable* var, IData* data);
61
62 public:
63
65 virtual void endWrite() = 0;
66
68 virtual void setMetaData(const String& meta_data) = 0;
69
70 protected:
71
73 class DataVisitor;
74
76 virtual void beginWrite() = 0;
77
79 virtual void writeVal(IVariable& v, ConstArrayView<Byte> a) = 0;
80 virtual void writeVal(IVariable& v, ConstArrayView<Real> a) = 0;
81 virtual void writeVal(IVariable& v, ConstArrayView<Int64> a) = 0;
82 virtual void writeVal(IVariable& v, ConstArrayView<Int32> a) = 0;
83 virtual void writeVal(IVariable&, ConstArrayView<Int16>)
84 {
85 throw NotSupportedException(A_FUNCINFO);
86 }
87 virtual void writeVal(IVariable& v, ConstArrayView<Real2> a) = 0;
88 virtual void writeVal(IVariable& v, ConstArrayView<Real3> a) = 0;
89 virtual void writeVal(IVariable& v, ConstArrayView<Real2x2> a) = 0;
90 virtual void writeVal(IVariable& v, ConstArrayView<Real3x3> a) = 0;
91 virtual void writeVal(IVariable& v, ConstArrayView<String> a) = 0;
92
93 virtual void writeVal(IVariable& v, ConstArray2View<Byte> a) = 0;
94 virtual void writeVal(IVariable& v, ConstArray2View<Real> a) = 0;
95 virtual void writeVal(IVariable& v, ConstArray2View<Int64> a) = 0;
96 virtual void writeVal(IVariable& v, ConstArray2View<Int32> a) = 0;
97 virtual void writeVal(IVariable&, ConstArray2View<Int16>)
98 {
99 throw NotSupportedException(A_FUNCINFO);
100 }
101 virtual void writeVal(IVariable& v, ConstArray2View<Real2> a) = 0;
102 virtual void writeVal(IVariable& v, ConstArray2View<Real3> a) = 0;
103 virtual void writeVal(IVariable& v, ConstArray2View<Real2x2> a) = 0;
104 virtual void writeVal(IVariable& v, ConstArray2View<Real3x3> a) = 0;
105
106 virtual void writeVal(IVariable& v, ConstMultiArray2View<Byte> a) = 0;
107 virtual void writeVal(IVariable& v, ConstMultiArray2View<Real> a) = 0;
108 virtual void writeVal(IVariable& v, ConstMultiArray2View<Int64> a) = 0;
109 virtual void writeVal(IVariable& v, ConstMultiArray2View<Int32> a) = 0;
110 virtual void writeVal(IVariable&, ConstMultiArray2View<Int16>)
111 {
112 throw NotSupportedException(A_FUNCINFO);
113 }
114 virtual void writeVal(IVariable& v, ConstMultiArray2View<Real2> a) = 0;
115 virtual void writeVal(IVariable& v, ConstMultiArray2View<Real3> a) = 0;
116 virtual void writeVal(IVariable& v, ConstMultiArray2View<Real2x2> a) = 0;
117 virtual void writeVal(IVariable& v, ConstMultiArray2View<Real3x3> a) = 0;
118};
119
120/*---------------------------------------------------------------------------*/
121/*---------------------------------------------------------------------------*/
122
123} // End namespace Arcane
124
125/*---------------------------------------------------------------------------*/
126/*---------------------------------------------------------------------------*/
127
128#endif
wrapper transformant des appels à l'interface IDataWriter en ex IDumpW
Definition DumpW.h:45
virtual void beginWrite()=0
Notifie le début d'écriture.
virtual void writeVal(IVariable &v, ConstArrayView< Byte > a)=0
Ecriture pour la variable v du tableau a.
virtual void endWrite()=0
Notifie la fin d'écriture.
virtual void setMetaData(const String &meta_data)=0
Positionne les infos des méta-données.
Interface d'écriture des données d'une variable.
Definition IDataWriter.h:49
Interface d'une donnée.
Definition IData.h:33
Interface d'une variable.
Definition IVariable.h:54
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Collection de variables.
Exception lorsqu'une opération n'est pas supportée.
Chaîne de caractères unicode.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-