Arcane  v3.14.10.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// Arcane version 1.0 : 11/18/2024 02:46:55
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 , generator(Arcane::CaseOptionBuildInfo(_configList(),
232 /* name */ "generator", _element(),
233 /* default */ Arcane::String(),
234 /* min-occurs */ 1,
235 /* max-occurs */ 1,
236 /* optional */ true),
237 /* allow-null */ false,
238 /* optional */ true)
239 , specificReader(Arcane::CaseOptionBuildInfo(_configList(),
240 /* name */ "specific-reader", _element(),
241 /* default */ Arcane::String(),
242 /* min-occurs */ 1,
243 /* max-occurs */ 1,
244 /* optional */ true),
245 /* allow-null */ false,
246 /* optional */ true)
247 , subdivider(Arcane::CaseOptionBuildInfo(_configList(),
248 /* name */ "subdivider", _element(),
249 /* default */ "ArcaneBasicMeshSubdivider",
250 /* min-occurs */ 1,
251 /* max-occurs */ 1,
252 /* optional */ true),
253 /* allow-null */ false,
254 /* optional */ true)
255 , initialization(_configList(),
256 /* name */ "initialization", _element())
257 {
258
259 }
260
261public:
262 // Interfaces for main CaseOptions
263
264 Arcane::String getFilename() { return filename(); }
265 Arcane::ICaseFunction* getFilenameFunction() { return filename.function(); }
266 Arcane::IStandardFunction* getFilenameStandardFunction() { return filename.standardFunction(); }
267 Arcane::String getPartitioner() { return partitioner(); }
268 Arcane::ICaseFunction* getPartitionerFunction() { return partitioner.function(); }
269 Arcane::IStandardFunction* getPartitionerStandardFunction() { return partitioner.standardFunction(); }
270 Arcane::Int32 getNbGhostLayer() { return nbGhostLayer(); }
271 Arcane::ICaseFunction* getNbGhostLayerFunction() { return nbGhostLayer.function(); }
272 Arcane::IStandardFunction* getNbGhostLayerStandardFunction() { return nbGhostLayer.standardFunction(); }
273 Arcane::Int32 getGhostLayerBuilderVersion() { return ghostLayerBuilderVersion(); }
274 Arcane::ICaseFunction* getGhostLayerBuilderVersionFunction() { return ghostLayerBuilderVersion.function(); }
275 Arcane::IStandardFunction* getGhostLayerBuilderVersionStandardFunction() { return ghostLayerBuilderVersion.standardFunction(); }
276
277
278
279 Arcane::IMeshBuilder* getGenerator() { return generator(); }
280 Arcane::ICaseMeshReader* getSpecificReader() { return specificReader(); }
281 Arcane::IMeshSubdivider* getSubdivider() { return subdivider(); }
282 // Interfaces for complex options
283 bool hasGenerator() const
284 { return generator.isPresent(); }
285 bool hasFilename() const
286 { return filename.isPresent(); }
287 bool hasSpecificReader() const
288 { return specificReader.isPresent(); }
289 bool hasSubdivider() const
290 { return subdivider.isPresent(); }
291
292
293public:
294
295 Arcane::ICaseOptions* caseOptions() const
296 {
297 return m_case_options.get();
298 }
299
300 Arcane::ICaseOptionList* configList() const
301 {
302 return m_case_options->configList();
303 }
304
305 void setCaseModule(Arcane::IModule* m)
306 {
307 m_case_options->setCaseModule(m);
308 }
309
310 void setCaseServiceInfo(Arcane::IServiceInfo* si)
311 {
312 m_case_options->setCaseServiceInfo(si);
313 }
314
315 void addAlternativeNodeName(const Arcane::String& lang,
316 const Arcane::String& name)
317 {
318 m_case_options->addAlternativeNodeName(lang,name);
319 }
320
321private:
322
323 Arcane::ICaseOptionList* _configList() const { return configList(); }
324 Arcane::XmlNode _element() const { return Arcane::XmlNode(); }
325
326private:
327
328 static Arcane::ICaseOptions* _createCaseOption(Arcane::ICaseMng* cm,Arcane::ICaseOptions* co);
329
331
332public:
333
334
336 Arcane::CaseOptionString partitioner;
337 Arcane::CaseOptionInt32 nbGhostLayer;
338 Arcane::CaseOptionInt32 ghostLayerBuilderVersion;
342 CaseOptionInit initialization;
343};
344
345/*---------------------------------------------------------------------------*/
346/*---------------------------------------------------------------------------*/
347
348ARCANE_END_NAMESPACE
349
350/*---------------------------------------------------------------------------*/
351/*---------------------------------------------------------------------------*/
352
353#endif
354
355
356
357/*---------------------------------------------------------------------------*/
358/*---------------------------------------------------------------------------*/
359// #WARNING#: This file has been generated automatically. Do not edit.
360// Arcane version 1.0 : 11/18/2024 02:46:55
361/*---------------------------------------------------------------------------*/
362/*---------------------------------------------------------------------------*/
363
364#ifndef ARCANE_MODULE_AXLSTAR_ARCANECASEMESHSERVICE_H
365#define ARCANE_MODULE_AXLSTAR_ARCANECASEMESHSERVICE_H
366
367/*---------------------------------------------------------------------------*/
368/*---------------------------------------------------------------------------*/
369
370#include "arcane/VariableTypes.h"
371#include "arcane/ServiceInfo.h"
372#include "arcane/ISubDomain.h"
373#include "arcane/ServiceBuildInfo.h"
374#include "arcane/ServiceFactory.h"
375#include "arcane/ServiceRegisterer.h"
376#include "arcane/BasicService.h"
377
378#ifndef ARCANE_HAS_SPECIFIC_BASIC_SERVICE
379// Code pour les versions de Arcane avant la 3.8 qui ne possèdent pas les
380// classes de base spécifiques pour les services
381namespace Arcane
382{
383using BasicCaseOptionService = BasicService;
384using BasicSubDomainService = BasicService;
385using BasicMeshService = BasicService;
386}
387#endif
388
389/*---------------------------------------------------------------------------*/
390/*---------------------------------------------------------------------------*/
391
392namespace Arcane
393{
394
395/*---------------------------------------------------------------------------*/
396/*---------------------------------------------------------------------------*/
397
398class CaseOptionsArcaneCaseMeshService;
399
400/*---------------------------------------------------------------------------*/
401/*---------------------------------------------------------------------------*/
402
405 : public AbstractService
407{
408public:
409 // NOTE GG: attention code dupliqué avec 'ServiceT4CaseAndStrong'. Bien reporter les modifications
410 template <typename ServiceClassType> static void fillServiceInfo(Arcane::ServiceInfo* si)
411 {
412 si->setCaseOptionsFileName("ArcaneCaseMeshService_arcane_impl");
413 si->setAxlVersion(0.0);
414 si->setDefaultTagName("arcane-case-mesh-service");
415 si->setAxlContent(getAxlContent());
418);
419 }
420
421public:
422
425 : AbstractService(sbi)
426 , m_options(nullptr)
427 {
429 if (co) {
431 }
432
433 }
434
437 {
438 delete m_options;
439 }
440
441
442public:
443
446
447private:
448
451
452protected:
453
455private:
457 {
458 const Arcane::Byte* content = (const Arcane::Byte*)"";
459 Arcane::Span<const Arcane::Byte> bytes(content,0);
460 int file_version = 1;
461 return Arcane::FileContent(bytes,file_version,"");
462 }
463};
464
465/*---------------------------------------------------------------------------*/
466/*---------------------------------------------------------------------------*/
467
468#define ARCANE_REGISTER_SERVICE_ARCANECASEMESHSERVICE(service_name,class_name) \
469 ARCANE_REGISTER_AXL_SERVICE(class_name,Arcane::ServiceProperty(#service_name,Arcane::ST_CaseOption,\
470 Arcane::SFP_None ))
471
472/*---------------------------------------------------------------------------*/
473/*---------------------------------------------------------------------------*/
474
475} // End namespace Arcane
476
477/*---------------------------------------------------------------------------*/
478/*---------------------------------------------------------------------------*/
479
480#endif
481
#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:142