Go to the documentation of this file.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 <boost/config.hpp>
00013 #include <saga/saga/util.hpp>
00014
00015
00016 #ifndef SAGA_SKIP_CONFIG_HPP
00017 # include <saga/saga-config.hpp>
00018 #endif
00019
00020
00021 #define SAGA_VERSION_MAJORMASK 0xFF0000 // SAGA_VERSION_FULL & 0xFF0000 is the major version
00022 #define SAGA_VERSION_MINORMASK 0x00FF00 // SAGA_VERSION_FULL & 0x00FF00 is the minor version
00023 #define SAGA_VERSION_SUBMINORMASK 0x0000FF // SAGA_VERSION_FULL & 0x0000FF is the sub-minor version
00024
00025
00026
00027 #define SAGA_CHECK_VERSION \
00028 BOOST_PP_CAT(saga_check_version_, \
00029 BOOST_PP_CAT(SAGA_VERSION_MAJOR, \
00030 BOOST_PP_CAT(_, SAGA_VERSION_MINOR))) \
00031
00032
00034
00035 #define SAGA_VERSION_API 0x010000
00036
00038
00039
00040
00041
00042
00043
00044
00045 #define SAGA_VERSION_ISCOMPATIBLE_EX(version) \
00046 (((version) & ~SAGA_VERSION_SUBMINORMASK) >= \
00047 (SAGA_VERSION_FULL & ~SAGA_VERSION_SUBMINORMASK)) \
00048
00049
00050 #define SAGA_VERSION_ISCOMPATIBLE() \
00051 SAGA_VERSION_ISCOMPATIBLE_EX(saga::get_engine_version()) \
00052
00053
00056 namespace saga
00057 {
00062 SAGA_EXPORT unsigned long get_engine_version (void);
00063
00068 SAGA_EXPORT unsigned long get_saga_version (void);
00069
00074 #if !defined(BOOST_WINDOWS)
00075 SAGA_EXPORT extern char const SAGA_CHECK_VERSION[];
00076 #else
00077 SAGA_EXPORT char const* SAGA_CHECK_VERSION();
00078 #endif
00079
00081 }
00082
00083
00084
00085 namespace
00086 {
00087 char const* check_saga_version()
00088 {
00089 #if !defined(BOOST_WINDOWS)
00090 return saga::SAGA_CHECK_VERSION;
00091 #else
00092 return saga::SAGA_CHECK_VERSION();
00093 #endif
00094 }
00095 }
00096
00097 #endif // !SAGA_VERSION_HPP
00098