ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkVersion.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 /*=========================================================================
00019  *
00020  *  Portions of this file are subject to the VTK Toolkit Version 3 copyright.
00021  *
00022  *  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00023  *
00024  *  For complete copyright, license and disclaimer of warranty information
00025  *  please refer to the NOTICE file at the top of the ITK source tree.
00026  *
00027  *=========================================================================*/
00028 #ifndef __itkVersion_h
00029 #define __itkVersion_h
00030 
00031 #include "itkObject.h"
00032 #include "itkObjectFactory.h"
00033 
00034 #define ITK_VERSION_TO_STRING(x) ITK_VERSION_TO_STRING0(x)
00035 #define ITK_VERSION_TO_STRING0(x) #x
00036 #define ITK_VERSION                            \
00037   ITK_VERSION_TO_STRING(ITK_VERSION_MAJOR) "." \
00038   ITK_VERSION_TO_STRING(ITK_VERSION_MINOR) "." \
00039   ITK_VERSION_TO_STRING(ITK_VERSION_PATCH)
00040 #define ITK_SOURCE_VERSION "itk version " ITK_VERSION
00041 
00042 namespace itk
00043 {
00057 class ITKCommon_EXPORT Version:public Object
00058 {
00059 public:
00061   typedef Version                    Self;
00062   typedef Object                     Superclass;
00063   typedef SmartPointer< Self >       Pointer;
00064   typedef SmartPointer< const Self > ConstPointer;
00065 
00067   itkNewMacro(Self);
00068 
00070   itkTypeMacro(Version, Object);
00071 
00075   static const char * GetITKVersion();
00076 
00077   static int GetITKMajorVersion();
00078 
00079   static int GetITKMinorVersion();
00080 
00081   static int GetITKBuildVersion();
00082 
00083   static const char * GetITKSourceVersion();
00084 
00085 protected:
00086   Version();
00087   ~Version();
00088 private:
00089   Version(const Self &);        //purposely not implemented
00090   void operator=(const Self &); //purposely not implemented
00091 };
00092 } // end namespace itk
00093 
00094 #endif
00095