Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IDynamicLibraryLoader.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/* IDynamicLibraryLoader.h (C) 2000-2025 */
9/* */
10/* Interface of a dynamic library loader. */
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/*---------------------------------------------------------------------------*/
27
31class ARCCORE_BASE_EXPORT IDynamicLibrary
32{
33 public:
34
35 virtual ~IDynamicLibrary() = default;
36 public:
37
44 virtual void close() = 0;
45
52 virtual void* getSymbolAddress(const String& symbol_name, bool* is_found) = 0;
53};
54
55/*---------------------------------------------------------------------------*/
56/*---------------------------------------------------------------------------*/
57
63class ARCCORE_BASE_EXPORT IDynamicLibraryLoader
64{
65 public:
66
67 virtual ~IDynamicLibraryLoader() = default;
68
69 public:
70
71 virtual void build() = 0;
72
73 public:
74
84 virtual IDynamicLibrary* open(const String& directory, const String& name) = 0;
85
87 virtual void closeLibraries() = 0;
88
89 public:
90
95};
96
97/*---------------------------------------------------------------------------*/
98/*---------------------------------------------------------------------------*/
99
100} // End namespace Arcane
101
102/*---------------------------------------------------------------------------*/
103/*---------------------------------------------------------------------------*/
104
105#endif
Declarations of types for the 'base' component of Arccore.
Interface of a dynamic library loader.
virtual IDynamicLibrary * open(const String &directory, const String &name)=0
Loads a dynamic library.
static IDynamicLibraryLoader * getDefault()
Service used for dynamically loading libraries.
virtual ~IDynamicLibraryLoader()=default
Releases resources.
virtual void closeLibraries()=0
Closes all libraries opened via open().
Interface of a dynamic library.
virtual void close()=0
Closes the dynamic library.
virtual ~IDynamicLibrary()=default
Releases resources.
virtual void * getSymbolAddress(const String &symbol_name, bool *is_found)=0
Returns the address of the symbol named symbol_name.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --