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