Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
Hdf5VariableReader_axl.h
1/*---------------------------------------------------------------------------*/
2/*---------------------------------------------------------------------------*/
3// #WARNING#: This file has been generated automatically. Do not edit.
4// Arcane version 1.0 : 11/18/2024 02:52:06
5/*---------------------------------------------------------------------------*/
6/*---------------------------------------------------------------------------*/
7
8#ifndef ARCANE_CASEOPTION_AXLSTAR_ARCANE_HDF5VARIABLEREADER_H
9#define ARCANE_CASEOPTION_AXLSTAR_ARCANE_HDF5VARIABLEREADER_H
10
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/utils/String.h"
15
16#include "arcane/CaseOptions.h"
17#include "arcane/CaseOptionsMulti.h"
18#include "arcane/CaseOptionBuildInfo.h"
19#include "arcane/XmlNodeList.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24ARCANE_BEGIN_NAMESPACE
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
31{
32public:
33
34 /*-------------------------------------------------------------------------*/
35 /*--------------------------- Complex Options -----------------------------*/
36 /*-------------------------------------------------------------------------*/
37 // Generation for option 'read'
38 // Generating multiple arity CaseOption for complex option value 'read'
41 {
42 public:
43
45
47 : Arcane::CaseOptionComplexValue(opt,icl,element)
48 , meshName(Arcane::CaseOptionBuildInfo(_configList(),
49 /* name */ "mesh-name", _element(),
50 /* default */ "Mesh0",
51 /* min-occurs */ 1,
52 /* max-occurs */ 1,
53 /* optional */ false))
54 , fileName(Arcane::CaseOptionBuildInfo(_configList(),
55 /* name */ "file-name", _element(),
56 /* default */ Arcane::String(),
57 /* min-occurs */ 1,
58 /* max-occurs */ 1,
59 /* optional */ false))
60
61 {
62
63meshName.addAlternativeNodeName(
64 /* language */ Arcane::String("fr"),
65 /* alternative name */ Arcane::String("nom-maillage"));
66fileName.addAlternativeNodeName(
67 /* language */ Arcane::String("fr"),
68 /* alternative name */ Arcane::String("nom-fichier"));
69
70 }
71 public:
72 // Interfaces for multi-arity class CaseOptionsRead
73
74 Arcane::String getMeshName() { return meshName(); }
75 Arcane::ICaseFunction* getMeshNameFunction() { return meshName.function(); }
76 Arcane::IStandardFunction* getMeshNameStandardFunction() { return meshName.standardFunction(); }
77 Arcane::String getFileName() { return fileName(); }
78 Arcane::ICaseFunction* getFileNameFunction() { return fileName.function(); }
79 Arcane::IStandardFunction* getFileNameStandardFunction() { return fileName.standardFunction(); }
80
81
82
83 // Interfaces for complex options
84
85
86 public:
87
88 const ThatClass* operator->() const { return this; }
89
90 public:
91
94 };
95
96 // Generation for sub-option 'read'
99 , private Arcane::ArrayView< CaseOptionReadValue * >
100 {
101 public:
102
104
106
107 public:
108
110 const Arcane::String& s, const Arcane::XmlNode& element)
111 : Arcane::CaseOptionsMulti(icl,s,element,0,-1)
112 {
113 // Generating translations and default values.
114 addAlternativeNodeName(
115 /* language */ Arcane::String("fr"),
116 /* alternative name */ Arcane::String("lecture"));
117 }
118
119 BaseClass operator()() { return (*this); }
120
121 protected:
122 void multiAllocate(const Arcane::XmlNodeList& elist)
123 {
124 Arcane::Integer s = elist.size();
125 value_type** v = 0;
126 if (s!=0)
127 v = new value_type*[s];
128 _setArray(v,s);
129 v = _ptr();
130 for( Arcane::Integer i=0; i<s; ++i ){
131 v[i] = new value_type(this,configList(),elist[i]);
132 }
133 }
134
135 public:
136
138 {
139 Arcane::Integer s = count();
140 if (s==0) return;
141 value_type** v = _ptr();
142 for( Arcane::Integer i=0; i<s; ++i ){
143 delete v[i];
144 }
145 delete[] v;
146 }
147
148 public:
149
150 const value_type& operator[](Arcane::Integer i) const
151 { return *(BaseClass::operator[](i)); }
152 value_type& operator[](Arcane::Integer i)
153 { return *(BaseClass::operator[](i)); }
154 Arcane::Integer count() const
155 { return BaseClass::size(); }
156 Arcane::Integer size() const
157 { return BaseClass::size(); }
158
159 };
160
161
162 /*-------------------------------------------------------------------------*/
163 /*--------------------------- Non Complex Options -------------------------*/
164 /*-------------------------------------------------------------------------*/
165
167 : m_case_options(co)
168 , read(_configList(),
169 /* name */ "read", _element())
170 {
171
172read.addAlternativeNodeName(
173 /* language */ Arcane::String("fr"),
174 /* alternative name */ Arcane::String("lecture"));
175addAlternativeNodeName(
176 /* language */ Arcane::String("fr"),
177 /* alternative name */ Arcane::String("lecteur-variable-hdf5"));
178 }
179
180public:
181 // Interfaces for main CaseOptions
182
183
184
185
186 // Interfaces for complex options
187
188
189public:
190
191 Arcane::ICaseOptions* caseOptions() const
192 {
193 return m_case_options.get();
194 }
195
196 Arcane::ICaseOptionList* configList() const
197 {
198 return m_case_options->configList();
199 }
200
201 void setCaseModule(Arcane::IModule* m)
202 {
203 m_case_options->setCaseModule(m);
204 }
205
206 void setCaseServiceInfo(Arcane::IServiceInfo* si)
207 {
208 m_case_options->setCaseServiceInfo(si);
209 }
210
211 void addAlternativeNodeName(const Arcane::String& lang,
212 const Arcane::String& name)
213 {
214 m_case_options->addAlternativeNodeName(lang,name);
215 }
216
217private:
218
219 Arcane::ICaseOptionList* _configList() const { return configList(); }
220 Arcane::XmlNode _element() const { return Arcane::XmlNode(); }
221
222private:
223
224 static Arcane::ICaseOptions* _createCaseOption(Arcane::ICaseMng* cm,Arcane::ICaseOptions* co);
225
227
228public:
229
230
231 CaseOptionRead read;
232};
233
234/*---------------------------------------------------------------------------*/
235/*---------------------------------------------------------------------------*/
236
237ARCANE_END_NAMESPACE
238
239/*---------------------------------------------------------------------------*/
240/*---------------------------------------------------------------------------*/
241
242#endif
243
244
245
246/*---------------------------------------------------------------------------*/
247/*---------------------------------------------------------------------------*/
248// #WARNING#: This file has been generated automatically. Do not edit.
249// Arcane version 1.0 : 11/18/2024 02:52:06
250/*---------------------------------------------------------------------------*/
251/*---------------------------------------------------------------------------*/
252
253#ifndef ARCANE_MODULE_AXLSTAR_ARCANE_HDF5VARIABLEREADER_H
254#define ARCANE_MODULE_AXLSTAR_ARCANE_HDF5VARIABLEREADER_H
255
256/*---------------------------------------------------------------------------*/
257/*---------------------------------------------------------------------------*/
258
259#include "arcane/VariableTypes.h"
260#include "arcane/ServiceInfo.h"
261#include "arcane/ISubDomain.h"
262#include "arcane/ServiceBuildInfo.h"
263#include "arcane/ServiceFactory.h"
264#include "arcane/ServiceRegisterer.h"
265#include "arcane/BasicService.h"
266
267#ifndef ARCANE_HAS_SPECIFIC_BASIC_SERVICE
268// Code pour les versions de Arcane avant la 3.8 qui ne possèdent pas les
269// classes de base spécifiques pour les services
270namespace Arcane
271{
272using BasicCaseOptionService = BasicService;
273using BasicSubDomainService = BasicService;
274using BasicMeshService = BasicService;
275}
276#endif
277
278/*---------------------------------------------------------------------------*/
279/*---------------------------------------------------------------------------*/
280
281ARCANE_BEGIN_NAMESPACE
282
283/*---------------------------------------------------------------------------*/
284/*---------------------------------------------------------------------------*/
285
286class CaseOptionsHdf5VariableReader;
287
288/*---------------------------------------------------------------------------*/
289/*---------------------------------------------------------------------------*/
290
293 : public BasicTimeLoopService
294{
295public:
296 // NOTE GG: attention code dupliqué avec 'ServiceT4CaseAndStrong'. Bien reporter les modifications
297 template <typename ServiceClassType> static void fillServiceInfo(Arcane::ServiceInfo* si)
298 {
299 si->setCaseOptionsFileName("Hdf5VariableReader_arcane_hdf5");
300 si->setAxlVersion(1.0);
301 si->setDefaultTagName("hdf5-variable-reader");
302 si->setAxlContent(getAxlContent());
303 si->setTagName("lecteur-variable-hdf5","fr");
306);
307 }
308
309public:
310
314 , m_options(nullptr)
315 {
317 if (co) {
318 m_options = new CaseOptionsHdf5VariableReader(co);
319 }
320
321 }
322
325 {
326 delete m_options;
327 }
328
329
330public:
331
333 CaseOptionsHdf5VariableReader* options() const { return m_options; }
334
335private:
336
339
340protected:
341
343private:
345 {
346 const Arcane::Byte* content = (const Arcane::Byte*)"";
347 Arcane::Span<const Arcane::Byte> bytes(content,0);
348 int file_version = 1;
349 return Arcane::FileContent(bytes,file_version,"");
350 }
351};
352
353/*---------------------------------------------------------------------------*/
354/*---------------------------------------------------------------------------*/
355
356#define ARCANE_REGISTER_SERVICE_HDF5VARIABLEREADER(service_name,class_name) \
357 ARCANE_REGISTER_AXL_SERVICE(class_name,Arcane::ServiceProperty(#service_name,Arcane::ST_CaseOption,\
358 Arcane::SFP_None ))
359
360/*---------------------------------------------------------------------------*/
361/*---------------------------------------------------------------------------*/
362
363ARCANE_END_NAMESPACE
364
365/*---------------------------------------------------------------------------*/
366/*---------------------------------------------------------------------------*/
367
368#endif
369
#define ARCANE_SERVICE_INTERFACE(ainterface)
Macro pour déclarer une interface lors de l'enregistrement d'un service.
Generation de la classe de base du Service.
CaseOptionsHdf5VariableReader * m_options
Options du jeu de données du service.
ArcaneHdf5VariableReaderObject(const Arcane::ServiceBuildInfo &sbi)
Constructeur.
CaseOptionsHdf5VariableReader * options() const
Options du jeu de données du service.
static Arcane::FileContent getAxlContent()
Variables du service.
Classe de base d'un service opérant lors de la boucle en temps.
Informations pour construire une option de jeu de données.
Classe de base d'une valeur d'une option complexe.
Classe de base d'un tableau d'options complexes du jeu de données.
Description et contenu d'un fichier.
Definition FileContent.h:32
Interface d'une fonction du jeu de données.
Interface du gestionnaire de cas.
Definition ICaseMng.h:56
Interface d'une liste d'options du jeu de données.
Interface d'une liste d'options présente plusieurs fois.
Interface d'une liste d'options du jeu de données.
Interface d'un module.
Definition IModule.h:39
Interface des informations d'un service ou d'un module.
Interface gérant une fonction standard.
Interface d'un service opérant lors de la boucle en temps.
static void registerToServiceInfo(ServiceInfo *si, const Interfaces &... args)
Enregistre dans le service les fabriques pour les interfacs Interfaces.
Informations d'un service.
Definition ServiceInfo.h:46
ICaseOptions * caseOptions() const
Accès au ICaseOptions associé.
Structure contenant les informations pour créer un service.
Liste de noeuds d'un arbre DOM.
Definition XmlNodeList.h:33
Noeud d'un arbre DOM.
Definition XmlNode.h:51
Vue modifiable d'un tableau d'un type T.
Encapsulation d'un pointeur avec compteur de référence.
Vue d'un tableau d'éléments de type T.
Definition Span.h:510
Chaîne de caractères unicode.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
unsigned char Byte
Type d'un octet.
Definition UtilsTypes.h:142