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 
40 class VTKCOMMONCORE_EXPORT vtkVersion : public vtkObject
41 {
42 public:
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 
57 protected:
58  vtkVersion() {} //insure constructor/destructor protected
59  ~vtkVersion() VTK_OVERRIDE {}
60 private:
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:59
static const char * GetVTKSourceVersion()
Definition: vtkVersion.h:55
~vtkVersion() override
Definition: vtkVersion.h:59
static int GetVTKMajorVersion()
Definition: vtkVersion.h:52
#define VTK_SOURCE_VERSION
Definition: vtkVersion.h:38
static int GetVTKMinorVersion()
Definition: vtkVersion.h:53
Versioning class for vtk.
Definition: vtkVersion.h:40
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:51
static int GetVTKBuildVersion()
Definition: vtkVersion.h:54