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=========================================================================*/
136#ifndef vtkVersion_h
137#define vtkVersion_h
138
139#include "vtkCommonCoreModule.h" // For export macro
140#include "vtkObject.h"
141#include "vtkVersionMacros.h" // For version macros
142
143class VTKCOMMONCORE_EXPORT vtkVersion : public vtkObject
144{
145public:
146 static vtkVersion* New();
147 vtkTypeMacro(vtkVersion, vtkObject);
148 void PrintSelf(ostream& os, vtkIndent indent) override;
149
155 static const char* GetVTKVersion() { return VTK_VERSION; }
156 static const char* GetVTKVersionFull();
157 static int GetVTKMajorVersion() { return VTK_MAJOR_VERSION; }
158 static int GetVTKMinorVersion() { return VTK_MINOR_VERSION; }
159 static int GetVTKBuildVersion() { return VTK_BUILD_VERSION; }
160 static const char* GetVTKSourceVersion() { return VTK_SOURCE_VERSION; }
161
162protected:
163 vtkVersion() = default; // ensure constructor/destructor protected
164 ~vtkVersion() override = default;
165
166private:
167 vtkVersion(const vtkVersion&) = delete;
168 void operator=(const vtkVersion&) = delete;
169};
170
171extern "C"
172{
173 VTKCOMMONCORE_EXPORT const char* GetVTKVersion();
174}
175
176#endif
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:73
Versioning class for vtk.
Definition: vtkVersion.h:144
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:158
~vtkVersion() override=default
static vtkVersion * New()
static const char * GetVTKSourceVersion()
Definition: vtkVersion.h:160
static int GetVTKMajorVersion()
Definition: vtkVersion.h:157
static const char * GetVTKVersion()
Return the version of vtk this object is a part of.
Definition: vtkVersion.h:155
static int GetVTKBuildVersion()
Definition: vtkVersion.h:159
static const char * GetVTKVersionFull()
vtkVersion()=default
VTKCOMMONCORE_EXPORT const char * GetVTKVersion()