cmDynamicLoader.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. // .NAME cmDynamicLoader - class interface to system dynamic libraries
  11. // .SECTION Description
  12. // cmDynamicLoader provides a portable interface to loading dynamic
  13. // libraries into a process.
  14. #ifndef __cmDynamicLoader_h
  15. #define __cmDynamicLoader_h
  16. #include "cmStandardIncludes.h"
  17. #include <cmsys/DynamicLoader.hxx>
  18. class cmDynamicLoader
  19. {
  20. public:
  21. // Description:
  22. // Load a dynamic library into the current process.
  23. // The returned cmsys::DynamicLoader::LibraryHandle can be used to access
  24. // the symbols in the library.
  25. static cmsys::DynamicLoader::LibraryHandle OpenLibrary(const char*);
  26. // Description:
  27. // Flush the cache of dynamic loader.
  28. static void FlushCache();
  29. protected:
  30. cmDynamicLoader() {};
  31. ~cmDynamicLoader() {};
  32. private:
  33. cmDynamicLoader(const cmDynamicLoader&); // Not implemented.
  34. void operator=(const cmDynamicLoader&); // Not implemented.
  35. };
  36. #endif