VTK  9.5.2
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
20
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
30VTK_ABI_NAMESPACE_BEGIN
31class VTKCOMMONCORE_EXPORT vtkVersion : public vtkObject
32{
33public:
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
50protected:
51 vtkVersion() = default; // ensure constructor/destructor protected
52 ~vtkVersion() override = default;
53
54private:
55 vtkVersion(const vtkVersion&) = delete;
56 void operator=(const vtkVersion&) = delete;
57};
58
59VTK_ABI_NAMESPACE_END
60
61extern "C"
62{
63 VTKCOMMONCORE_EXPORT const char* GetVTKVersion();
64}
65
66#endif
a simple class to control print indentation
Definition vtkIndent.h:29
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:46
~vtkVersion() override=default
static vtkVersion * New()
static const char * GetVTKSourceVersion()
Definition vtkVersion.h:48
static int GetVTKMajorVersion()
Definition vtkVersion.h:45
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
static const char * GetVTKVersionFull()
vtkVersion()=default
#define GetVTKVersion
Definition vtkVersion.h:28