VTK  9.3.0
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
28VTK_ABI_NAMESPACE_BEGIN
29class VTKCOMMONCORE_EXPORT vtkVersion : public vtkObject
30{
31public:
32 static vtkVersion* New();
33 vtkTypeMacro(vtkVersion, vtkObject);
34 void PrintSelf(ostream& os, vtkIndent indent) override;
35
41 static const char* GetVTKVersion() { return VTK_VERSION; }
42 static const char* GetVTKVersionFull();
43 static int GetVTKMajorVersion() { return VTK_MAJOR_VERSION; }
44 static int GetVTKMinorVersion() { return VTK_MINOR_VERSION; }
45 static int GetVTKBuildVersion() { return VTK_BUILD_VERSION; }
46 static const char* GetVTKSourceVersion() { return VTK_SOURCE_VERSION; }
47
48protected:
49 vtkVersion() = default; // ensure constructor/destructor protected
50 ~vtkVersion() override = default;
51
52private:
53 vtkVersion(const vtkVersion&) = delete;
54 void operator=(const vtkVersion&) = delete;
55};
56
57extern "C"
58{
59 VTKCOMMONCORE_EXPORT const char* GetVTKVersion();
60}
61
62VTK_ABI_NAMESPACE_END
63#endif
a simple class to control print indentation
Definition vtkIndent.h:29
abstract base class for most VTK objects
Definition vtkObject.h:49
Versioning class for vtk.
Definition vtkVersion.h:30
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:44
~vtkVersion() override=default
static vtkVersion * New()
static const char * GetVTKSourceVersion()
Definition vtkVersion.h:46
static int GetVTKMajorVersion()
Definition vtkVersion.h:43
static const char * GetVTKVersion()
Return the version of vtk this object is a part of.
Definition vtkVersion.h:41
static int GetVTKBuildVersion()
Definition vtkVersion.h:45
static const char * GetVTKVersionFull()
vtkVersion()=default
VTKCOMMONCORE_EXPORT const char * GetVTKVersion()