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/isn.hpp> 00010 #include <saga/impl/isn.hpp> 00011 #include <saga/saga/detail/call.hpp> 00012 #include <saga/saga/exception.hpp> 00013 00015 namespace saga 00016 { 00017 namespace isn { 00018 navigator::navigator (std::string const& model, 00019 session const &s, 00020 saga::url loc) 00021 SAGA_THROW_SPEC(throw(saga::not_implemented, 00022 saga::incorrect_url, 00023 saga::not_implemented, 00024 saga::authorization_failed, 00025 saga::authentication_failed, 00026 saga::timeout, 00027 saga::no_success)) 00028 : saga::object(new saga::impl::navigator(model, s, loc)) 00029 { 00030 this->saga::object::get_impl()->init(); 00031 } 00032 00033 navigator::navigator (saga::impl::navigator* impl) 00034 SAGA_THROW_SPEC(throw(saga::not_implemented, 00035 saga::incorrect_url, 00036 saga::not_implemented, 00037 saga::authorization_failed, 00038 saga::authentication_failed, 00039 saga::timeout, 00040 saga::no_success)) 00041 : saga::object(impl) 00042 { 00043 } 00044 00045 navigator::navigator(std::string const& model, saga::url loc) 00046 SAGA_THROW_SPEC(throw(saga::not_implemented, 00047 saga::incorrect_url, 00048 saga::not_implemented, 00049 saga::authorization_failed, 00050 saga::authentication_failed, 00051 saga::timeout, 00052 saga::no_success)) 00053 : saga::object(new saga::impl::navigator(model, 00054 saga::detail::get_the_session(), 00055 loc)) 00056 { 00057 this->saga::object::get_impl()->init(); 00058 } 00059 00060 navigator::~navigator(void) SAGA_THROW_SPEC(throw()) 00061 { 00062 } 00063 00064 navigator &navigator::operator= (saga::object const& o) 00065 SAGA_THROW_SPEC(throw()) 00066 { 00067 if (this != &o) 00068 this->saga::object::operator=(o); 00069 return *this; 00070 } 00071 00072 saga::impl::navigator* navigator::get_impl() const 00073 { 00074 typedef saga::object base_type; 00075 return static_cast<saga::impl::navigator*>(this->base_type::get_impl()); 00076 } 00077 00078 TR1::shared_ptr <saga::impl::navigator> navigator::get_impl_sp(void) const 00079 { 00080 typedef saga::object base_type; 00081 return TR1::static_pointer_cast <saga::impl::navigator> ( 00082 this->base_type::get_impl_sp()); 00083 } 00084 00085 // factory 00086 SAGA_CALL_CREATE_IMP_3(navigator, 00087 impl::navigator, 00088 std::string const&, 00089 session const&, 00090 saga::url) 00091 00092 // Methods for isn 00093 SAGA_CALL_IMP_1 (navigator, list_related_entity_names, std::string) 00094 SAGA_CALL_IMP_4 (navigator, 00095 get_related_entities, 00096 std::string, 00097 std::string, 00098 std::string, 00099 std::vector<saga::isn::entity_data>) 00100 00101 SAGA_CALL_IMP_2 (navigator, 00102 get_entities, 00103 std::string, 00104 std::string) 00105 00106 } // namespace isn 00107 } // namespace saga 00108 00110