SAGA Adaptor CPI v.1.0
|
00001 // Copyright (c) 2009 STFC 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 #include <string> 00006 #include <vector> 00007 00008 #include <saga/saga/adaptors/task.hpp> 00009 #include <saga/saga/sd.hpp> 00010 #include <saga/impl/sd.hpp> 00011 #include <saga/saga/detail/call.hpp> 00012 #include <saga/saga/exception.hpp> 00013 00015 namespace saga 00016 { 00017 namespace sd { 00018 discoverer::discoverer (session const &s, saga::url loc) 00019 SAGA_THROW_SPEC(throw(saga::not_implemented, 00020 saga::incorrect_url, 00021 saga::not_implemented, 00022 saga::authorization_failed, 00023 saga::authentication_failed, 00024 saga::timeout, 00025 saga::no_success)) 00026 : saga::object(new saga::impl::discoverer(s, loc)) 00027 { 00028 this->saga::object::get_impl()->init(); 00029 } 00030 00031 discoverer::discoverer (saga::impl::discoverer* impl) 00032 SAGA_THROW_SPEC(throw(saga::not_implemented, 00033 saga::incorrect_url, 00034 saga::not_implemented, 00035 saga::authorization_failed, 00036 saga::authentication_failed, 00037 saga::timeout, 00038 saga::no_success)) 00039 : saga::object(impl) 00040 { 00041 } 00042 00043 discoverer::discoverer(saga::url loc) 00044 SAGA_THROW_SPEC(throw(saga::not_implemented, 00045 saga::incorrect_url, 00046 saga::not_implemented, 00047 saga::authorization_failed, 00048 saga::authentication_failed, 00049 saga::timeout, 00050 saga::no_success)) 00051 : saga::object(new saga::impl::discoverer(saga::detail::get_the_session(), loc)) 00052 { 00053 this->saga::object::get_impl()->init(); 00054 } 00055 00056 discoverer::~discoverer(void) SAGA_THROW_SPEC(throw()) 00057 { 00058 } 00059 00060 discoverer &discoverer::operator= (saga::object const& o) 00061 SAGA_THROW_SPEC(throw()) 00062 { 00063 if (this != &o) 00064 this->saga::object::operator=(o); 00065 return *this; 00066 } 00067 00068 saga::impl::discoverer* discoverer::get_impl() const 00069 { 00070 typedef saga::object base_type; 00071 return static_cast<saga::impl::discoverer*>(this->base_type::get_impl()); 00072 } 00073 00074 TR1::shared_ptr <saga::impl::discoverer> discoverer::get_impl_sp(void) const 00075 { 00076 typedef saga::object base_type; 00077 return TR1::static_pointer_cast <saga::impl::discoverer> ( 00078 this->base_type::get_impl_sp()); 00079 } 00080 00081 // factory 00082 SAGA_CALL_CREATE_IMP_2(discoverer, 00083 impl::discoverer, 00084 session const&, 00085 saga::url) 00086 00087 // methods for service discoverer 00088 SAGA_CALL_IMP_2_EX (discoverer, list_services, list_services2, std::string, std::string) 00089 SAGA_CALL_IMP_3_EX (discoverer, list_services, list_services3, std::string, std::string, std::string) 00090 00091 } // namespace sd 00092 } // namespace saga 00093