VTK
vtkDynamicLoader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDynamicLoader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
25 #ifndef vtkDynamicLoader_h
26 #define vtkDynamicLoader_h
27 
28 #include "vtkCommonCoreModule.h" // For export macro
29 #include "vtkObject.h"
30 #include <vtksys/DynamicLoader.hxx>
31 
32 typedef vtksys::DynamicLoader::LibraryHandle vtkLibHandle;
33 typedef vtksys::DynamicLoader::SymbolPointer vtkSymbolPointer;
34 
35 class VTKCOMMONCORE_EXPORT vtkDynamicLoader : public vtkObject
36 {
37 public:
38  static vtkDynamicLoader* New();
39  vtkTypeMacro(vtkDynamicLoader,vtkObject);
40 
46  static vtkLibHandle OpenLibrary(const char*);
47  static vtkLibHandle OpenLibrary(const char*, int);
48 
53  static int CloseLibrary(vtkLibHandle);
54 
58  static vtkSymbolPointer GetSymbolAddress(vtkLibHandle, const char*);
59 
63  static const char* LibPrefix();
64 
68  static const char* LibExtension();
69 
73  static const char* LastError();
74 
75 protected:
77  ~vtkDynamicLoader() override {}
78 
79 private:
80  vtkDynamicLoader(const vtkDynamicLoader&) = delete;
81  void operator=(const vtkDynamicLoader&) = delete;
82 };
83 
84 #endif
85 // VTK-HeaderTest-Exclude: vtkDynamicLoader.h
abstract base class for most VTK objects
Definition: vtkObject.h:59
vtksys::DynamicLoader::SymbolPointer vtkSymbolPointer
vtksys::DynamicLoader::LibraryHandle vtkLibHandle
class interface to system dynamic libraries
~vtkDynamicLoader() override
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...