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 // Cannot use this as this is a void (*)() but VTK old API used to be void*
34 typedef vtksys::DynamicLoader::SymbolPointer vtkSymbolPointer;
35 
36 class VTKCOMMONCORE_EXPORT vtkDynamicLoader : public vtkObject
37 {
38 public:
39  static vtkDynamicLoader* New();
40  vtkTypeMacro(vtkDynamicLoader,vtkObject);
41 
47  static vtkLibHandle OpenLibrary(const char*);
48 
53  static int CloseLibrary(vtkLibHandle);
54 
59  static void* GetSymbolAddress(vtkLibHandle, const char*);
60 
64  static const char* LibPrefix();
65 
69  static const char* LibExtension();
70 
74  static const char* LastError();
75 
76 protected:
78  ~vtkDynamicLoader() VTK_OVERRIDE {}
79 
80 private:
81  vtkDynamicLoader(const vtkDynamicLoader&) VTK_DELETE_FUNCTION;
82  void operator=(const vtkDynamicLoader&) VTK_DELETE_FUNCTION;
83 };
84 
85 #endif
86 // 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...