VTK  9.1.0
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> // Implementation
31
32typedef vtksys::DynamicLoader::LibraryHandle vtkLibHandle;
33typedef vtksys::DynamicLoader::SymbolPointer vtkSymbolPointer;
34
35class VTKCOMMONCORE_EXPORT vtkDynamicLoader : public vtkObject
36{
37public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
48 static vtkLibHandle OpenLibrary(VTK_FILEPATH const char*, int);
49
55
60
64 static const char* LibPrefix();
65
69 static const char* LibExtension();
70
74 static const char* LastError();
75
76protected:
77 vtkDynamicLoader() = default;
78 ~vtkDynamicLoader() override = default;
79
80private:
81 vtkDynamicLoader(const vtkDynamicLoader&) = delete;
82 void operator=(const vtkDynamicLoader&) = delete;
83};
84
85#endif
class interface to system dynamic libraries
vtkDynamicLoader()=default
static vtkDynamicLoader * New()
static vtkSymbolPointer GetSymbolAddress(vtkLibHandle, const char *)
Find the address of the symbol in the given library.
static vtkLibHandle OpenLibrary(VTK_FILEPATH const char *)
Load a dynamic library into the current process.
static const char * LibPrefix()
Return the library prefix for the given architecture.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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 vtkLibHandle OpenLibrary(VTK_FILEPATH const char *, int)
~vtkDynamicLoader() override=default
static const char * LastError()
Return the last error produced from a calls made on this class.
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:73
vtksys::DynamicLoader::SymbolPointer vtkSymbolPointer
vtksys::DynamicLoader::LibraryHandle vtkLibHandle
#define VTK_FILEPATH