Arcane  v3.16.8.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
ServiceBuildInfo.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2025 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/* ServiceBuildInfo.h (C) 2000-2025 */
9/* */
10/* Structure contenant les informations pour créer un service. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_SERVICEBUILDINFO_H
13#define ARCANE_CORE_SERVICEBUILDINFO_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/VersionInfo.h"
18
21#include "arcane/core/MeshHandle.h"
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
26namespace Arcane
27{
28
29/*---------------------------------------------------------------------------*/
30/*---------------------------------------------------------------------------*/
31/*!
32 * \brief Informations pour créer un service.
33 *
34 * Les instances de cette classe sont internes à Arcane. En général il faut
35 * utiliser la classe ServiceBuildInfo.
36 *
37 * Les différents champs de cette classe ne sont pas tous valides. Leur validité
38 * dépend du constructeur utilisé. Seul application() est toujours valide.
39 * Il est possible de connaitre les champs valides via la valeur de
40 * creationType().
41 */
42class ARCANE_CORE_EXPORT ServiceBuildInfoBase
43{
44 public:
45
46 /*!@{
47 * \name Constructeurs.
48 *
49 * Les différents constructeurs permettent de définir le type de service
50 * (eServiceType).
51 */
52
53 /*!
54 * \brief Service associé à une application \a IApplication.
55 *
56 * Le service sera de type #ST_Application.
57 */
59
60 /*!
61 * \brief Service associé à une session \a ISession.
62 *
63 * Le service sera de type #ST_Session.
64 */
66
67 /*!
68 * \brief Service associé à un sous-domaine \a ISubDomain.
69 *
70 * Le service sera de type #ST_SubDomain.
71 * Donne aussi accès à la propriété de maillage (\a mesh())
72 */
73 explicit ServiceBuildInfoBase(ISubDomain* sd);
74
75 /*!
76 * \brief Service associé à un maillage \a mesh.
77 *
78 * Le service sera de type #ST_SubDomain.
79 */
81
82 /*!
83 * \brief Service associé à un maillage \a mesh_handle.
84 *
85 * Le service sera de type #ST_SubDomain.
86 */
87 explicit ServiceBuildInfoBase(const MeshHandle& mesh_handle);
88
89 /*!
90 * \brief Service associé à un maillage \a mesh_handle.
91 *
92 * Le service sera de type #ST_SubDomain.
93 */
94 ServiceBuildInfoBase(ISubDomain* sd, const MeshHandle& mesh_handle);
95
96 /*!
97 * \brief Service associé à une option du jeu de données \a co.
98 *
99 * Le service sera de type #ST_CaseOption.
100 * Donne aussi accès aux propriétés de maillage (mesh()) et
101 * sous-domaine (subDomain()).
102 */
104
105 /*!
106 * \brief Service associé à une option du jeu de données \a co.
107 *
108 * Le service sera de type #ST_CaseOption.
109 * Donne aussi accès aux propriétés de maillage (mesh()) et
110 * sous-domaine (subDomain()).
111 */
113
114 /*!
115 * \brief Service associé à un maillage \a mesh.
116 *
117 * Le service sera de type #ST_SubDomain.
118 *
119 * \deprecated Utiliser ServiceBuildInfoBase(const MeshHandle&) à la place.
120 */
121 ARCCORE_DEPRECATED_2020("Use ServiceBuildInfoBase(const MeshHandle&) instead")
123
124 //!@}
125
126 public:
127
128 /*!
129 * \brief Accès à l'application \a IApplication associé.
130 *
131 * L'instance n'est jamais nulle quel que soit le service.
132 */
133 IApplication* application() const { return m_application; }
134
135 /*!
136 * \brief Accès au \a ISession associé.
137 *
138 * \pre creationType() & (#ST_CaseOption|#ST_SubDomain|#ST_Session)
139 */
140 ISession* session() const { return m_session; }
141
142 /*!
143 * \brief Accès au \a ISubDomain associé.
144 *
145 * \pre creationType() & (#ST_CaseOption|#ST_SubDomain)
146 */
147 ISubDomain* subDomain() const { return m_sub_domain; }
148
149 /*!
150 * \brief Accès au \a IMesh associé.
151 *
152 * \pre creationType() & (#ST_CaseOption|#ST_SubDomain)
153 */
154 IMesh* mesh() const;
155
156 /*!
157 * \brief Accès au handle de maillage \a MeshHandle associé.
158 *
159 * \pre creationType() & (#ST_CaseOption|#ST_SubDomain)
160 */
161 const MeshHandle& meshHandle() const { return m_mesh_handle; }
162
163 /*!
164 * \brief Accès au \a ICaseOptions associé.
165 *
166 * \pre creationType() & #ST_CaseOption
167 */
168 ICaseOptions* caseOptions() const { return m_case_options; }
169
170 /*!
171 * \brief Accès à l'instance parente qui a créée cette instance.
172 */
173 IBase* serviceParent() const { return m_service_parent; }
174
175 //! Type du service pouvant être créé par cette instance
176 eServiceType creationType() const { return m_creation_type; }
177
178 protected:
179 private:
180
181 IApplication* m_application = nullptr;
182 ISession* m_session = nullptr;
183 ISubDomain* m_sub_domain = nullptr;
184 MeshHandle m_mesh_handle;
185 ICaseOptions* m_case_options = nullptr;
186 IBase* m_service_parent = nullptr;
187 eServiceType m_creation_type = ST_None;
188};
189
190/*---------------------------------------------------------------------------*/
191/*---------------------------------------------------------------------------*/
192/*!
193 * \ingroup Service
194 * \brief Structure contenant les informations pour créer un service.
195 */
196class ARCANE_CORE_EXPORT ServiceBuildInfo
198{
199 public:
200
201 ServiceBuildInfo(IServiceInfo* service_info, const ServiceBuildInfoBase& base);
202
203 public:
204
205 //! Accès au \a IServiceInfo associé
206 IServiceInfo* serviceInfo() const { return m_service_info; }
207
208 private:
209
210 IServiceInfo* m_service_info;
211};
212
213/*---------------------------------------------------------------------------*/
214/*---------------------------------------------------------------------------*/
215
216} // End namespace Arcane
217
218/*---------------------------------------------------------------------------*/
219/*---------------------------------------------------------------------------*/
220
221#endif
222
Déclarations des types généraux de Arcane.
Ce fichier contient les différentes types et classes pour spécifier les propriétés d'un service.
Interface de l'application.
Interface de la classe de base des objets principaux arcane.
Definition IBase.h:31
Interface des informations d'un service ou d'un module.
Interface d'une session d'exécution d'un cas.
Definition ISession.h:37
Interface du gestionnaire d'un sous-domaine.
Definition ISubDomain.h:74
Handle sur un maillage.
Definition MeshHandle.h:47
IMesh * mesh() const
Accès au IMesh associé.
IBase * serviceParent() const
Accès à l'instance parente qui a créée cette instance.
ServiceBuildInfoBase(IApplication *app)
Service associé à une application IApplication.
const MeshHandle & meshHandle() const
Accès au handle de maillage MeshHandle associé.
ISession * session() const
Accès au ISession associé.
IApplication * application() const
Accès à l'application IApplication associé.
ISubDomain * subDomain() const
Accès au ISubDomain associé.
ICaseOptions * caseOptions() const
Accès au ICaseOptions associé.
eServiceType creationType() const
Type du service pouvant être créé par cette instance.
IServiceInfo * serviceInfo() const
Accès au IServiceInfo associé
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
eServiceType
Type du service.