2016-09-27 19:01:08 +00:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2002-08-21 15:58:01 +00:00
|
|
|
// .NAME cmDynamicLoader - class interface to system dynamic libraries
|
|
|
|
// .SECTION Description
|
2006-03-16 16:01:05 +00:00
|
|
|
// cmDynamicLoader provides a portable interface to loading dynamic
|
|
|
|
// libraries into a process.
|
2002-08-21 15:58:01 +00:00
|
|
|
|
2014-12-11 18:10:03 +00:00
|
|
|
#ifndef cmDynamicLoader_h
|
|
|
|
#define cmDynamicLoader_h
|
2002-08-21 15:58:01 +00:00
|
|
|
|
2017-08-25 18:39:02 +00:00
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
2002-08-21 15:58:01 +00:00
|
|
|
|
2017-03-23 22:27:08 +00:00
|
|
|
#include "cmsys/DynamicLoader.hxx" // IWYU pragma: export
|
2002-09-10 19:46:49 +00:00
|
|
|
|
2002-08-21 15:58:01 +00:00
|
|
|
class cmDynamicLoader
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// Description:
|
|
|
|
// Load a dynamic library into the current process.
|
2006-03-16 16:01:05 +00:00
|
|
|
// The returned cmsys::DynamicLoader::LibraryHandle can be used to access
|
|
|
|
// the symbols in the library.
|
|
|
|
static cmsys::DynamicLoader::LibraryHandle OpenLibrary(const char*);
|
2002-08-21 15:58:01 +00:00
|
|
|
|
2002-09-24 14:24:56 +00:00
|
|
|
// Description:
|
|
|
|
// Flush the cache of dynamic loader.
|
|
|
|
static void FlushCache();
|
2006-03-16 16:01:05 +00:00
|
|
|
|
2002-08-21 15:58:01 +00:00
|
|
|
protected:
|
2019-01-22 22:44:50 +00:00
|
|
|
cmDynamicLoader() = default;
|
|
|
|
~cmDynamicLoader() = default;
|
2002-08-21 15:58:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|