VTK  9.4.20241121
vtkDynamicLoader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
13#ifndef vtkDynamicLoader_h
14#define vtkDynamicLoader_h
15
16#include "vtkCommonCoreModule.h" // For export macro
17#include "vtkObject.h"
18#include <vtksys/DynamicLoader.hxx> // Implementation
19
20typedef vtksys::DynamicLoader::LibraryHandle vtkLibHandle;
21typedef vtksys::DynamicLoader::SymbolPointer vtkSymbolPointer;
22
23VTK_ABI_NAMESPACE_BEGIN
24class VTKCOMMONCORE_EXPORT vtkDynamicLoader : public vtkObject
25{
26public:
29 void PrintSelf(ostream& os, vtkIndent indent) override;
30
37 static vtkLibHandle OpenLibrary(VTK_FILEPATH const char*, int);
38
44
49
53 static const char* LibPrefix();
54
58 static const char* LibExtension();
59
63 static const char* LastError();
64
65protected:
66 vtkDynamicLoader() = default;
67 ~vtkDynamicLoader() override = default;
68
69private:
70 vtkDynamicLoader(const vtkDynamicLoader&) = delete;
71 void operator=(const vtkDynamicLoader&) = delete;
72};
73
74VTK_ABI_NAMESPACE_END
75#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:108
abstract base class for most VTK objects
Definition vtkObject.h:162
vtksys::DynamicLoader::SymbolPointer vtkSymbolPointer
vtksys::DynamicLoader::LibraryHandle vtkLibHandle
#define VTK_FILEPATH