VTK
dox/Common/vtkVersion.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkVersion.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00030 #ifndef __vtkVersion_h
00031 #define __vtkVersion_h
00032 
00033 
00034 #include "vtkObject.h"
00035 
00036 #if VTK_MINOR_VERSION & 1
00037 # include <vtksys/DateStamp.h> // For date stamp
00038 # define VTK_SOURCE_VERSION "vtk version " VTK_VERSION ", Date: " vtksys_DATE_STAMP_STRING
00039 #else
00040 # define VTK_SOURCE_VERSION "vtk version " VTK_VERSION
00041 #endif
00042 
00043 
00044 class VTK_COMMON_EXPORT vtkVersion : public vtkObject
00045 {
00046 public:
00047   static vtkVersion *New();
00048   vtkTypeMacro(vtkVersion,vtkObject);
00049 
00051 
00054   static const char *GetVTKVersion() { return VTK_VERSION; }
00055   static int GetVTKMajorVersion() { return VTK_MAJOR_VERSION; }
00056   static int GetVTKMinorVersion() { return VTK_MINOR_VERSION; }
00057   static int GetVTKBuildVersion() { return VTK_BUILD_VERSION; }
00058   static const char *GetVTKSourceVersion() { return VTK_SOURCE_VERSION; }
00060   
00061 protected:
00062   vtkVersion() {}; //insure constructor/destructor protected
00063   ~vtkVersion() {};
00064 private:
00065   vtkVersion(const vtkVersion&);  // Not implemented.
00066   void operator=(const vtkVersion&);  // Not implemented.
00067 };
00068 
00069 #endif 
00070