cmDynamicLoader.h 977 B

1234567891011121314151617181920212223242526272829303132333435
  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. CM_DISABLE_COPY(cmDynamicLoader)
  14. public:
  15. // Description:
  16. // Load a dynamic library into the current process.
  17. // The returned cmsys::DynamicLoader::LibraryHandle can be used to access
  18. // the symbols in the library.
  19. static cmsys::DynamicLoader::LibraryHandle OpenLibrary(const char*);
  20. // Description:
  21. // Flush the cache of dynamic loader.
  22. static void FlushCache();
  23. protected:
  24. cmDynamicLoader() {}
  25. ~cmDynamicLoader() {}
  26. };
  27. #endif