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
32typedef vtksys::DynamicLoader::LibraryHandle vtkLibHandle;
33// Cannot use this as this is a void (*)() but VTK old API used to be void*
34typedef vtksys::DynamicLoader::SymbolPointer vtkSymbolPointer;
35
36class VTKCOMMONCORE_EXPORT vtkDynamicLoader : public vtkObject
37{
38public:
41
47 static vtkLibHandle OpenLibrary(const char*);
48
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
76protected:
78 ~vtkDynamicLoader() VTK_OVERRIDE {}
79
80private:
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
class interface to system dynamic libraries
static void * GetSymbolAddress(vtkLibHandle, const char *)
Find the address of the symbol in the given library static vtkSymbolPointer GetSymbolAddress(vtkLibHa...
static vtkDynamicLoader * New()
static vtkLibHandle OpenLibrary(const char *)
Load a dynamic library into the current process.
static const char * LibPrefix()
Return the library prefix for the given architecture.
~vtkDynamicLoader() override
static const char * LibExtension()
Return the library extension for the given architecture.
static int CloseLibrary(vtkLibHandle)
Attempt to detach a dynamic library from the process.
static const char * LastError()
Return the last error produced from a calls made on this class.
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtksys::DynamicLoader::SymbolPointer vtkSymbolPointer
vtksys::DynamicLoader::LibraryHandle vtkLibHandle