cmDynamicLoader.h 957 Bytes
Newer Older
1 2
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
   file Copyright.txt or https://cmake.org/licensing for details.  */
Ken Martin's avatar
Ken Martin committed
3 4
// .NAME cmDynamicLoader - class interface to system dynamic libraries
// .SECTION Description
5 6
// cmDynamicLoader provides a portable interface to loading dynamic
// libraries into a process.
Ken Martin's avatar
Ken Martin committed
7

8 9
#ifndef cmDynamicLoader_h
#define cmDynamicLoader_h
Ken Martin's avatar
Ken Martin committed
10

11
#include "cmConfigure.h" // IWYU pragma: keep
Ken Martin's avatar
Ken Martin committed
12

Daniel Pfeifer's avatar
Daniel Pfeifer committed
13
#include "cmsys/DynamicLoader.hxx" // IWYU pragma: export
14

Ken Martin's avatar
Ken Martin committed
15 16 17 18 19
class cmDynamicLoader
{
public:
  // Description:
  // Load a dynamic library into the current process.
20 21 22
  // The returned cmsys::DynamicLoader::LibraryHandle can be used to access
  // the symbols in the library.
  static cmsys::DynamicLoader::LibraryHandle OpenLibrary(const char*);
Ken Martin's avatar
Ken Martin committed
23

24 25 26
  // Description:
  // Flush the cache of dynamic loader.
  static void FlushCache();
27

Ken Martin's avatar
Ken Martin committed
28
protected:
wahikihiki's avatar
wahikihiki committed
29 30
  cmDynamicLoader() = default;
  ~cmDynamicLoader() = default;
Ken Martin's avatar
Ken Martin committed
31 32 33
};

#endif