VTK  9.2.6
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 
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  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
47  static vtkLibHandle OpenLibrary(VTK_FILEPATH const char*);
48  static vtkLibHandle OpenLibrary(VTK_FILEPATH const char*, int);
49 
54  static int CloseLibrary(vtkLibHandle);
55 
59  static vtkSymbolPointer 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:
77  vtkDynamicLoader() = default;
78  ~vtkDynamicLoader() override = default;
79 
80 private:
81  vtkDynamicLoader(const vtkDynamicLoader&) = delete;
82  void operator=(const vtkDynamicLoader&) = delete;
83 };
84 
85 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:62
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
#define VTK_FILEPATH
vtksys::DynamicLoader::SymbolPointer vtkSymbolPointer
vtksys::DynamicLoader::LibraryHandle vtkLibHandle
class interface to system dynamic libraries
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...