SAGA Adaptor CPI v.1.0
version.hpp
Go to the documentation of this file.
00001 //  Copyright (c) 2005-2007 Andre Merzky (andre@merzky.net)
00002 //  Copyright (c) 2005-2009 Hartmut Kaiser
00003 // 
00004 //  Distributed under the Boost Software License, Version 1.0. (See accompanying 
00005 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00006 
00007 #if !defined(SAGA_PACKAGE_COMM_RPC_VERSION_HPP)
00008 #define SAGA_PACKAGE_COMM_RPC_VERSION_HPP
00009 
00010 #include <saga/saga/util.hpp>
00011 #include <saga/saga/version.hpp>
00012 #include <saga/saga/packages/rpc/config.hpp>
00013 
00015 //  The version of the SAGA file package
00016 //
00017 //  SAGA_VERSION_PACKAGE_RPC_FULL & 0x0000FF is the sub-minor version
00018 //  SAGA_VERSION_PACKAGE_RPC_FULL & 0x00FF00 is the minor version
00019 //  SAGA_VERSION_PACKAGE_RPC_FULL & 0xFF0000 is the major version
00020 //
00021 #define SAGA_VERSION_PACKAGE_RPC_FULL         SAGA_VERSION_FULL
00022                                               
00023 #define SAGA_VERSION_PACKAGE_RPC_MAJOR        SAGA_VERSION_MAJOR
00024 #define SAGA_VERSION_PACKAGE_RPC_MINOR        SAGA_VERSION_MINOR
00025 #define SAGA_VERSION_PACKAGE_RPC_SUBMINOR     SAGA_VERSION_SUBMINOR
00026                                               
00027 #define SAGA_VERSION_PACKAGE_RPC_DATE         SAGA_VERSION_DATE
00028                                               
00029 #define SAGA_VERSION_PACKAGE_RPC_SUBMINORMASK SAGA_VERSION_SUBMINORMASK
00030 
00032 //  The SAGA rpc package API version: here V1.0.0
00033 #define SAGA_VERSION_PACKAGE_RPC_API          SAGA_VERSION_API
00034 
00036 //
00037 //  SAGA_VERSION_PACKAGE_RPC_ISCOMPATIBLE()
00038 // 
00039 //  The SAGA_VERSION_ISCOMPATIBLE macro tests, if the version of the loaded
00040 //  SAGA engine is compatible with the version the calling application was 
00041 //  compiled against.
00042 //
00043 #define SAGA_VERSION_PACKAGE_RPC_ISCOMPATIBLE_EX(version)                     \
00044     (((version) & ~SAGA_VERSION_PACKAGE_RPC_SUBMINORMASK) >=                  \
00045       (SAGA_VERSION_PACKAGE_RPC_FULL & ~SAGA_VERSION_PACKAGE_RPC_SUBMINORMASK)) \
00046   
00047 
00048 #define SAGA_VERSION_PACKAGE_RPC_ISCOMPATIBLE()                               \
00049     SAGA_VERSION_PACKAGE_RPC_ISCOMPATIBLE_EX(saga::get_rpc_package_version()) \
00050   
00051 
00053 namespace saga {
00054 
00055 // Returns the version of the SAGA engine
00056 SAGA_RPC_PACKAGE_EXPORT unsigned long get_rpc_package_version();
00057 
00058 // Returns the implemented SAGA API version
00059 SAGA_RPC_PACKAGE_EXPORT unsigned long get_rpc_package_api_version();
00060 
00062 }   // namespace saga
00063 
00064 #endif // !SAGA_PACKAGE_COMM_RPC_VERSION_HPP
00065 
00066 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines