VTK  9.3.20240416
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
130 #ifndef vtkVersion_h
131 #define vtkVersion_h
132 
133 #include "vtkCommonCoreModule.h" // For export macro
134 #include "vtkObject.h"
135 #include "vtkVersionMacros.h" // For version macros
136 
137 #define GetVTKVersion VTK_ABI_NAMESPACE_MANGLE(GetVTKVersion)
138 
139 VTK_ABI_NAMESPACE_BEGIN
140 class VTKCOMMONCORE_EXPORT vtkVersion : public vtkObject
141 {
142 public:
143  static vtkVersion* New();
144  vtkTypeMacro(vtkVersion, vtkObject);
145  void PrintSelf(ostream& os, vtkIndent indent) override;
146 
152  static const char* GetVTKVersion() { return VTK_VERSION; }
153  static const char* GetVTKVersionFull();
154  static int GetVTKMajorVersion() { return VTK_MAJOR_VERSION; }
155  static int GetVTKMinorVersion() { return VTK_MINOR_VERSION; }
156  static int GetVTKBuildVersion() { return VTK_BUILD_VERSION; }
157  static const char* GetVTKSourceVersion() { return VTK_SOURCE_VERSION; }
158 
159 protected:
160  vtkVersion() = default; // ensure constructor/destructor protected
161  ~vtkVersion() override = default;
162 
163 private:
164  vtkVersion(const vtkVersion&) = delete;
165  void operator=(const vtkVersion&) = delete;
166 };
167 
168 VTK_ABI_NAMESPACE_END
169 
170 extern "C"
171 {
172  VTKCOMMONCORE_EXPORT const char* GetVTKVersion();
173 }
174 
175 #endif
a simple class to control print indentation
Definition: vtkIndent.h:108
abstract base class for most VTK objects
Definition: vtkObject.h:162
Versioning class for vtk.
Definition: vtkVersion.h:141
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static int GetVTKMinorVersion()
Definition: vtkVersion.h:155
~vtkVersion() override=default
static const char * GetVTKVersionFull()
static const char * GetVTKVersion()
Return the version of vtk this object is a part of.
Definition: vtkVersion.h:152
static const char * GetVTKSourceVersion()
Definition: vtkVersion.h:157
static int GetVTKMajorVersion()
Definition: vtkVersion.h:154
static int GetVTKBuildVersion()
Definition: vtkVersion.h:156
static vtkVersion * New()
vtkVersion()=default
#define GetVTKVersion
Definition: vtkVersion.h:137