VTK
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=========================================================================*/
30#ifndef vtkVersion_h
31#define vtkVersion_h
32
33
34#include "vtkCommonCoreModule.h" // For export macro
35#include "vtkObject.h"
36#include "vtkVersionMacros.h" // For version macros
37
38#define VTK_SOURCE_VERSION "vtk version " VTK_VERSION
39
40class VTKCOMMONCORE_EXPORT vtkVersion : public vtkObject
41{
42public:
43 static vtkVersion *New();
44 vtkTypeMacro(vtkVersion,vtkObject);
45
51 static const char *GetVTKVersion() { return VTK_VERSION; }
52 static int GetVTKMajorVersion() { return VTK_MAJOR_VERSION; }
53 static int GetVTKMinorVersion() { return VTK_MINOR_VERSION; }
54 static int GetVTKBuildVersion() { return VTK_BUILD_VERSION; }
55 static const char *GetVTKSourceVersion() { return VTK_SOURCE_VERSION; }
56
57protected:
58 vtkVersion() {} //insure constructor/destructor protected
59 ~vtkVersion() VTK_OVERRIDE {}
60private:
61 vtkVersion(const vtkVersion&) VTK_DELETE_FUNCTION;
62 void operator=(const vtkVersion&) VTK_DELETE_FUNCTION;
63};
64
65#endif
66
67// VTK-HeaderTest-Exclude: vtkVersion.h
abstract base class for most VTK objects
Definition: vtkObject.h:60
Versioning class for vtk.
Definition: vtkVersion.h:41
static int GetVTKMinorVersion()
Definition: vtkVersion.h:53
~vtkVersion() override
Definition: vtkVersion.h:59
static vtkVersion * New()
static const char * GetVTKSourceVersion()
Definition: vtkVersion.h:55
static int GetVTKMajorVersion()
Definition: vtkVersion.h:52
static const char * GetVTKVersion()
Return the version of vtk this object is a part of.
Definition: vtkVersion.h:51
static int GetVTKBuildVersion()
Definition: vtkVersion.h:54
#define VTK_SOURCE_VERSION
Definition: vtkVersion.h:38