VTK  9.7.1
vtkVersion.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
21 #ifndef vtkVersion_h
22 #define vtkVersion_h
23 
24 #include "vtkCommonCoreModule.h" // For export macro
25 #include "vtkObject.h"
26 #include "vtkVersionMacros.h" // For version macros
27 
28 #define GetVTKVersion VTK_ABI_NAMESPACE_MANGLE(GetVTKVersion)
29 
30 VTK_ABI_NAMESPACE_BEGIN
31 class VTKCOMMONCORE_EXPORT vtkVersion : public vtkObject
32 {
33 public:
34  static vtkVersion* New();
35  vtkTypeMacro(vtkVersion, vtkObject);
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
43  static const char* GetVTKVersion() { return VTK_VERSION; }
44  static const char* GetVTKVersionFull();
45  static int GetVTKMajorVersion() { return VTK_MAJOR_VERSION; }
46  static int GetVTKMinorVersion() { return VTK_MINOR_VERSION; }
47  static int GetVTKBuildVersion() { return VTK_BUILD_VERSION; }
48  static const char* GetVTKSourceVersion() { return VTK_SOURCE_VERSION; }
49 
50 protected:
51  vtkVersion() = default; // ensure constructor/destructor protected
52  ~vtkVersion() override = default;
53 
54 private:
55  vtkVersion(const vtkVersion&) = delete;
56  void operator=(const vtkVersion&) = delete;
57 };
58 
59 VTK_ABI_NAMESPACE_END
60 
61 extern "C"
62 {
63  VTKCOMMONCORE_EXPORT const char* GetVTKVersion();
64 }
65 
66 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:52
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define GetVTKVersion
Definition: vtkVersion.h:28
static const char * GetVTKSourceVersion()
Definition: vtkVersion.h:48
static int GetVTKMajorVersion()
Definition: vtkVersion.h:45
static int GetVTKMinorVersion()
Definition: vtkVersion.h:46
Versioning class for vtk.
Definition: vtkVersion.h:31
a simple class to control print indentation
Definition: vtkIndent.h:28
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
static const char * GetVTKVersion()
Return the version of vtk this object is a part of.
Definition: vtkVersion.h:43
static int GetVTKBuildVersion()
Definition: vtkVersion.h:47