Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
UnitTest_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_ARCANE_UNITTEST_H
9#define ARCANE_CASEOPTION_AXLSTAR_ARCANE_UNITTEST_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
39 /*-------------------------------------------------------------------------*/
40 /*--------------------------- Non Complex Options -------------------------*/
41 /*-------------------------------------------------------------------------*/
42
44 : m_case_options(new Arcane::CaseOptions(cm,"unit-test"))
45 , test(Arcane::CaseOptionBuildInfo(_configList(),
46 /* name */ "test", _element(),
47 /* default */ Arcane::String(),
48 /* min-occurs */ 0,
49 /* max-occurs */ -1,
50 /* optional */ false),
51 /* allow-null */ false)
52 , xmlTest(Arcane::CaseOptionBuildInfo(_configList(),
53 /* name */ "xml-test", _element(),
54 /* default */ Arcane::String(),
55 /* min-occurs */ 0,
56 /* max-occurs */ -1,
57 /* optional */ false),
58 /* allow-null */ false)
59 {
60
61test.addAlternativeNodeName(
62 /* language */ Arcane::String("fr"),
63 /* alternative name */ Arcane::String("test"));
64xmlTest.addAlternativeNodeName(
65 /* language */ Arcane::String("fr"),
66 /* alternative name */ Arcane::String("xml-test"));
67addAlternativeNodeName(
68 /* language */ Arcane::String("en"),
69 /* alternative name */ Arcane::String("unit-test-module"));
70addAlternativeNodeName(
71 /* language */ Arcane::String("fr"),
72 /* alternative name */ Arcane::String("module-test-unitaire"));
73 }
74
75public:
76 // Interfaces for main CaseOptions
77
78
79
80
81 Arcane::ConstArrayView< Arcane::IUnitTest* > getTest() { return test; }
82 Arcane::ConstArrayView< Arcane::IXmlUnitTest* > getXmlTest() { return xmlTest; }
83 // Interfaces for complex options
84
85
86public:
87
88 Arcane::ICaseOptions* caseOptions() const
89 {
90 return m_case_options.get();
91 }
92
93 Arcane::ICaseOptionList* configList() const
94 {
95 return m_case_options->configList();
96 }
97
98 void setCaseModule(Arcane::IModule* m)
99 {
100 m_case_options->setCaseModule(m);
101 }
102
103 void setCaseServiceInfo(Arcane::IServiceInfo* si)
104 {
105 m_case_options->setCaseServiceInfo(si);
106 }
107
108 void addAlternativeNodeName(const Arcane::String& lang,
109 const Arcane::String& name)
110 {
111 m_case_options->addAlternativeNodeName(lang,name);
112 }
113
114private:
115
116 Arcane::ICaseOptionList* _configList() const { return configList(); }
117 Arcane::XmlNode _element() const { return Arcane::XmlNode(); }
118
119private:
120
121 static Arcane::ICaseOptions* _createCaseOption(Arcane::ICaseMng* cm,Arcane::ICaseOptions* co);
122
124
125public:
126
127
130};
131
132/*---------------------------------------------------------------------------*/
133/*---------------------------------------------------------------------------*/
134
135ARCANE_END_NAMESPACE
136
137/*---------------------------------------------------------------------------*/
138/*---------------------------------------------------------------------------*/
139
140#endif
141
142
143
144/*---------------------------------------------------------------------------*/
145/*---------------------------------------------------------------------------*/
146// #WARNING#: This file has been generated automatically. Do not edit.
147// Arcane version 1.0 : 11/18/2024 02:52:35
148/*---------------------------------------------------------------------------*/
149/*---------------------------------------------------------------------------*/
150
151#ifndef ARCANE_MODULE_AXLSTAR_ARCANE_UNITTEST_H
152#define ARCANE_MODULE_AXLSTAR_ARCANE_UNITTEST_H
153
154/*---------------------------------------------------------------------------*/
155/*---------------------------------------------------------------------------*/
156
157#include "arcane/VariableTypes.h"
158#include "arcane/EntryPoint.h"
159#include "arcane/ISubDomain.h"
160#include "arcane/ModuleBuildInfo.h"
161#include "arcane/ModuleFactory.h"
162#include "arcane/ServiceRegisterer.h"
163#include "arcane/BasicModule.h"
164#include "arcane/ServiceInfo.h"
165
166/*---------------------------------------------------------------------------*/
167/*---------------------------------------------------------------------------*/
168
169namespace Arcane
170{
171class ISubDomain;
172class IModule;
173}
174
175/*---------------------------------------------------------------------------*/
176/*---------------------------------------------------------------------------*/
177
178ARCANE_BEGIN_NAMESPACE
179
180/*---------------------------------------------------------------------------*/
181/*---------------------------------------------------------------------------*/
182
183class CaseOptionsUnitTest;
184
185/*---------------------------------------------------------------------------*/
186/*---------------------------------------------------------------------------*/
187
190 : public Arcane::BasicModule
191{
192public:
193
194 static void fillServiceInfo(Arcane::ServiceInfo* si)
195 {
196 si->setCaseOptionsFileName("UnitTest_arcane_std");
197 si->setAxlVersion(1.0);
198 si->setDefaultTagName(Arcane::String("unit-test"));
199 si->setAxlContent(getAxlContent());
200 si->setTagName(Arcane::String("unit-test-module"),Arcane::String("en"));
201 si->setTagName(Arcane::String("module-test-unitaire"),Arcane::String("fr"));
202 }
203
204public:
205
208 , m_options(nullptr)
209 {
210 m_options = new CaseOptionsUnitTest(mb.subDomain()->caseMng());
211 m_options->setCaseModule(this);
212 addEntryPoint(this, "UnitTestBuild",
213 &ArcaneUnitTestObject::unitTestBuild,
216 addEntryPoint(this, "UnitTestInit",
217 &ArcaneUnitTestObject::unitTestInit,
220 addEntryPoint(this, "UnitTestDoTest",
221 &ArcaneUnitTestObject::unitTestDoTest,
224 addEntryPoint(this, "UnitTestExit",
225 &ArcaneUnitTestObject::unitTestExit,
226 Arcane::IEntryPoint::WExit,
228 }
229
230 virtual ~ArcaneUnitTestObject()
231 {
232 delete m_options;
233 }
234
235public:
236
238 virtual void unitTestBuild() = 0; // UnitTestBuild
239 virtual void unitTestInit() = 0; // UnitTestInit
240 virtual void unitTestDoTest() = 0; // UnitTestDoTest
241 virtual void unitTestExit() = 0; // UnitTestExit
242
244 CaseOptionsUnitTest* options() const { return m_options; }
245
246private:
247
250
251protected:
252
254
255private:
257 {
258 const char* str_content = "";
259 const Arcane::Byte* content = (const Arcane::Byte*)(str_content);
260 Arcane::Span<const Arcane::Byte> bytes(content,0);
261 int file_version = 1;
262 return Arcane::FileContent(bytes,file_version,"");
263 }
264
265};
266
267/*---------------------------------------------------------------------------*/
268/*---------------------------------------------------------------------------*/
269
270#define ARCANE_REGISTER_MODULE_UNITTEST(class_name) \
271 ARCANE_REGISTER_AXL_MODULE(class_name,Arcane::ModuleProperty("UnitTest",false))
272
273/*---------------------------------------------------------------------------*/
274/*---------------------------------------------------------------------------*/
275
276ARCANE_END_NAMESPACE
277
278/*---------------------------------------------------------------------------*/
279/*---------------------------------------------------------------------------*/
280
281#endif
282
Generation de la classe de base du Module.
CaseOptionsUnitTest * options() const
Options du jeu de données du module.
static Arcane::FileContent getAxlContent()
Variables du module.
virtual void unitTestBuild()=0
points d'entrée
CaseOptionsUnitTest * m_options
Options du jeu de données du module.
Module basique.
Definition BasicModule.h:45
Informations pour construire une option de jeu de données.
Option du jeu de données de type liste de services.
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 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 du jeu de données.
static const char *const WComputeLoop
appelé pendant la boucle de calcul
Definition IEntryPoint.h:42
static const char *const WBuild
appelé pour la construction du module
Definition IEntryPoint.h:44
@ PNone
Pas de propriétés.
Definition IEntryPoint.h:66
static const char *const WInit
appelé pendant l'initialisation
Definition IEntryPoint.h:46
Interface d'un module.
Definition IModule.h:39
Interface des informations d'un service ou d'un module.
Interface du gestionnaire d'un sous-domaine.
Definition ISubDomain.h:74
virtual ICaseMng * caseMng()=0
Retourne le gestionnaire du jeu de données.
Informations d'un service.
Definition ServiceInfo.h:46
Informations pour construire un module.
ISubDomain * subDomain() const
Accès au sous-domaine associé
Noeud d'un arbre DOM.
Definition XmlNode.h:51
Vue constante d'un tableau de 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
void addEntryPoint(ModuleType *module, const char *name, void(ModuleType::*func)(), const String &where=IEntryPoint::WComputeLoop, int property=IEntryPoint::PNone)
Routine template permettant de référencer un point d'entrée dans un module.
Definition EntryPoint.h:166