Arcane  v3.16.6.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
ServiceRegisterer.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/* ServiceRegisterer.h (C) 2000-2025 */
9/* */
10/* Singleton permettant d'enregistrer un service. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_SERCVICEREGISTERER_H
13#define ARCANE_CORE_SERCVICEREGISTERER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
19#include "arcane/core/ModuleProperty.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
47class ARCANE_CORE_EXPORT ServiceRegisterer
48{
49 public:
50
51 typedef IModuleFactoryInfo* (*ModuleFactoryWithPropertyFunc)(const ModuleProperty& properties);
52 typedef IServiceInfo* (*ServiceInfoWithPropertyCreateFunc)(const ServiceProperty& properties);
53
54 public:
55
61 ServiceRegisterer(ServiceInfoWithPropertyCreateFunc func, const ServiceProperty& properties) ARCANE_NOEXCEPT;
62
68 ServiceRegisterer(ModuleFactoryWithPropertyFunc func, const ModuleProperty& properties) ARCANE_NOEXCEPT;
69
70 public:
71
78 ServiceInfoWithPropertyCreateFunc infoCreatorWithPropertyFunction() { return m_info_function_with_property; }
79
87
89 const char* name() { return m_name; }
90
96 ARCANE_DEPRECATED_260 const ServiceProperty& property() const { return m_service_property; }
97
100
103
106
109
110 private:
111
113
115
117
119
120 public:
121
123 static ServiceRegisterer* firstService();
124
126 static Integer nbService();
127
128 private:
129
131 ModuleFactoryWithPropertyFunc m_module_factory_with_property_functor = nullptr;
133 ServiceInfoWithPropertyCreateFunc m_info_function_with_property = nullptr;
135 const char* m_name = nullptr;
144
145 private:
146
147 void _init();
148};
149
150/*---------------------------------------------------------------------------*/
151/*---------------------------------------------------------------------------*/
152
153} // namespace Arcane
154
155/*---------------------------------------------------------------------------*/
156/*---------------------------------------------------------------------------*/
157
158#endif
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.
Informations sur la fabrique d'un module.
Interface des informations d'un service ou d'un module.
Propriétés de création d'un module.
Propriétés de création d'un service.
Enregistreur de service et modules.
void setPreviousService(ServiceRegisterer *s)
Positionne le service précédent.
ModuleProperty m_module_property
Propriétés du module.
ServiceRegisterer * m_next
Service suivant.
ServiceRegisterer * m_previous
Service précédent.
ServiceRegisterer * previousService() const
Service précédent (0 si le premier)
ServiceRegisterer * nextService() const
Service suivant (0 si le dernier)
ServiceInfoWithPropertyCreateFunc m_info_function_with_property
Fonction de création du IServiceInfo.
void setNextService(ServiceRegisterer *s)
Positionne le service suivant.
const ServiceProperty & serviceProperty() const
Propriétés dans le cas d'un service.
const char * name()
Nom du service.
ModuleFactoryWithPropertyFunc moduleFactoryWithPropertyFunction()
Fonction de création de la factory si on est un module.
ServiceInfoWithPropertyCreateFunc infoCreatorWithPropertyFunction()
Fonction de création de l'instance 'ServiceInfo' si on est un service.
ModuleFactoryWithPropertyFunc m_module_factory_with_property_functor
Fonction de création du IModuleFactory.
const ModuleProperty & moduleProperty() const
Propriétés dans le cas d'un module.
ARCANE_DEPRECATED_260 const ServiceProperty & property() const
Propriétés du service.
const char * m_name
Nom du service.
ServiceRegisterer(ServiceInfoWithPropertyCreateFunc func, const ServiceProperty &properties) ARCANE_NOEXCEPT
Crée en enregistreur pour le service name et la fonction func.
ServiceProperty m_service_property
Propriétés du service.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Int32 Integer
Type représentant un entier.