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