Arcane  v3.15.0.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
ArcaneCaseMeshService_axl.h
1/*---------------------------------------------------------------------------*/
2/*---------------------------------------------------------------------------*/
3// #WARNING#: This file has been generated automatically. Do not edit.
4// Axlstar version 1.0
5/*---------------------------------------------------------------------------*/
6/*---------------------------------------------------------------------------*/
7
8#ifndef ARCANE_CASEOPTION_AXLSTAR_ARCANECASEMESHSERVICE_H
9#define ARCANE_CASEOPTION_AXLSTAR_ARCANECASEMESHSERVICE_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#include "arcane/CaseOptionService.h"
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25ARCANE_BEGIN_NAMESPACE
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
32{
33public:
34
35 /*-------------------------------------------------------------------------*/
36 /*--------------------------- Complex Options -----------------------------*/
37 /*-------------------------------------------------------------------------*/
38 // Generation for option 'variable'
39 // Generating multiple arity CaseOption for complex option value 'variable'
42 {
43 public:
44
46
48 : Arcane::CaseOptionComplexValue(opt,icl,element)
49 , name(Arcane::CaseOptionBuildInfo(_configList(),
50 /* name */ "name", _element(),
51 /* default */ Arcane::String(),
52 /* min-occurs */ 1,
53 /* max-occurs */ 1,
54 /* optional */ false))
55 , value(Arcane::CaseOptionBuildInfo(_configList(),
56 /* name */ "value", _element(),
57 /* default */ Arcane::String(),
58 /* min-occurs */ 1,
59 /* max-occurs */ 1,
60 /* optional */ false))
61 , group(Arcane::CaseOptionBuildInfo(_configList(),
62 /* name */ "group", _element(),
63 /* default */ Arcane::String(),
64 /* min-occurs */ 1,
65 /* max-occurs */ 1,
66 /* optional */ false))
67
68 {
69
70
71 }
72 public:
73 // Interfaces for multi-arity class CaseOptionsInitVariable
74
75 Arcane::String getName() { return name(); }
76 Arcane::ICaseFunction* getNameFunction() { return name.function(); }
77 Arcane::IStandardFunction* getNameStandardFunction() { return name.standardFunction(); }
78 Arcane::String getValue() { return value(); }
79 Arcane::ICaseFunction* getValueFunction() { return value.function(); }
80 Arcane::IStandardFunction* getValueStandardFunction() { return value.standardFunction(); }
81 Arcane::String getGroup() { return group(); }
82 Arcane::ICaseFunction* getGroupFunction() { return group.function(); }
83 Arcane::IStandardFunction* getGroupStandardFunction() { return group.standardFunction(); }
84
85
86
87 // Interfaces for complex options
88
89
90 public:
91
92 const ThatClass* operator->() const { return this; }
93
94 public:
95
99 };
100
101 // Generation for sub-option 'variable'
104 , private Arcane::ArrayView< CaseOptionInitVariableValue * >
105 {
106 public:
107
109
111
112 public:
113
115 const Arcane::String& s, const Arcane::XmlNode& element)
116 : Arcane::CaseOptionsMulti(icl,s,element,0,-1)
117 {
118 // Generating translations and default values.
119 }
120
121 BaseClass operator()() { return (*this); }
122
123 protected:
124 void multiAllocate(const Arcane::XmlNodeList& elist)
125 {
126 Arcane::Integer s = elist.size();
127 value_type** v = 0;
128 if (s!=0)
129 v = new value_type*[s];
130 _setArray(v,s);
131 v = _ptr();
132 for( Arcane::Integer i=0; i<s; ++i ){
133 v[i] = new value_type(this,configList(),elist[i]);
134 }
135 }
136
137 public:
138
140 {
141 Arcane::Integer s = count();
142 if (s==0) return;
143 value_type** v = _ptr();
144 for( Arcane::Integer i=0; i<s; ++i ){
145 delete v[i];
146 }
147 delete[] v;
148 }
149
150 public:
151
152 const value_type& operator[](Arcane::Integer i) const
153 { return *(BaseClass::operator[](i)); }
154 value_type& operator[](Arcane::Integer i)
155 { return *(BaseClass::operator[](i)); }
156 Arcane::Integer count() const
157 { return BaseClass::size(); }
158 Arcane::Integer size() const
159 { return BaseClass::size(); }
160
161 };
162
163 // Generation for option 'initialization'
164 // Generating simple arity CaseOption for option 'initialization'
166 : public Arcane::CaseOptions
167 {
168 public:
169
171 const Arcane::String& s, const Arcane::XmlNode& element, bool is_optional=false)
172 : Arcane::CaseOptions(icl,s,element,is_optional)
173 , variable(_configList(),
174 /* name */ "variable", _element())
175 {
176
177 }
178
179 const CaseOptionInit& operator()() const { return *this; }
180
181 public:
182 // Interfaces for simple arity CaseOptions
183
184
185
186
187 // Interfaces for complex options
188
189
190 private:
191 // Méthodes pour unifier la construction des options.
192 Arcane::ICaseOptionList* _configList() { return configList(); }
193 Arcane::XmlNode _element() { return Arcane::XmlNode(); }
194
195 public:
196
197 CaseOptionInitVariable variable;
198
199 };
200
201 /*-------------------------------------------------------------------------*/
202 /*--------------------------- Non Complex Options -------------------------*/
203 /*-------------------------------------------------------------------------*/
204
206 : m_case_options(co)
207 , filename(Arcane::CaseOptionBuildInfo(_configList(),
208 /* name */ "filename", _element(),
209 /* default */ Arcane::String(),
210 /* min-occurs */ 1,
211 /* max-occurs */ 1,
212 /* optional */ true))
213 , partitioner(Arcane::CaseOptionBuildInfo(_configList(),
214 /* name */ "partitioner", _element(),
215 /* default */ "DefaultPartitioner",
216 /* min-occurs */ 1,
217 /* max-occurs */ 1,
218 /* optional */ false))
219 , nbGhostLayer(Arcane::CaseOptionBuildInfo(_configList(),
220 /* name */ "nb-ghost-layer", _element(),
221 /* default */ "1",
222 /* min-occurs */ 1,
223 /* max-occurs */ 1,
224 /* optional */ false))
225 , ghostLayerBuilderVersion(Arcane::CaseOptionBuildInfo(_configList(),
226 /* name */ "ghost-layer-builder-version", _element(),
227 /* default */ "3",
228 /* min-occurs */ 1,
229 /* max-occurs */ 1,
230 /* optional */ false))
231 , faceNumberingVersion(Arcane::CaseOptionBuildInfo(_configList(),
232 /* name */ "face-numbering-version", _element(),
233 /* default */ Arcane::String(),
234 /* min-occurs */ 1,
235 /* max-occurs */ 1,
236 /* optional */ true))
237 , generator(Arcane::CaseOptionBuildInfo(_configList(),
238 /* name */ "generator", _element(),
239 /* default */ Arcane::String(),
240 /* min-occurs */ 1,
241 /* max-occurs */ 1,
242 /* optional */ true),
243 /* allow-null */ false,
244 /* optional */ true)
245 , specificReader(Arcane::CaseOptionBuildInfo(_configList(),
246 /* name */ "specific-reader", _element(),
247 /* default */ Arcane::String(),
248 /* min-occurs */ 1,
249 /* max-occurs */ 1,
250 /* optional */ true),
251 /* allow-null */ false,
252 /* optional */ true)
253 , subdivider(Arcane::CaseOptionBuildInfo(_configList(),
254 /* name */ "subdivider", _element(),
255 /* default */ "ArcaneBasicMeshSubdivider",
256 /* min-occurs */ 1,
257 /* max-occurs */ 1,
258 /* optional */ true),
259 /* allow-null */ false,
260 /* optional */ true)
261 , initialization(_configList(),
262 /* name */ "initialization", _element())
263 {
264
265 }
266
267public:
268 // Interfaces for main CaseOptions
269
270 Arcane::String getFilename() { return filename(); }
271 Arcane::ICaseFunction* getFilenameFunction() { return filename.function(); }
272 Arcane::IStandardFunction* getFilenameStandardFunction() { return filename.standardFunction(); }
273 Arcane::String getPartitioner() { return partitioner(); }
274 Arcane::ICaseFunction* getPartitionerFunction() { return partitioner.function(); }
275 Arcane::IStandardFunction* getPartitionerStandardFunction() { return partitioner.standardFunction(); }
276 Arcane::Int32 getNbGhostLayer() { return nbGhostLayer(); }
277 Arcane::ICaseFunction* getNbGhostLayerFunction() { return nbGhostLayer.function(); }
278 Arcane::IStandardFunction* getNbGhostLayerStandardFunction() { return nbGhostLayer.standardFunction(); }
279 Arcane::Int32 getGhostLayerBuilderVersion() { return ghostLayerBuilderVersion(); }
280 Arcane::ICaseFunction* getGhostLayerBuilderVersionFunction() { return ghostLayerBuilderVersion.function(); }
281 Arcane::IStandardFunction* getGhostLayerBuilderVersionStandardFunction() { return ghostLayerBuilderVersion.standardFunction(); }
282 Arcane::Int32 getFaceNumberingVersion() { return faceNumberingVersion(); }
283 Arcane::ICaseFunction* getFaceNumberingVersionFunction() { return faceNumberingVersion.function(); }
284 Arcane::IStandardFunction* getFaceNumberingVersionStandardFunction() { return faceNumberingVersion.standardFunction(); }
285
286
287
288 Arcane::IMeshBuilder* getGenerator() { return generator(); }
289 Arcane::ICaseMeshReader* getSpecificReader() { return specificReader(); }
290 Arcane::IMeshSubdivider* getSubdivider() { return subdivider(); }
291 // Interfaces for complex options
292 bool hasGenerator() const
293 { return generator.isPresent(); }
294 bool hasFilename() const
295 { return filename.isPresent(); }
296 bool hasFaceNumberingVersion() const
297 { return faceNumberingVersion.isPresent(); }
298 bool hasSpecificReader() const
299 { return specificReader.isPresent(); }
300 bool hasSubdivider() const
301 { return subdivider.isPresent(); }
302
303
304public:
305
306 Arcane::ICaseOptions* caseOptions() const
307 {
308 return m_case_options.get();
309 }
310
311 Arcane::ICaseOptionList* configList() const
312 {
313 return m_case_options->configList();
314 }
315
316 void setCaseModule(Arcane::IModule* m)
317 {
318 m_case_options->setCaseModule(m);
319 }
320
321 void setCaseServiceInfo(Arcane::IServiceInfo* si)
322 {
323 m_case_options->setCaseServiceInfo(si);
324 }
325
326 void addAlternativeNodeName(const Arcane::String& lang,
327 const Arcane::String& name)
328 {
329 m_case_options->addAlternativeNodeName(lang,name);
330 }
331
332private:
333
334 Arcane::ICaseOptionList* _configList() const { return configList(); }
335 Arcane::XmlNode _element() const { return Arcane::XmlNode(); }
336
337private:
338
339 static Arcane::ICaseOptions* _createCaseOption(Arcane::ICaseMng* cm,Arcane::ICaseOptions* co);
340
342
343public:
344
345
347 Arcane::CaseOptionString partitioner;
348 Arcane::CaseOptionInt32 nbGhostLayer;
349 Arcane::CaseOptionInt32 ghostLayerBuilderVersion;
350 Arcane::CaseOptionInt32 faceNumberingVersion;
354 CaseOptionInit initialization;
355};
356
357/*---------------------------------------------------------------------------*/
358/*---------------------------------------------------------------------------*/
359
360ARCANE_END_NAMESPACE
361
362/*---------------------------------------------------------------------------*/
363/*---------------------------------------------------------------------------*/
364
365#endif
366
367
368
369/*---------------------------------------------------------------------------*/
370/*---------------------------------------------------------------------------*/
371// #WARNING#: This file has been generated automatically. Do not edit.
372// Axlstar version 1.0
373/*---------------------------------------------------------------------------*/
374/*---------------------------------------------------------------------------*/
375
376#ifndef ARCANE_MODULE_AXLSTAR_ARCANECASEMESHSERVICE_H
377#define ARCANE_MODULE_AXLSTAR_ARCANECASEMESHSERVICE_H
378
379/*---------------------------------------------------------------------------*/
380/*---------------------------------------------------------------------------*/
381
382#include "arcane/VariableTypes.h"
383#include "arcane/ServiceInfo.h"
384#include "arcane/ISubDomain.h"
385#include "arcane/ServiceBuildInfo.h"
386#include "arcane/ServiceFactory.h"
387#include "arcane/ServiceRegisterer.h"
388#include "arcane/BasicService.h"
389
390#ifndef ARCANE_HAS_SPECIFIC_BASIC_SERVICE
391// Code pour les versions de Arcane avant la 3.8 qui ne possèdent pas les
392// classes de base spécifiques pour les services
393namespace Arcane
394{
395using BasicCaseOptionService = BasicService;
396using BasicSubDomainService = BasicService;
397using BasicMeshService = BasicService;
398}
399#endif
400
401/*---------------------------------------------------------------------------*/
402/*---------------------------------------------------------------------------*/
403
404namespace Arcane
405{
406
407/*---------------------------------------------------------------------------*/
408/*---------------------------------------------------------------------------*/
409
410class CaseOptionsArcaneCaseMeshService;
411
412/*---------------------------------------------------------------------------*/
413/*---------------------------------------------------------------------------*/
414
417 : public AbstractService
419{
420public:
421 // NOTE GG: attention code dupliqué avec 'ServiceT4CaseAndStrong'. Bien reporter les modifications
422 template <typename ServiceClassType> static void fillServiceInfo(Arcane::ServiceInfo* si)
423 {
424 si->setCaseOptionsFileName("ArcaneCaseMeshService_arcane_impl");
425 si->setAxlVersion(0.0);
426 si->setDefaultTagName("arcane-case-mesh-service");
427 si->setAxlContent(getAxlContent());
430);
431 }
432
433public:
434
437 : AbstractService(sbi)
438 , m_options(nullptr)
439 {
441 if (co) {
443 }
444
445 }
446
449 {
450 delete m_options;
451 }
452
453
454public:
455
458
459private:
460
463
464protected:
465
467private:
469 {
470 const Arcane::Byte* content = (const Arcane::Byte*)"";
471 Arcane::Span<const Arcane::Byte> bytes(content,0);
472 int file_version = 1;
473 return Arcane::FileContent(bytes,file_version,"");
474 }
475};
476
477/*---------------------------------------------------------------------------*/
478/*---------------------------------------------------------------------------*/
479
480#define ARCANE_REGISTER_SERVICE_ARCANECASEMESHSERVICE(service_name,class_name) \
481 ARCANE_REGISTER_AXL_SERVICE(class_name,Arcane::ServiceProperty(#service_name,Arcane::ST_CaseOption,\
482 Arcane::SFP_None ))
483
484/*---------------------------------------------------------------------------*/
485/*---------------------------------------------------------------------------*/
486
487} // End namespace Arcane
488
489/*---------------------------------------------------------------------------*/
490/*---------------------------------------------------------------------------*/
491
492#endif
493
#define ARCANE_SERVICE_INTERFACE(ainterface)
Macro pour déclarer une interface lors de l'enregistrement d'un service.
Classe de base d'un service.
Generation de la classe de base du Service.
static Arcane::FileContent getAxlContent()
Variables du service.
ArcaneArcaneCaseMeshServiceObject(const Arcane::ServiceBuildInfo &sbi)
Constructeur.
CaseOptionsArcaneCaseMeshService * options() const
Options du jeu de données du service.
CaseOptionsArcaneCaseMeshService * m_options
Options du jeu de données du service.
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.
Classe de base d'une liste d'options du jeu de données.
Definition CaseOptions.h:57
Description et contenu d'un fichier.
Definition FileContent.h:32
Interface d'une fonction du jeu de données.
Interface du service de lecture du maillage à partir du jeu de données.
Interface du service gérant les maillages 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 service de création/lecture du maillage.
Interface d'un module.
Definition IModule.h:39
Interface des informations d'un service ou d'un module.
Interface gérant une fonction standard.
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:148