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