Arcane
v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
ArcaneMeshUtilsMain.cc
1
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2
//-----------------------------------------------------------------------------
3
// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4
// See the top-level COPYRIGHT file for details.
5
// SPDX-License-Identifier: Apache-2.0
6
//-----------------------------------------------------------------------------
7
/*---------------------------------------------------------------------------*/
8
9
#include "arcane/utils/ApplicationInfo.h"
10
#include "arcane/utils/ITraceMng.h"
11
#include "arcane/utils/Exception.h"
12
13
#include "arcane/FactoryService.h"
14
#include "arcane/CodeService.h"
15
#include "arcane/impl/ArcaneMain.h"
16
#include "arcane/impl/Session.h"
17
18
using namespace
Arcane
;
19
20
/*---------------------------------------------------------------------------*/
21
/*---------------------------------------------------------------------------*/
25
class
ArcaneMeshUtilsCodeService
26
:
public
Arcane::CodeService
27
{
28
public
:
29
30
ArcaneMeshUtilsCodeService
(
const
ServiceBuildInfo
&
sbi
)
31
:
CodeService
(
sbi
)
32
{
33
_addExtension(
"msh"
);
34
}
35
36
public
:
37
38
void
build() {}
39
ISession
*
createSession
()
override
40
{
41
ISession
* session =
new
Session
(_application());
42
_application()->
addSession
(session);
43
return
session;
44
}
45
bool
parseArgs
(
StringList
& args)
override
;
46
};
47
48
/*---------------------------------------------------------------------------*/
49
/*---------------------------------------------------------------------------*/
50
51
bool
ArcaneMeshUtilsCodeService::
52
parseArgs
(
StringList
& args)
53
{
54
ARCANE_UNUSED(args);
55
ITraceMng
* trace = _application()->
traceMng
();
56
trace->
info
() <<
"** PARSE ARGS"
;
57
return
false
;
58
}
59
60
/*---------------------------------------------------------------------------*/
61
/*---------------------------------------------------------------------------*/
62
63
ARCANE_REGISTER_APPLICATION_FACTORY
(
ArcaneMeshUtilsCodeService
,
64
ICodeService
,
65
ArcaneMeshUtilsCode
);
66
67
/*---------------------------------------------------------------------------*/
68
/*---------------------------------------------------------------------------*/
69
70
int
71
_mainHelper(
int
argc,
char
* argv[])
72
{
73
int
r
= 0;
74
ArcaneMain::arcaneInitialize
();
75
{
76
ApplicationInfo
app_info
(&argc,&argv,
"ArcaneMeshUtils"
,
VersionInfo
(1,0,0));
77
r
=
ArcaneMain::arcaneMain
(
app_info
);
78
}
79
ArcaneMain::arcaneFinalize
();
80
return
r
;
81
}
82
83
/*---------------------------------------------------------------------------*/
84
/*---------------------------------------------------------------------------*/
85
86
int
87
main(
int
argc,
char
* argv[])
88
{
89
int
r
= 0;
90
int
r2
=
arcaneCallFunctionAndCatchException
([&](){
r
= _mainHelper(argc,argv); });
91
if
(
r2
!=0)
92
return
r2
;
93
return
r
;
94
}
95
96
/*---------------------------------------------------------------------------*/
97
/*---------------------------------------------------------------------------*/
ARCANE_REGISTER_APPLICATION_FACTORY
#define ARCANE_REGISTER_APPLICATION_FACTORY(aclass, ainterface, aname)
Enregistre un service de fabrique pour la classe aclass.
Definition
ServiceFactory.h:572
ArcaneMeshUtilsCodeService
Service de code pour les utilitaires de maillage.
Definition
ArcaneMeshUtilsMain.cc:27
ArcaneMeshUtilsCodeService::parseArgs
bool parseArgs(StringList &args) override
Analyse les arguments de la ligne de commandes.
Definition
ArcaneMeshUtilsMain.cc:52
ArcaneMeshUtilsCodeService::createSession
ISession * createSession() override
Crée une session.
Definition
ArcaneMeshUtilsMain.cc:39
Arcane::ApplicationInfo
Informations sur une application.
Definition
ApplicationInfo.h:40
Arcane::ArcaneMain::arcaneMain
static int arcaneMain(const ApplicationInfo &app_info, IMainFactory *factory=nullptr)
Point d'entrée de l'exécutable dans Arcane.
Definition
ArcaneMain.cc:892
Arcane::ArcaneMain::arcaneInitialize
static void arcaneInitialize()
Initialise Arcane.
Definition
ArcaneMain.cc:719
Arcane::ArcaneMain::arcaneFinalize
static void arcaneFinalize()
Termine l'utilisation Arcane.
Definition
ArcaneMain.cc:747
Arcane::CodeService
Classe abstraite d'un service de code.
Definition
CodeService.h:44
Arcane::IApplication::addSession
virtual void addSession(ISession *session)=0
Ajoute la session session.
Arcane::IBase::traceMng
virtual ITraceMng * traceMng() const =0
Gestionnaire de traces.
Arcane::ICodeService
Interface d'un chargeur de cas.
Definition
ICodeService.h:38
Arcane::ISession
Interface d'une session d'exécution d'un cas.
Definition
ISession.h:44
Arcane::LimaWrapper
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition
Lima.cc:120
Arcane::List< String >
Arcane::ServiceBuildInfo
Structure contenant les informations pour créer un service.
Definition
ServiceBuildInfo.h:198
Arcane::Session
Session.
Definition
Session.h:39
Arcane::VersionInfo
Informations sur une version.
Definition
VersionInfo.h:46
Arccore::ITraceMng
Interface du gestionnaire de traces.
Definition
arccore/src/trace/arccore/trace/ITraceMng.h:156
Arccore::ITraceMng::info
virtual TraceMessage info()=0
Flot pour un message d'information.
Arcane
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Definition
AcceleratorGlobal.h:36
Arcane::arcaneCallFunctionAndCatchException
Integer arcaneCallFunctionAndCatchException(std::function< void()> function)
Definition
arcane/src/arcane/utils/Exception.cc:90
arcane
meshutils
ArcaneMeshUtilsMain.cc
Généré le Lundi 18 Novembre 2024 03:00:01 pour Arcane par
1.9.8