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 =========================================================================*/
27 #ifndef vtkVersion_h
28 #define vtkVersion_h
29 
30 
31 #include "vtkCommonCoreModule.h" // For export macro
32 #include "vtkObject.h"
33 #include "vtkVersionMacros.h" // For version macros
34 
35 #define VTK_SOURCE_VERSION "vtk version " VTK_VERSION
36 
37 class VTKCOMMONCORE_EXPORT vtkVersion : public vtkObject
38 {
39 public:
40  static vtkVersion *New();
41  vtkTypeMacro(vtkVersion,vtkObject);
42 
48  static const char *GetVTKVersion() { return VTK_VERSION; }
49  static int GetVTKMajorVersion() { return VTK_MAJOR_VERSION; }
50  static int GetVTKMinorVersion() { return VTK_MINOR_VERSION; }
51  static int GetVTKBuildVersion() { return VTK_BUILD_VERSION; }
52  static const char *GetVTKSourceVersion() { return VTK_SOURCE_VERSION; }
53 
54 protected:
55  vtkVersion() {} //insure constructor/destructor protected
56  ~vtkVersion() override {}
57 private:
58  vtkVersion(const vtkVersion&) = delete;
59  void operator=(const vtkVersion&) = delete;
60 };
61 
62 extern "C" {
63 VTKCOMMONCORE_EXPORT const char* GetVTKVersion();
64 }
65 
66 #endif
67 
68 // VTK-HeaderTest-Exclude: vtkVersion.h
VTK_SOURCE_VERSION
#define VTK_SOURCE_VERSION
Definition: vtkVersion.h:35
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:53
GetVTKVersion
const VTKCOMMONCORE_EXPORT char * GetVTKVersion()
vtkVersion::GetVTKBuildVersion
static int GetVTKBuildVersion()
Definition: vtkVersion.h:51
vtkVersion::GetVTKVersion
static const char * GetVTKVersion()
Return the version of vtk this object is a part of.
Definition: vtkVersion.h:48
vtkObject.h
vtkVersion
Versioning class for vtk.
Definition: vtkVersion.h:37
vtkVersion::~vtkVersion
~vtkVersion() override
Definition: vtkVersion.h:56
vtkVersion::GetVTKSourceVersion
static const char * GetVTKSourceVersion()
Definition: vtkVersion.h:52
vtkVersion::vtkVersion
vtkVersion()
Definition: vtkVersion.h:55
vtkVersion::GetVTKMinorVersion
static int GetVTKMinorVersion()
Definition: vtkVersion.h:50
vtkVersion::GetVTKMajorVersion
static int GetVTKMajorVersion()
Definition: vtkVersion.h:49