version.h

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // $Id: version.h,v 1.32.20.2 2007/08/03 03:27:07 oliver Exp $
00005 //
00006 
00007 #ifndef BALL_COMMON_VERSION_H
00008 #define BALL_COMMON_VERSION_H
00009 
00010 #ifndef BALL_COMMON_EXCEPTION_H
00011 # include <BALL/COMMON/exception.h>
00012 #endif
00013 
00014 #ifndef BALL_COMMON_GLOBAL_H
00015 # include <BALL/COMMON/global.h>
00016 #endif
00017 
00018 //
00019 //  master data for all revisions is stored in this define!
00020 //
00021 #define BALL_RELEASE_STRING             "1.3"
00022 
00023 namespace BALL
00024 {
00025 
00036   class BALL_EXPORT VersionInfo
00037   {
00038     public:
00039 
00042     enum Type
00043     {
00044       STABLE,
00045       ALPHA,
00046       BETA,
00047       NONPUBLIC,
00048       PRERELEASE,
00049       PATCHLVL, // this can't be PATCHLEVEL due to a collision with historic Python versions (< 2.2).
00050       UNKNOWN
00051     };
00052 
00055     static const char* getVersion() ;
00056 
00060     static int getMajorRevision() throw(Exception::InvalidFormat);
00061 
00065     static int getMinorRevision() throw(Exception::InvalidFormat);
00066 
00070     static Type getType() ;
00071     
00072 
00073     protected:
00074 
00075     static const char* RELEASE_DATE_AND_TIME;
00076       static const char* RELEASE_WHAT_STRING;
00077   };
00078   
00079 }
00080 
00081 #endif // BALL_COMMON_VERSION_H