SAGA C++ API 1.6
context.hpp
Go to the documentation of this file.
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       explicit context (saga::impl::context *impl);
00075       explicit context (TR1::shared_ptr<saga::impl::context> init);
00077 
00078     public:
00079 
00084       explicit context(std::string const& ctxtype = "");
00085 
00091       explicit context(saga::object const& o);
00092 
00097      ~context();
00098 
00103       context &operator= (saga::object const& o);
00104 
00109       friend SAGA_EXPORT 
00110       bool operator== (context const& lhs, context const& rhs);
00111 
00112       // has been removed as of newest SAGA spec (is implicitely called in
00113       // saga::session::add_context now.
00114       // void set_defaults();
00115   }; 
00116 
00117 } // namespace saga
00119 
00120 // re-enable warnings about dependent classes not being exported from the dll
00121 #if defined(BOOST_MSVC)
00122 #pragma warning(pop)
00123 #endif
00124 
00125 #endif // SAGA_CONTEXT_HPP
00126 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines