Arcane  v4.1.1.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
IDynamicLibraryLoader.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/* IDynamicLibraryLoader.h (C) 2000-2025 */
9/* */
10/* Interface d'un chargeur dynamique de bibliothèque. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_BASE_INTERNAL_IDYNAMICLIBRARYLOADER_H
13#define ARCCORE_BASE_INTERNAL_IDYNAMICLIBRARYLOADER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
30class ARCCORE_BASE_EXPORT IDynamicLibrary
31{
32 public:
33
34 virtual ~IDynamicLibrary() = default;
35 public:
36
43 virtual void close() = 0;
44
51 virtual void* getSymbolAddress(const String& symbol_name, bool* is_found) = 0;
52};
53
54/*---------------------------------------------------------------------------*/
55/*---------------------------------------------------------------------------*/
61class ARCCORE_BASE_EXPORT IDynamicLibraryLoader
62{
63 public:
64
65 virtual ~IDynamicLibraryLoader() = default;
66
67 public:
68
69 virtual void build() = 0;
70
71 public:
72
82 virtual IDynamicLibrary* open(const String& directory, const String& name) = 0;
83
85 virtual void closeLibraries() = 0;
86
87 public:
88
93};
94
95/*---------------------------------------------------------------------------*/
96/*---------------------------------------------------------------------------*/
97
98} // End namespace Arcane
99
100/*---------------------------------------------------------------------------*/
101/*---------------------------------------------------------------------------*/
102
103#endif
Déclarations des types de la composante 'base' de Arccore.
Interface d'un chargeur dynamique de bibliothèque.
virtual IDynamicLibrary * open(const String &directory, const String &name)=0
Charge une bibliothèque dynamique.
static IDynamicLibraryLoader * getDefault()
Service utilisé pour charger dynamiquement des bibliothèques.
virtual ~IDynamicLibraryLoader()=default
Libère les ressources.
virtual void closeLibraries()=0
Ferme toutes les bibliothèques ouvertes via open()
Interface d'une bibliothèque dynamique.
virtual void close()=0
Ferme la bibliothèque dynamique.
virtual ~IDynamicLibrary()=default
Libère les ressources.
virtual void * getSymbolAddress(const String &symbol_name, bool *is_found)=0
Retourne l'adresse du symbol de nom symbol_name.
Chaîne de caractères unicode.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-