cmDynamicLoader.h 957 B

123456789101112131415161718192021222324252627282930313233
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. // .NAME cmDynamicLoader - class interface to system dynamic libraries
  4. // .SECTION Description
  5. // cmDynamicLoader provides a portable interface to loading dynamic
  6. // libraries into a process.
  7. #ifndef cmDynamicLoader_h
  8. #define cmDynamicLoader_h
  9. #include "cmConfigure.h" // IWYU pragma: keep
  10. #include "cmsys/DynamicLoader.hxx" // IWYU pragma: export
  11. class cmDynamicLoader
  12. {
  13. public:
  14. // Description:
  15. // Load a dynamic library into the current process.
  16. // The returned cmsys::DynamicLoader::LibraryHandle can be used to access
  17. // the symbols in the library.
  18. static cmsys::DynamicLoader::LibraryHandle OpenLibrary(const char*);
  19. // Description:
  20. // Flush the cache of dynamic loader.
  21. static void FlushCache();
  22. protected:
  23. cmDynamicLoader() = default;
  24. ~cmDynamicLoader() = default;
  25. };
  26. #endif