cmDynamicLoader.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  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>
  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() {}
  24. ~cmDynamicLoader() {}
  25. private:
  26. cmDynamicLoader(const cmDynamicLoader&); // Not implemented.
  27. void operator=(const cmDynamicLoader&); // Not implemented.
  28. };
  29. #endif