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
30#ifndef vtkVersion_h
31#define vtkVersion_h
32
33#include "vtkCommonCoreModule.h" // For export macro
34#include "vtkObject.h"
35#include "vtkVersionMacros.h" // For version macros
36
37VTK_ABI_NAMESPACE_BEGIN
38class VTKCOMMONCORE_EXPORT vtkVersion : public vtkObject
39{
40public:
41 static vtkVersion* New();
42 vtkTypeMacro(vtkVersion, vtkObject);
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
50 static const char* GetVTKVersion() { return VTK_VERSION; }
51 static const char* GetVTKVersionFull();
52 static int GetVTKMajorVersion() { return VTK_MAJOR_VERSION; }
53 static int GetVTKMinorVersion() { return VTK_MINOR_VERSION; }
54 static int GetVTKBuildVersion() { return VTK_BUILD_VERSION; }
55 static const char* GetVTKSourceVersion() { return VTK_SOURCE_VERSION; }
56
57protected:
58 vtkVersion() = default; // ensure constructor/destructor protected
59 ~vtkVersion() override = default;
60
61private:
62 vtkVersion(const vtkVersion&) = delete;
63 void operator=(const vtkVersion&) = delete;
64};
65
66extern "C"
67{
68 VTKCOMMONCORE_EXPORT const char* GetVTKVersion();
69}
70
71VTK_ABI_NAMESPACE_END
72#endif
a simple class to control print indentation
Definition vtkIndent.h:38
abstract base class for most VTK objects
Definition vtkObject.h:58
Versioning class for vtk.
Definition vtkVersion.h:39
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:53
~vtkVersion() override=default
static vtkVersion * New()
static const char * GetVTKSourceVersion()
Definition vtkVersion.h:55
static int GetVTKMajorVersion()
Definition vtkVersion.h:52
static const char * GetVTKVersion()
Return the version of vtk this object is a part of.
Definition vtkVersion.h:50
static int GetVTKBuildVersion()
Definition vtkVersion.h:54
static const char * GetVTKVersionFull()
vtkVersion()=default
VTKCOMMONCORE_EXPORT const char * GetVTKVersion()