- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Search for |

# dynamic_adaptor_data.hpp

Go to the documentation of this file.

    00001 //  Copyright (c) 2005-2009 Hartmut Kaiser
    00002 //
    00003 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
    00004 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    00005
    00006 #if !defined(SAGA_ENGINE_STATIC_ADAPTOR_DATA_HPP)
    00007 #define SAGA_ENGINE_STATIC_ADAPTOR_DATA_HPP
    00008
    00010 #include <boost/config.hpp>
    00011 #include <boost/preprocessor/stringize.hpp>
    00012 #include <boost/plugin.hpp>
    00013
    00014 struct static_adaptor_load_data_type
    00015 {
    00016     char const* const name;     // adaptor name
    00017     void (*force_load)();       // function to force linking adaptor
    00018     boost::plugin::get_plugins_list_type get_factory;
    00019 };
    00020
    00021 struct static_package_load_data_type
    00022 {
    00023     char const* const name;     // package name
    00024     void (*force_load)();       // function to force linking package
    00025     unsigned long (*get_version)(); // function to force linking version API
    00026 };
    00027
    00029 #define SAGA_LITE_DECLARE_ADAPTOR(name)                                               \
    00030     extern "C" void BOOST_PLUGIN_FORCE_LOAD_NAME(SAGA_MANGLE_ADAPTOR_NAME(name))();   \
    00031     extern "C" BOOST_PLUGIN_EXPORT_API std::map<std::string, boost::any>&             \
    00032         BOOST_PLUGIN_API BOOST_PLUGIN_LIST_NAME(SAGA_MANGLE_ADAPTOR_NAME(name))()     \
    00033
    00034
    00035 #define SAGA_LITE_DEFINE_ADAPTOR(name)                                                \
    00036     {                                                                                 \
    00037         BOOST_PP_STRINGIZE(name),                                                     \
    00038         BOOST_PLUGIN_FORCE_LOAD_NAME(SAGA_MANGLE_ADAPTOR_NAME(name)),                 \
    00039         BOOST_PLUGIN_LIST_NAME(SAGA_MANGLE_ADAPTOR_NAME(name))                        \
    00040     }                                                                                 \
    00041
    00042
    00044 #define SAGA_LITE_DECLARE_PACKAGE(name)                                               \
    00045     extern "C" void BOOST_PLUGIN_FORCE_LOAD_NAME(SAGA_MANGLE_PACKAGE_NAME(name))();   \
    00046     namespace saga { unsigned long get_ ## name ## _package_version(); }              \
    00047
    00048
    00049 #define SAGA_LITE_DEFINE_PACKAGE(name)                                                \
    00050     {                                                                                 \
    00051         BOOST_PP_STRINGIZE(name),                                                     \
    00052         BOOST_PLUGIN_FORCE_LOAD_NAME(SAGA_MANGLE_PACKAGE_NAME(name)),                 \
    00053         &saga::get_ ## name ## _package_version                                       \
    00054     }                                                                                 \
    00055
    00056
    00058 // prototypes of functions used to force linking of adaptors
    00059 #if defined(BUILD_SAGA_LITE)
    00060     SAGA_LITE_DECLARE_ADAPTOR(aws_context);
    00061     SAGA_LITE_DECLARE_ADAPTOR(condor_job);
    00062     SAGA_LITE_DECLARE_ADAPTOR(curl_file);
    00063     SAGA_LITE_DECLARE_ADAPTOR(default_advert);
    00064     SAGA_LITE_DECLARE_ADAPTOR(default_file);
    00065     SAGA_LITE_DECLARE_ADAPTOR(default_job);
    00066     SAGA_LITE_DECLARE_ADAPTOR(default_replica);
    00067     SAGA_LITE_DECLARE_ADAPTOR(default_stream);
    00068     SAGA_LITE_DECLARE_ADAPTOR(globus_gram_job);
    00069     SAGA_LITE_DECLARE_ADAPTOR(globus_gridftp_file);
    00070     SAGA_LITE_DECLARE_ADAPTOR(globus_gsi_context);
    00071     SAGA_LITE_DECLARE_ADAPTOR(globus_rls_replica);
    00072     SAGA_LITE_DECLARE_ADAPTOR(local_url);
    00073     SAGA_LITE_DECLARE_ADAPTOR(omii_gridsam_job);
    00074     SAGA_LITE_DECLARE_ADAPTOR(ssh_context);
    00075     SAGA_LITE_DECLARE_ADAPTOR(ssh_file);
    00076     SAGA_LITE_DECLARE_ADAPTOR(ssh_job);
    00077 #endif
    00078
    00079 // table of adaptors to link statically
    00080 static_adaptor_load_data_type static_adaptor_load_data[] =
    00081 {
    00082 #if defined(BUILD_SAGA_LITE)
    00083     SAGA_LITE_DEFINE_ADAPTOR(aws_context),
    00084     SAGA_LITE_DEFINE_ADAPTOR(condor_job),
    00085     SAGA_LITE_DEFINE_ADAPTOR(curl_file),
    00086     SAGA_LITE_DEFINE_ADAPTOR(default_advert),
    00087     SAGA_LITE_DEFINE_ADAPTOR(default_file),
    00088     SAGA_LITE_DEFINE_ADAPTOR(default_job),
    00089     SAGA_LITE_DEFINE_ADAPTOR(default_replica),
    00090     SAGA_LITE_DEFINE_ADAPTOR(default_stream),
    00091     SAGA_LITE_DEFINE_ADAPTOR(globus_gram_job),
    00092     SAGA_LITE_DEFINE_ADAPTOR(globus_gridftp_file),
    00093     SAGA_LITE_DEFINE_ADAPTOR(globus_gsi_context),
    00094     SAGA_LITE_DEFINE_ADAPTOR(globus_rls_replica),
    00095     SAGA_LITE_DEFINE_ADAPTOR(local_url),
    00096     SAGA_LITE_DEFINE_ADAPTOR(omii_gridsam_job),
    00097     SAGA_LITE_DEFINE_ADAPTOR(ssh_context),
    00098     SAGA_LITE_DEFINE_ADAPTOR(ssh_file),
    00099     SAGA_LITE_DEFINE_ADAPTOR(ssh_job),
    00100 #endif
    00101     { NULL, NULL }
    00102 };
    00103
    00105 // prototypes of functions used to force linking of packages
    00106 #if defined(BUILD_SAGA_LITE)
    00107 #endif
    00108
    00109 // table of packages to link statically
    00110 static_package_load_data_type static_package_load_data[] =
    00111 {
    00112 #if defined(BUILD_SAGA_LITE)
    00113 #endif
    00114     { NULL, NULL }
    00115 };
    00116
    00118 // enable auto-linking on supported platforms
    00119 #if defined(BOOST_WINDOWS) && defined(BUILD_SAGA_LITE)
    00120 // auto-link adaptors
    00121     #define SAGA_AUTOLINK_LIB_NAME "aws_context"
    00122     #include <saga/saga/autolink.hpp>
    00123     #define SAGA_AUTOLINK_LIB_NAME "condor_job"
    00124     #include <saga/saga/autolink.hpp>
    00125     #define SAGA_AUTOLINK_LIB_NAME "curl_file"
    00126     #include <saga/saga/autolink.hpp>
    00127     #define SAGA_AUTOLINK_LIB_NAME "default_advert"
    00128     #include <saga/saga/autolink.hpp>
    00129     #define SAGA_AUTOLINK_LIB_NAME "default_file"
    00130     #include <saga/saga/autolink.hpp>
    00131     #define SAGA_AUTOLINK_LIB_NAME "default_job"
    00132     #include <saga/saga/autolink.hpp>
    00133     #define SAGA_AUTOLINK_LIB_NAME "default_replica"
    00134     #include <saga/saga/autolink.hpp>
    00135     #define SAGA_AUTOLINK_LIB_NAME "default_stream"
    00136     #include <saga/saga/autolink.hpp>
    00137     #define SAGA_AUTOLINK_LIB_NAME "globus_gram_job"
    00138     #include <saga/saga/autolink.hpp>
    00139     #define SAGA_AUTOLINK_LIB_NAME "globus_gridftp_file"
    00140     #include <saga/saga/autolink.hpp>
    00141     #define SAGA_AUTOLINK_LIB_NAME "globus_gsi_context"
    00142     #include <saga/saga/autolink.hpp>
    00143     #define SAGA_AUTOLINK_LIB_NAME "globus_rls_replica"
    00144     #include <saga/saga/autolink.hpp>
    00145     #define SAGA_AUTOLINK_LIB_NAME "local_url"
    00146     #include <saga/saga/autolink.hpp>
    00147     #define SAGA_AUTOLINK_LIB_NAME "omii_gridsam_job"
    00148     #include <saga/saga/autolink.hpp>
    00149     #define SAGA_AUTOLINK_LIB_NAME "ssh_context"
    00150     #include <saga/saga/autolink.hpp>
    00151     #define SAGA_AUTOLINK_LIB_NAME "ssh_file"
    00152     #include <saga/saga/autolink.hpp>
    00153     #define SAGA_AUTOLINK_LIB_NAME "ssh_job"
    00154     #include <saga/saga/autolink.hpp>
    00155 // auto-link packages
    00156 #endif
    00157
    00158 #endif
    00159