14#include "arcane/utils/String.h"
15#include "arcane/utils/PlatformUtils.h"
16#include "arcane/utils/ArrayView.h"
17#include "arcane/utils/IDynamicLibraryLoader.h"
31class GlibDynamicLibraryLoader;
43 void close()
override;
66 String s = platform::getEnvironmentVariable(
"ARCANE_VERBOSE_DYNAMICLIBRARY");
67 if (s==
"1" || s==
"true")
78 dl = _tryOpen(directory, name +
".dll");
82 dl = _tryOpen(
".", name);
87 dl = _tryOpen(
".", name +
".dll");
95 const gchar*
gname =
reinterpret_cast<const gchar*
>(name.utf8().data());
98 std::cout <<
"** Load Dynamic Library '" <<
full_path <<
"'...";
100 GModule* gmodule = g_module_open(full_path, GModuleFlags());
104 std::cout <<
" NOT FOUND\n";
106 std::cout <<
" OK\n";
111 auto lib =
new GlibDynamicLibrary(
this,gmodule);
112 m_opened_libraries.insert(lib);
119 std::vector<GlibDynamicLibrary*>
libs(m_opened_libraries.begin(),m_opened_libraries.end());
128 auto iter = m_opened_libraries.find(
lib);
129 if (iter!=m_opened_libraries.end())
130 m_opened_libraries.erase(iter);
136 std::set<GlibDynamicLibrary*> m_opened_libraries;
150 std::cerr <<
"WARNING: can not unload module\n";
151 m_manager->removeInstance(
this);
176createGlibDynamicLibraryLoader()
Interface d'une chargeur dynamique de bibliothèque.
IDynamicLibrary * open(const String &directory, const String &name) override
Charge une bibliothèque dynamique.
virtual ~GlibDynamicLibraryLoader()
Libère les ressources.
void closeLibraries() override
Ferme toutes les bibliothèques ouvertes via open()
void close() override
Ferme la bibliothèque dynamique.
void * getSymbolAddress(const String &symbol_name, bool *is_found) override
Retourne l'adresse du symbol de nom symbol_name.
Interface d'une chargeur dynamique de bibliothèque.
Interface d'une bibliothèque dynamique.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
constexpr const_pointer data() const noexcept
Pointeur sur la mémoire allouée.
Chaîne de caractères unicode.
ByteConstArrayView utf8() const
Retourne la conversion de l'instance dans l'encodage UTF-8.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-