cmDynamicLoader.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. // .NAME cmDynamicLoader - class interface to system dynamic libraries
  14. // .SECTION Description
  15. // cmDynamicLoader provides a portable interface to loading dynamic
  16. // libraries into a process.
  17. #ifndef __cmDynamicLoader_h
  18. #define __cmDynamicLoader_h
  19. #include "cmStandardIncludes.h"
  20. #include <cmsys/DynamicLoader.hxx>
  21. class cmDynamicLoader
  22. {
  23. public:
  24. // Description:
  25. // Load a dynamic library into the current process.
  26. // The returned cmsys::DynamicLoader::LibraryHandle can be used to access
  27. // the symbols in the library.
  28. static cmsys::DynamicLoader::LibraryHandle OpenLibrary(const char*);
  29. // Description:
  30. // Flush the cache of dynamic loader.
  31. static void FlushCache();
  32. protected:
  33. cmDynamicLoader() {};
  34. ~cmDynamicLoader() {};
  35. private:
  36. cmDynamicLoader(const cmDynamicLoader&); // Not implemented.
  37. void operator=(const cmDynamicLoader&); // Not implemented.
  38. };
  39. #endif