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

  Program:   Visualization Toolkit
  Module:    vtkVersion.h
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

9
10
11
  Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
Jim Miller's avatar
Jim Miller committed
12

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

=========================================================================*/
// .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
24
25
// This file will change frequently to update the VTKSourceVersion which
// timestamps a particular source release.
Jim Miller's avatar
Jim Miller committed
26
27
28
29
30
31
32
33


#ifndef __vtkVersion_h
#define __vtkVersion_h


#include "vtkObject.h"

Ken Martin's avatar
Ken Martin committed
34
#define VTK_SOURCE_VERSION "vtk version " VTK_VERSION ", vtk source $Revision: 1.1748 $, $Date: 2003-11-13 02:45:25 $ (GMT)"
Jim Miller's avatar
Jim Miller committed
35
36


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

  // Description: 
  // Return the version of vtk this object is a part of.
Jim Miller's avatar
Jim Miller committed
45
  // A variety of methods are included. GetVTKSourceVersion returns a string
46
  // with an identifier which timestamps a particular source tree. 
Will Schroeder's avatar
Will Schroeder committed
47
48
49
50
51
  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
52
  
53
54
55
protected:
  vtkVersion() {}; //insure constructor/destructor protected
  ~vtkVersion() {};
56
57
58
private:
  vtkVersion(const vtkVersion&);  // Not implemented.
  void operator=(const vtkVersion&);  // Not implemented.
Jim Miller's avatar
Jim Miller committed
59
60
61
};

#endif