00001
00002
00003
00004
00005
00006
00007
00008 #ifndef SAGA_VERSION_HPP
00009 #define SAGA_VERSION_HPP
00010
00011 #include <boost/preprocessor/cat.hpp>
00012 #include <saga/saga/util.hpp>
00013
00014
00015 #ifndef SAGA_SKIP_CONFIG_HPP
00016 # include <saga/saga-config.hpp>
00017 #endif
00018
00019
00020 #define SAGA_VERSION_MAJORMASK 0xFF0000 // SAGA_VERSION_FULL & 0xFF0000 is the major version
00021 #define SAGA_VERSION_MINORMASK 0x00FF00 // SAGA_VERSION_FULL & 0x00FF00 is the minor version
00022 #define SAGA_VERSION_SUBMINORMASK 0x0000FF // SAGA_VERSION_FULL & 0x0000FF is the sub-minor version
00023
00024
00025
00026 #define SAGA_CHECK_VERSION \
00027 BOOST_PP_CAT(saga_check_version_, \
00028 BOOST_PP_CAT(SAGA_VERSION_MAJOR, \
00029 BOOST_PP_CAT(_, SAGA_VERSION_MINOR))) \
00030
00031
00033
00034 #define SAGA_VERSION_API 0x010000
00035
00037
00038
00039
00040
00041
00042
00043
00044 #define SAGA_VERSION_ISCOMPATIBLE_EX(version) \
00045 (((version) & ~SAGA_VERSION_SUBMINORMASK) >= \
00046 (SAGA_VERSION_FULL & ~SAGA_VERSION_SUBMINORMASK)) \
00047
00048
00049 #define SAGA_VERSION_ISCOMPATIBLE() \
00050 SAGA_VERSION_ISCOMPATIBLE_EX(saga::get_engine_version()) \
00051
00052
00055 namespace saga
00056 {
00061 SAGA_EXPORT unsigned long get_engine_version (void);
00062
00067 SAGA_EXPORT unsigned long get_saga_version (void);
00068
00073 SAGA_EXPORT extern char const SAGA_CHECK_VERSION[];
00074
00075 }
00077
00078
00079
00080 namespace
00081 {
00082 char const* check_saga_version()
00083 {
00084 return saga::SAGA_CHECK_VERSION;
00085 }
00086 }
00087
00088 #endif // !SAGA_VERSION_HPP
00089