Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
Cartesian2DMeshGenerator_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:35
5/*---------------------------------------------------------------------------*/
6/*---------------------------------------------------------------------------*/
7
8#ifndef ARCANE_CASEOPTION_AXLSTAR_CARTESIAN2DMESHGENERATOR_H
9#define ARCANE_CASEOPTION_AXLSTAR_CARTESIAN2DMESHGENERATOR_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 'x'
38 // Generating multiple arity CaseOption for complex option value 'x'
41 {
42 public:
43
45
47 : Arcane::CaseOptionComplexValue(opt,icl,element)
48 , n(Arcane::CaseOptionBuildInfo(_configList(),
49 /* name */ "n", _element(),
50 /* default */ Arcane::String(),
51 /* min-occurs */ 1,
52 /* max-occurs */ 1,
53 /* optional */ false))
54 , length(Arcane::CaseOptionBuildInfo(_configList(),
55 /* name */ "length", _element(),
56 /* default */ Arcane::String(),
57 /* min-occurs */ 1,
58 /* max-occurs */ 1,
59 /* optional */ false))
60 , progression(Arcane::CaseOptionBuildInfo(_configList(),
61 /* name */ "progression", _element(),
62 /* default */ "1.0",
63 /* min-occurs */ 1,
64 /* max-occurs */ 1,
65 /* optional */ false))
66
67 {
68
69
70 }
71 public:
72 // Interfaces for multi-arity class CaseOptionsPartInfoX
73
74 Arcane::Integer getN() { return n(); }
75 Arcane::ICaseFunction* getNFunction() { return n.function(); }
76 Arcane::IStandardFunction* getNStandardFunction() { return n.standardFunction(); }
77 Arcane::Real getLength() { return length(); }
78 Arcane::ICaseFunction* getLengthFunction() { return length.function(); }
79 Arcane::IStandardFunction* getLengthStandardFunction() { return length.standardFunction(); }
80 Arcane::Real getProgression() { return progression(); }
81 Arcane::ICaseFunction* getProgressionFunction() { return progression.function(); }
82 Arcane::IStandardFunction* getProgressionStandardFunction() { return progression.standardFunction(); }
83
84
85
86 // Interfaces for complex options
87
88
89 public:
90
91 const ThatClass* operator->() const { return this; }
92
93 public:
94
97 Arcane::CaseOptionReal progression;
98 };
99
100 // Generation for sub-option 'x'
103 , private Arcane::ArrayView< CaseOptionPartInfoXValue * >
104 {
105 public:
106
108
110
111 public:
112
114 const Arcane::String& s, const Arcane::XmlNode& element)
115 : Arcane::CaseOptionsMulti(icl,s,element,1,-1)
116 {
117 // Generating translations and default values.
118 }
119
120 BaseClass operator()() { return (*this); }
121
122 protected:
123 void multiAllocate(const Arcane::XmlNodeList& elist)
124 {
125 Arcane::Integer s = elist.size();
126 value_type** v = 0;
127 if (s!=0)
128 v = new value_type*[s];
129 _setArray(v,s);
130 v = _ptr();
131 for( Arcane::Integer i=0; i<s; ++i ){
132 v[i] = new value_type(this,configList(),elist[i]);
133 }
134 }
135
136 public:
137
139 {
140 Arcane::Integer s = count();
141 if (s==0) return;
142 value_type** v = _ptr();
143 for( Arcane::Integer i=0; i<s; ++i ){
144 delete v[i];
145 }
146 delete[] v;
147 }
148
149 public:
150
151 const value_type& operator[](Arcane::Integer i) const
152 { return *(BaseClass::operator[](i)); }
153 value_type& operator[](Arcane::Integer i)
154 { return *(BaseClass::operator[](i)); }
155 Arcane::Integer count() const
156 { return BaseClass::size(); }
157 Arcane::Integer size() const
158 { return BaseClass::size(); }
159
160 };
161
162 // Generation for option 'y'
163 // Generating multiple arity CaseOption for complex option value 'y'
166 {
167 public:
168
170
172 : Arcane::CaseOptionComplexValue(opt,icl,element)
173 , n(Arcane::CaseOptionBuildInfo(_configList(),
174 /* name */ "n", _element(),
175 /* default */ Arcane::String(),
176 /* min-occurs */ 1,
177 /* max-occurs */ 1,
178 /* optional */ false))
179 , length(Arcane::CaseOptionBuildInfo(_configList(),
180 /* name */ "length", _element(),
181 /* default */ Arcane::String(),
182 /* min-occurs */ 1,
183 /* max-occurs */ 1,
184 /* optional */ false))
185 , progression(Arcane::CaseOptionBuildInfo(_configList(),
186 /* name */ "progression", _element(),
187 /* default */ "1.0",
188 /* min-occurs */ 1,
189 /* max-occurs */ 1,
190 /* optional */ false))
191
192 {
193
194
195 }
196 public:
197 // Interfaces for multi-arity class CaseOptionsPartInfoY
198
199 Arcane::Integer getN() { return n(); }
200 Arcane::ICaseFunction* getNFunction() { return n.function(); }
201 Arcane::IStandardFunction* getNStandardFunction() { return n.standardFunction(); }
202 Arcane::Real getLength() { return length(); }
203 Arcane::ICaseFunction* getLengthFunction() { return length.function(); }
204 Arcane::IStandardFunction* getLengthStandardFunction() { return length.standardFunction(); }
205 Arcane::Real getProgression() { return progression(); }
206 Arcane::ICaseFunction* getProgressionFunction() { return progression.function(); }
207 Arcane::IStandardFunction* getProgressionStandardFunction() { return progression.standardFunction(); }
208
209
210
211 // Interfaces for complex options
212
213
214 public:
215
216 const ThatClass* operator->() const { return this; }
217
218 public:
219
222 Arcane::CaseOptionReal progression;
223 };
224
225 // Generation for sub-option 'y'
228 , private Arcane::ArrayView< CaseOptionPartInfoYValue * >
229 {
230 public:
231
233
235
236 public:
237
239 const Arcane::String& s, const Arcane::XmlNode& element)
240 : Arcane::CaseOptionsMulti(icl,s,element,1,-1)
241 {
242 // Generating translations and default values.
243 }
244
245 BaseClass operator()() { return (*this); }
246
247 protected:
248 void multiAllocate(const Arcane::XmlNodeList& elist)
249 {
250 Arcane::Integer s = elist.size();
251 value_type** v = 0;
252 if (s!=0)
253 v = new value_type*[s];
254 _setArray(v,s);
255 v = _ptr();
256 for( Arcane::Integer i=0; i<s; ++i ){
257 v[i] = new value_type(this,configList(),elist[i]);
258 }
259 }
260
261 public:
262
264 {
265 Arcane::Integer s = count();
266 if (s==0) return;
267 value_type** v = _ptr();
268 for( Arcane::Integer i=0; i<s; ++i ){
269 delete v[i];
270 }
271 delete[] v;
272 }
273
274 public:
275
276 const value_type& operator[](Arcane::Integer i) const
277 { return *(BaseClass::operator[](i)); }
278 value_type& operator[](Arcane::Integer i)
279 { return *(BaseClass::operator[](i)); }
280 Arcane::Integer count() const
281 { return BaseClass::size(); }
282 Arcane::Integer size() const
283 { return BaseClass::size(); }
284
285 };
286
287
288 /*-------------------------------------------------------------------------*/
289 /*--------------------------- Non Complex Options -------------------------*/
290 /*-------------------------------------------------------------------------*/
291
293 : m_case_options(co)
294 , origin(Arcane::CaseOptionBuildInfo(_configList(),
295 /* name */ "origin", _element(),
296 /* default */ Arcane::String(),
297 /* min-occurs */ 1,
298 /* max-occurs */ 1,
299 /* optional */ false))
300 , nbPartX(Arcane::CaseOptionBuildInfo(_configList(),
301 /* name */ "nb-part-x", _element(),
302 /* default */ "0",
303 /* min-occurs */ 1,
304 /* max-occurs */ 1,
305 /* optional */ false))
306 , nbPartY(Arcane::CaseOptionBuildInfo(_configList(),
307 /* name */ "nb-part-y", _element(),
308 /* default */ "0",
309 /* min-occurs */ 1,
310 /* max-occurs */ 1,
311 /* optional */ false))
312 , generateSodGroups(Arcane::CaseOptionBuildInfo(_configList(),
313 /* name */ "generate-sod-groups", _element(),
314 /* default */ "false",
315 /* min-occurs */ 1,
316 /* max-occurs */ 1,
317 /* optional */ false))
318 , faceNumberingVersion(Arcane::CaseOptionBuildInfo(_configList(),
319 /* name */ "face-numbering-version", _element(),
320 /* default */ "4",
321 /* min-occurs */ 1,
322 /* max-occurs */ 1,
323 /* optional */ false))
324 , x(_configList(),
325 /* name */ "x", _element())
326 , y(_configList(),
327 /* name */ "y", _element())
328 {
329
330 }
331
332public:
333 // Interfaces for main CaseOptions
334
335 Arcane::Real2 getOrigin() { return origin(); }
336 Arcane::ICaseFunction* getOriginFunction() { return origin.function(); }
337 Arcane::IStandardFunction* getOriginStandardFunction() { return origin.standardFunction(); }
338 Arcane::Integer getNbPartX() { return nbPartX(); }
339 Arcane::ICaseFunction* getNbPartXFunction() { return nbPartX.function(); }
340 Arcane::IStandardFunction* getNbPartXStandardFunction() { return nbPartX.standardFunction(); }
341 Arcane::Integer getNbPartY() { return nbPartY(); }
342 Arcane::ICaseFunction* getNbPartYFunction() { return nbPartY.function(); }
343 Arcane::IStandardFunction* getNbPartYStandardFunction() { return nbPartY.standardFunction(); }
344 bool getGenerateSodGroups() { return generateSodGroups(); }
345 Arcane::ICaseFunction* getGenerateSodGroupsFunction() { return generateSodGroups.function(); }
346 Arcane::IStandardFunction* getGenerateSodGroupsStandardFunction() { return generateSodGroups.standardFunction(); }
347 Arcane::Integer getFaceNumberingVersion() { return faceNumberingVersion(); }
348 Arcane::ICaseFunction* getFaceNumberingVersionFunction() { return faceNumberingVersion.function(); }
349 Arcane::IStandardFunction* getFaceNumberingVersionStandardFunction() { return faceNumberingVersion.standardFunction(); }
350
351
352
353 // Interfaces for complex options
354
355
356public:
357
358 Arcane::ICaseOptions* caseOptions() const
359 {
360 return m_case_options.get();
361 }
362
363 Arcane::ICaseOptionList* configList() const
364 {
365 return m_case_options->configList();
366 }
367
368 void setCaseModule(Arcane::IModule* m)
369 {
370 m_case_options->setCaseModule(m);
371 }
372
373 void setCaseServiceInfo(Arcane::IServiceInfo* si)
374 {
375 m_case_options->setCaseServiceInfo(si);
376 }
377
378 void addAlternativeNodeName(const Arcane::String& lang,
379 const Arcane::String& name)
380 {
381 m_case_options->addAlternativeNodeName(lang,name);
382 }
383
384private:
385
386 Arcane::ICaseOptionList* _configList() const { return configList(); }
387 Arcane::XmlNode _element() const { return Arcane::XmlNode(); }
388
389private:
390
391 static Arcane::ICaseOptions* _createCaseOption(Arcane::ICaseMng* cm,Arcane::ICaseOptions* co);
392
394
395public:
396
397
401 Arcane::CaseOptionBool generateSodGroups;
402 Arcane::CaseOptionInteger faceNumberingVersion;
403 CaseOptionPartInfoX x;
404 CaseOptionPartInfoY y;
405};
406
407/*---------------------------------------------------------------------------*/
408/*---------------------------------------------------------------------------*/
409
410ARCANE_END_NAMESPACE
411
412/*---------------------------------------------------------------------------*/
413/*---------------------------------------------------------------------------*/
414
415#endif
416
417
418
419/*---------------------------------------------------------------------------*/
420/*---------------------------------------------------------------------------*/
421// #WARNING#: This file has been generated automatically. Do not edit.
422// Arcane version 1.0 : 11/18/2024 02:52:35
423/*---------------------------------------------------------------------------*/
424/*---------------------------------------------------------------------------*/
425
426#ifndef ARCANE_MODULE_AXLSTAR_CARTESIAN2DMESHGENERATOR_H
427#define ARCANE_MODULE_AXLSTAR_CARTESIAN2DMESHGENERATOR_H
428
429/*---------------------------------------------------------------------------*/
430/*---------------------------------------------------------------------------*/
431
432#include "arcane/VariableTypes.h"
433#include "arcane/ServiceInfo.h"
434#include "arcane/ISubDomain.h"
435#include "arcane/ServiceBuildInfo.h"
436#include "arcane/ServiceFactory.h"
437#include "arcane/ServiceRegisterer.h"
438#include "arcane/BasicService.h"
439
440#ifndef ARCANE_HAS_SPECIFIC_BASIC_SERVICE
441// Code pour les versions de Arcane avant la 3.8 qui ne possèdent pas les
442// classes de base spécifiques pour les services
443namespace Arcane
444{
445using BasicCaseOptionService = BasicService;
446using BasicSubDomainService = BasicService;
447using BasicMeshService = BasicService;
448}
449#endif
450
451/*---------------------------------------------------------------------------*/
452/*---------------------------------------------------------------------------*/
453
454namespace Arcane
455{
456
457/*---------------------------------------------------------------------------*/
458/*---------------------------------------------------------------------------*/
459
460class CaseOptionsCartesian2DMeshGenerator;
461
462/*---------------------------------------------------------------------------*/
463/*---------------------------------------------------------------------------*/
464
468 , public Arcane::IMeshBuilder
469{
470public:
471 // NOTE GG: attention code dupliqué avec 'ServiceT4CaseAndStrong'. Bien reporter les modifications
472 template <typename ServiceClassType> static void fillServiceInfo(Arcane::ServiceInfo* si)
473 {
474 si->setCaseOptionsFileName("Cartesian2DMeshGenerator_arcane_std");
475 si->setAxlVersion(0.0);
476 si->setDefaultTagName("cartesian2-d-mesh-generator");
477 si->setAxlContent(getAxlContent());
480);
481 }
482
483public:
484
496
499 {
500 delete m_options;
501 }
502
503
504public:
505
508
509private:
510
513
514protected:
515
517private:
519 {
520 const Arcane::Byte* content = (const Arcane::Byte*)"";
521 Arcane::Span<const Arcane::Byte> bytes(content,0);
522 int file_version = 1;
523 return Arcane::FileContent(bytes,file_version,"");
524 }
525};
526
527/*---------------------------------------------------------------------------*/
528/*---------------------------------------------------------------------------*/
529
530#define ARCANE_REGISTER_SERVICE_CARTESIAN2DMESHGENERATOR(service_name,class_name) \
531 ARCANE_REGISTER_AXL_SERVICE(class_name,Arcane::ServiceProperty(#service_name,Arcane::ST_CaseOption,\
532 Arcane::SFP_None ))
533
534/*---------------------------------------------------------------------------*/
535/*---------------------------------------------------------------------------*/
536
537} // End namespace Arcane
538
539/*---------------------------------------------------------------------------*/
540/*---------------------------------------------------------------------------*/
541
542#endif
543
#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.
static Arcane::FileContent getAxlContent()
Variables du service.
ArcaneCartesian2DMeshGeneratorObject(const Arcane::ServiceBuildInfo &sbi)
Constructeur.
CaseOptionsCartesian2DMeshGenerator * m_options
Options du jeu de données du service.
CaseOptionsCartesian2DMeshGenerator * options() const
Options du jeu de données du service.
Classe de base de service lié à un sous-domaine.
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 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
Classe gérant un vecteur de réel de dimension 2.
Definition Real2.h:121
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