Version.h

Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Written (W) 1999-2008 Soeren Sonnenburg
00008  * Copyright (C) 1999-2008 Fraunhofer Institute FIRST and Max-Planck-Society
00009  */
00010 
00011 #include "lib/common.h"
00012 #include "lib/versionstring.h"
00013 #include "lib/io.h"
00014 #include "lib/config.h"
00015 
00016 #ifndef VERSION_H__
00017 #define VERSION_H__
00018 class CVersion
00019 {
00020 public:
00021     CVersion();
00022     ~CVersion();
00023 
00024     static inline void print_version()
00025     {
00026         SG_SPRINT("shogun (%s/%s/%s%d)\n\n", TARGET, MACHINE, VERSION_RELEASE, version_revision);
00027         SG_SPRINT("Copyright (C) 1999-2008 Fraunhofer Institute FIRST and Max-Planck-Society\n");
00028         SG_SPRINT("Written   (W) 2000-2008 Soeren Sonnenburg, Gunnar Raetsch et al.\n\n");
00029 #ifdef GPL
00030         SG_SPRINT("This is free software; see the source for copying conditions.  There is NO\n");
00031         SG_SPRINT("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n");
00032 #endif
00033         SG_SPRINT( "( configure options: \"%s\" compile flags: \"%s\" link flags: \"%s\" )\n", CONFIGURE_OPTIONS, COMPFLAGS_CPP, LINKFLAGS);
00034     }
00035 
00036     static inline const CHAR* get_version_extra()
00037     {
00038         return version_extra;
00039     }
00040 
00041     static inline const CHAR* get_version_release()
00042     {
00043         return version_release;
00044     }
00045 
00046     static inline INT get_version_revision()
00047     {
00048         return version_revision;
00049     }
00050 
00051     static inline INT get_version_year()
00052     {
00053         return version_year;
00054     }
00055 
00056     static inline INT get_version_month()
00057     {
00058         return version_month;
00059     }
00060 
00061     static inline INT get_version_day()
00062     {
00063         return version_day;
00064     }
00065 
00066     static inline INT get_version_hour()
00067     {
00068         return version_hour;
00069     }
00070 
00071     static inline INT get_version_minute()
00072     {
00073         return version_year;
00074     }
00075 
00076     static inline LONG get_version_in_minutes()
00077     {
00078         return ((((version_year)*12 + version_month)*30 + version_day)* 24 + version_hour)*60 + version_minute;
00079     }
00080 
00081     static const CHAR version_release[128];
00082     static const CHAR version_extra[128];
00083 
00084     static const INT version_revision;
00085     static const INT version_year;
00086     static const INT version_month;
00087     static const INT version_day;
00088     static const INT version_hour;
00089     static const INT version_minute;
00090 };
00091 #endif

SHOGUN Machine Learning Toolbox - Documentation