VTK  9.2.6
vtkVersion.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkVersion.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
42#ifndef vtkVersion_h
43#define vtkVersion_h
44
45#include "vtkCommonCoreModule.h" // For export macro
46#include "vtkObject.h"
47#include "vtkVersionMacros.h" // For version macros
48
49class VTKCOMMONCORE_EXPORT vtkVersion : public vtkObject
50{
51public:
52 static vtkVersion* New();
53 vtkTypeMacro(vtkVersion, vtkObject);
54 void PrintSelf(ostream& os, vtkIndent indent) override;
55
61 static const char* GetVTKVersion() { return VTK_VERSION; }
62 static const char* GetVTKVersionFull();
63 static int GetVTKMajorVersion() { return VTK_MAJOR_VERSION; }
64 static int GetVTKMinorVersion() { return VTK_MINOR_VERSION; }
65 static int GetVTKBuildVersion() { return VTK_BUILD_VERSION; }
66 static const char* GetVTKSourceVersion() { return VTK_SOURCE_VERSION; }
67
68protected:
69 vtkVersion() = default; // ensure constructor/destructor protected
70 ~vtkVersion() override = default;
71
72private:
73 vtkVersion(const vtkVersion&) = delete;
74 void operator=(const vtkVersion&) = delete;
75};
76
77extern "C"
78{
79 VTKCOMMONCORE_EXPORT const char* GetVTKVersion();
80}
81
82#endif
a simple class to control print indentation
Definition vtkIndent.h:49
abstract base class for most VTK objects
Definition vtkObject.h:72
Versioning class for vtk.
Definition vtkVersion.h:50
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:64
~vtkVersion() override=default
static vtkVersion * New()
static const char * GetVTKSourceVersion()
Definition vtkVersion.h:66
static int GetVTKMajorVersion()
Definition vtkVersion.h:63
static const char * GetVTKVersion()
Return the version of vtk this object is a part of.
Definition vtkVersion.h:61
static int GetVTKBuildVersion()
Definition vtkVersion.h:65
static const char * GetVTKVersionFull()
vtkVersion()=default
VTKCOMMONCORE_EXPORT const char * GetVTKVersion()