vtkVersion.h 1.95 KB
Newer Older
Jim Miller's avatar
Jim Miller committed
1
2
3
4
5
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkVersion.h

6
  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
8
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
Jim Miller's avatar
Jim Miller committed
9

10
11
     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
     PURPOSE.  See the above copyright notice for more information.
Jim Miller's avatar
Jim Miller committed
13
14
15
16
17
18
19
20

=========================================================================*/
// .NAME vtkVersion - Versioning class for vtk
// .SECTION Description
// Holds methods for defining/determining the current vtk version
// (major, minor, build).

// .SECTION Caveats
Jim Miller's avatar
Jim Miller committed
21
22
// This file will change frequently to update the VTKSourceVersion which
// timestamps a particular source release.
Jim Miller's avatar
Jim Miller committed
23
24
25
26
27
28
29
30


#ifndef __vtkVersion_h
#define __vtkVersion_h


#include "vtkObject.h"

Andy Cedilnik's avatar
Andy Cedilnik committed
31
#define VTK_SOURCE_VERSION "vtk version " VTK_VERSION ", vtk source $Revision: 1.2301 $, $Date: 2005-12-25 06:07:35 $ (GMT)"
Jim Miller's avatar
Jim Miller committed
32
33


34
35
class VTK_COMMON_EXPORT vtkVersion : public vtkObject
{
36
public:
37
  static vtkVersion *New();
Brad King's avatar
Brad King committed
38
  vtkTypeRevisionMacro(vtkVersion,vtkObject);
Jim Miller's avatar
Jim Miller committed
39
40
41

  // Description: 
  // Return the version of vtk this object is a part of.
Jim Miller's avatar
Jim Miller committed
42
  // A variety of methods are included. GetVTKSourceVersion returns a string
43
  // with an identifier which timestamps a particular source tree. 
Will Schroeder's avatar
Will Schroeder committed
44
45
46
47
48
  static const char *GetVTKVersion() { return VTK_VERSION; }
  static int GetVTKMajorVersion() { return VTK_MAJOR_VERSION; }
  static int GetVTKMinorVersion() { return VTK_MINOR_VERSION; }
  static int GetVTKBuildVersion() { return VTK_BUILD_VERSION; }
  static const char *GetVTKSourceVersion() { return VTK_SOURCE_VERSION; }
Jim Miller's avatar
Jim Miller committed
49
  
50
51
52
protected:
  vtkVersion() {}; //insure constructor/destructor protected
  ~vtkVersion() {};
53
54
55
private:
  vtkVersion(const vtkVersion&);  // Not implemented.
  void operator=(const vtkVersion&);  // Not implemented.
Jim Miller's avatar
Jim Miller committed
56
57
58
};

#endif