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