VTK  9.0.3
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 =========================================================================*/
27 #ifndef vtkVersion_h
28 #define vtkVersion_h
29 
30 #include "vtkCommonCoreModule.h" // For export macro
31 #include "vtkObject.h"
32 #include "vtkVersionMacros.h" // For version macros
33 
34 class VTKCOMMONCORE_EXPORT vtkVersion : public vtkObject
35 {
36 public:
37  static vtkVersion* New();
38  vtkTypeMacro(vtkVersion, vtkObject);
39 
45  static const char* GetVTKVersion() { return VTK_VERSION; }
46  static int GetVTKMajorVersion() { return VTK_MAJOR_VERSION; }
47  static int GetVTKMinorVersion() { return VTK_MINOR_VERSION; }
48  static int GetVTKBuildVersion() { return VTK_BUILD_VERSION; }
49  static const char* GetVTKSourceVersion() { return VTK_SOURCE_VERSION; }
50 
51 protected:
52  vtkVersion() {} // insure constructor/destructor protected
53  ~vtkVersion() override {}
54 
55 private:
56  vtkVersion(const vtkVersion&) = delete;
57  void operator=(const vtkVersion&) = delete;
58 };
59 
60 extern "C"
61 {
62  VTKCOMMONCORE_EXPORT const char* GetVTKVersion();
63 }
64 
65 #endif
66 
67 // VTK-HeaderTest-Exclude: vtkVersion.h
abstract base class for most VTK objects
Definition: vtkObject.h:63
Versioning class for vtk.
Definition: vtkVersion.h:35
static int GetVTKMinorVersion()
Definition: vtkVersion.h:47
static const char * GetVTKVersion()
Return the version of vtk this object is a part of.
Definition: vtkVersion.h:45
~vtkVersion() override
Definition: vtkVersion.h:53
static const char * GetVTKSourceVersion()
Definition: vtkVersion.h:49
static int GetVTKMajorVersion()
Definition: vtkVersion.h:46
static int GetVTKBuildVersion()
Definition: vtkVersion.h:48
static vtkVersion * New()
VTKCOMMONCORE_EXPORT const char * GetVTKVersion()