VTK  9.4.20250309
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
139VTK_ABI_NAMESPACE_BEGIN
140class VTKCOMMONCORE_EXPORT vtkVersion : public vtkObject
141{
142public:
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
159protected:
160 vtkVersion() = default; // ensure constructor/destructor protected
161 ~vtkVersion() override = default;
162
163private:
164 vtkVersion(const vtkVersion&) = delete;
165 void operator=(const vtkVersion&) = delete;
166};
167
168VTK_ABI_NAMESPACE_END
169
170extern "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 vtkVersion * New()
static const char * GetVTKSourceVersion()
Definition vtkVersion.h:157
static int GetVTKMajorVersion()
Definition vtkVersion.h:154
static const char * GetVTKVersion()
Return the version of vtk this object is a part of.
Definition vtkVersion.h:152
static int GetVTKBuildVersion()
Definition vtkVersion.h:156
static const char * GetVTKVersionFull()
vtkVersion()=default
#define GetVTKVersion
Definition vtkVersion.h:137