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_sp (void) const; 00068 saga::impl::context* get_impl (void) const; 00069 00070 friend struct saga::detail::attribute<context>; // needs to access get_impl() 00071 friend class saga::impl::context; 00072 friend struct saga::impl::runtime; 00073 00074 context (saga::impl::context *impl); 00076 00077 public: 00078 00083 explicit context(std::string const& ctxtype = ""); 00084 00090 explicit context(saga::object const& o); 00091 00096 ~context(); 00097 00102 context &operator= (saga::object const& o); 00103 00108 friend SAGA_EXPORT 00109 bool operator== (context const& lhs, context const& rhs); 00110 00111 // has been removed as of newest SAGA spec (is implicitely called in 00112 // saga::session::add_context now. 00113 // void set_defaults(); 00114 }; 00115 00116 } // namespace saga 00118 00119 // re-enable warnings about dependent classes not being exported from the dll 00120 #if defined(BOOST_MSVC) 00121 #pragma warning(pop) 00122 #endif 00123 00124 #endif // SAGA_CONTEXT_HPP 00125