Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IServiceLoader.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 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/* IServiceLoader.h (C) 2000-2025 */
9/* */
10/* Service and module loading interface. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_ISERVICELOADER_H
13#define ARCANE_CORE_ISERVICELOADER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*!
29 * \internal
30 * \brief Service loading interface.
31 */
33{
34 public:
35
36 //! Releases resources
37 virtual ~IServiceLoader() = default;
38
39 public:
40
41 //! Type of a function that returns a factory for a given service.
42 typedef IServiceFactory* (*CreateServiceFactoryFunc)(IServiceInfo*);
43
44 public:
45
46 //! Loads available application singleton and autoload services
48
49 //! Loads available session singleton and autoload services
50 virtual void loadSessionServices(ISession*) = 0;
51
52 //! Loads available subdomain singleton and autoload services
53 virtual void loadSubDomainServices(ISubDomain* sd) = 0;
54
55 /*!
56 * \brief Loads the subdomain singleton service with name \a name.
57 *
58 * Returns \a true upon success and \a false if the singleton service
59 * is not found.
60 */
61 virtual bool loadSingletonService(ISubDomain* sd, const String& name) = 0;
62
63 /*!
64 * \brief Loads modules in the subdomain \a sd.
65 *
66 * If \a all_modules is true, all modules are loaded; otherwise,
67 * only modules with the 'autoload' attribute are loaded
68 */
69 virtual void loadModules(ISubDomain* sd, bool all_modules) = 0;
70
71 //! Calls the initialization methods for module factories.
73};
74
75/*---------------------------------------------------------------------------*/
76/*---------------------------------------------------------------------------*/
77
78} // namespace Arcane
79
80/*---------------------------------------------------------------------------*/
81/*---------------------------------------------------------------------------*/
82
83#endif
Declarations of Arcane's general types.
Application interface.
Interface for service or module information.
virtual void loadSubDomainServices(ISubDomain *sd)=0
Loads available subdomain singleton and autoload services.
virtual void initializeModuleFactories(ISubDomain *sd)=0
Calls the initialization methods for module factories.
virtual void loadModules(ISubDomain *sd, bool all_modules)=0
Loads modules in the subdomain sd.
virtual void loadSessionServices(ISession *)=0
Loads available session singleton and autoload services.
virtual ~IServiceLoader()=default
Releases resources.
virtual bool loadSingletonService(ISubDomain *sd, const String &name)=0
Loads the subdomain singleton service with name name.
virtual void loadApplicationServices(IApplication *)=0
Loads available application singleton and autoload services.
Interface for a case execution session.
Definition ISession.h:38
Interface of the subdomain manager.
Definition ISubDomain.h:75
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --