00001 // Copyright (c) 2005-2007 Andre Merzky (andre@merzky.net) 00002 // Copyright (c) 2005-2009 Hartmut Kaiser 00003 // Copyright (c) 2007 Ole Weidner (oweidner@cct.lsu.edu) 00004 // 00005 // Distributed under the Boost Software License, Version 1.0. (See accompanying 00006 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 00007 00008 #ifndef SAGA_CONTEXT_HPP 00009 #define SAGA_CONTEXT_HPP 00010 00011 // include dependent spec sections 00012 #include <saga/saga/util.hpp> 00013 #include <saga/saga/base.hpp> 00014 #include <saga/saga/task.hpp> 00015 00016 #include <saga/saga/object.hpp> 00017 #include <saga/saga/detail/attribute.hpp> 00018 00019 // suppress warnings about dependent classes not being exported from the dll 00020 #if defined(BOOST_MSVC) 00021 #pragma warning(push) 00022 #pragma warning(disable: 4251 4231 4660) 00023 #endif 00024 00026 namespace saga 00027 { 00028 namespace attributes 00029 { 00031 // attribute names for context 00032 00033 // read write attributes 00034 char const* const context_type = "Type"; 00035 char const* const context_server = "Server"; 00036 char const* const context_certrepository = "CertRepository"; 00037 char const* const context_userproxy = "UserProxy"; 00038 char const* const context_usercert = "UserCert"; 00039 char const* const context_userkey = "UserKey"; 00040 char const* const context_userid = "UserID"; 00041 char const* const context_userpass = "UserPass"; 00042 char const* const context_uservo = "UserVO"; 00043 char const* const context_lifetime = "LifeTime"; 00044 char const* const context_remoteid = "RemoteID"; 00045 char const* const context_remotehost = "RemoteHost"; 00046 char const* const context_remoteport = "RemotePort"; 00047 } 00048 00060 class SAGA_EXPORT context 00061 : public saga::object 00062 , public saga::detail::attribute<context> 00063 { 00064 protected: 00066 00067 TR1::shared_ptr <saga::impl::context> get_impl (void) const; 00068 friend struct saga::detail::attribute<context>; // needs to access get_impl() 00069 friend class saga::impl::context; 00070 friend struct saga::impl::runtime; 00071 00072 context (saga::impl::context *impl); 00074 00075 public: 00076 00081 explicit context(std::string const& ctxtype = ""); 00082 00088 explicit context(saga::object const& o); 00089 00094 ~context(); 00095 00100 context &operator= (saga::object const& o); 00101 00106 friend SAGA_EXPORT 00107 bool operator== (context const& lhs, context const& rhs); 00108 00109 // has been removed as of newest SAGA spec (is implicitely called in 00110 // saga::session::add_context now. 00111 // void set_defaults(); 00112 }; 00113 00114 } // namespace saga 00116 00117 // re-enable warnings about dependent classes not being exported from the dll 00118 #if defined(BOOST_MSVC) 00119 #pragma warning(pop) 00120 #endif 00121 00122 #endif // SAGA_CONTEXT_HPP 00123