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