VTK  9.3.1
vtkVersion.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
21 #ifndef vtkVersion_h
22 #define vtkVersion_h
23 
24 #include "vtkCommonCoreModule.h" // For export macro
25 #include "vtkObject.h"
26 #include "vtkVersionMacros.h" // For version macros
27 
28 VTK_ABI_NAMESPACE_BEGIN
29 class VTKCOMMONCORE_EXPORT vtkVersion : public vtkObject
30 {
31 public:
32  static vtkVersion* New();
33  vtkTypeMacro(vtkVersion, vtkObject);
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
41  static const char* GetVTKVersion() { return VTK_VERSION; }
42  static const char* GetVTKVersionFull();
43  static int GetVTKMajorVersion() { return VTK_MAJOR_VERSION; }
44  static int GetVTKMinorVersion() { return VTK_MINOR_VERSION; }
45  static int GetVTKBuildVersion() { return VTK_BUILD_VERSION; }
46  static const char* GetVTKSourceVersion() { return VTK_SOURCE_VERSION; }
47 
48 protected:
49  vtkVersion() = default; // ensure constructor/destructor protected
50  ~vtkVersion() override = default;
51 
52 private:
53  vtkVersion(const vtkVersion&) = delete;
54  void operator=(const vtkVersion&) = delete;
55 };
56 
57 extern "C"
58 {
59  VTKCOMMONCORE_EXPORT const char* GetVTKVersion();
60 }
61 
62 VTK_ABI_NAMESPACE_END
63 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:51
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static const char * GetVTKSourceVersion()
Definition: vtkVersion.h:46
static int GetVTKMajorVersion()
Definition: vtkVersion.h:43
static int GetVTKMinorVersion()
Definition: vtkVersion.h:44
Versioning class for vtk.
Definition: vtkVersion.h:29
a simple class to control print indentation
Definition: vtkIndent.h:28
VTKCOMMONCORE_EXPORT const char * GetVTKVersion()
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:41
static int GetVTKBuildVersion()
Definition: vtkVersion.h:45