Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
IService.h
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/* IService.h (C) 2000-2019 */
9/* */
10/* Interface d'un service. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_ISERVICE_H
13#define ARCANE_ISERVICE_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/ArcaneTypes.h"
18#include "arcane/utils/ExternalRef.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29class IServiceInfo;
30class IBase;
31class IServiceInstance;
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
44class ARCANE_CORE_EXPORT IService
45{
46 protected:
47
50
51 public:
52
53 virtual ~IService() {}
54
55 public:
56
58 virtual IBase* serviceParent() const =0;
59
62
64 virtual IServiceInfo* serviceInfo() const =0;
65};
66
67/*---------------------------------------------------------------------------*/
68/*---------------------------------------------------------------------------*/
72class ARCANE_CORE_EXPORT IServiceInstance
73{
74 friend class Ref<IServiceInstance>;
75 protected:
76 virtual ~IServiceInstance() = default;
77 public:
79 virtual void addReference() =0;
81 virtual void removeReference() =0;
82 virtual IServiceInfo* serviceInfo() const=0;
84 virtual Internal::ExternalRef _internalDotNetHandle() const { return {}; }
85};
86
87/*---------------------------------------------------------------------------*/
88/*---------------------------------------------------------------------------*/
93class ARCANE_CORE_EXPORT ISingletonServiceInstance
94: public IServiceInstance
95{
96 public:
99};
100
101/*---------------------------------------------------------------------------*/
102/*---------------------------------------------------------------------------*/
107template<typename InterfaceType>
109: public IServiceInstance
110{
111 public:
112 virtual Ref<InterfaceType> instance() =0;
113 private:
114};
115
116/*---------------------------------------------------------------------------*/
117/*---------------------------------------------------------------------------*/
118
119} // End namespace Arcane
120
121/*---------------------------------------------------------------------------*/
122/*---------------------------------------------------------------------------*/
123
124#endif
125
Interface de la classe de base des objets principaux arcane.
Definition IBase.h:38
Interface des informations d'un service ou d'un module.
Interface typée gérant l'instance d'un service.
Definition IService.h:110
Interface d'une instance d'un service.
Definition IService.h:73
virtual Internal::ExternalRef _internalDotNetHandle() const
Definition IService.h:84
virtual void removeReference()=0
Supprime une référence.
virtual void addReference()=0
Ajoute une référence.
Interface d'un service.
Definition IService.h:45
virtual IBase * serviceParent() const =0
Parent de ce service.
virtual ~IService()
Libère les ressources.
Definition IService.h:53
IService()
Constructeur.
Definition IService.h:49
virtual IServiceInfo * serviceInfo() const =0
Informations du service.
virtual IService * serviceInterface()=0
Interface de ce service (normalement this)
Interface d'une instance de service singleton.
Definition IService.h:95
virtual ServiceInstanceCollection interfaceInstances()=0
Liste des instances des interfaces implémentées par le singleton.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Gestion des références sur un objet externe.
Référence à une instance.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-