// Copyright (c) 2005-2007 Andre Merzky (andre@merzky.net) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // job LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef SAGA_IMPL_ENGINE_OBJECT_HPP #define SAGA_IMPL_ENGINE_OBJECT_HPP // include boost helper #include // include config #include // need saga::uuid #include #include /////////////////////////////////////////////////////////////////////////////// namespace saga { namespace impl { ///////////////////////////////////////////////////////////////////////////// class object : private boost::noncopyable, public TR1::enable_shared_from_this { private: // store uuid - no recursion here, as uuid is not a saga::object, // as it is not part of the spec. It gets created here, and is THE uuid // for the saga object, and the proxy. saga::uuid uuid_; // store the object type, we need to store this in the implementation // part to be able to reconstruct a saga::object from the impl only saga::object::type type_; public: SAGA_EXPORT object (saga::object::type type); SAGA_EXPORT virtual ~object (void) {} SAGA_EXPORT virtual saga::session get_session (void) const; SAGA_EXPORT virtual saga::uuid get_uuid (void) const; void set_uuid(saga::uuid const& id); SAGA_EXPORT virtual saga::object clone() const; SAGA_EXPORT virtual bool is_equal(saga::impl::object *impl) const; // initialize implementation object and newly attached CPI object // this needs to be overloaded in the implementation object SAGA_EXPORT virtual void init(); // get_type returns the type of this object SAGA_EXPORT virtual saga::object::type get_type() const; // get_attributes returns the internal implementation of the // impl::attributes interface SAGA_EXPORT virtual saga::impl::attribute* get_attributes(); SAGA_EXPORT virtual saga::impl::attribute const* get_attributes() const; // get_monitorable returns the internal implementation of the // impl::monitorable interface SAGA_EXPORT virtual saga::impl::monitorable* get_monitorable(); SAGA_EXPORT virtual saga::impl::monitorable const* get_monitorable() const; // get_steerable returns the internal implementation of the // impl::monitorable interface SAGA_EXPORT virtual saga::impl::steerable* get_steerable(); SAGA_EXPORT virtual saga::impl::steerable const* get_steerable() const; // get_task_interface returns the internal implementation of the // impl::task_interface interface SAGA_EXPORT virtual saga::impl::task_interface* get_task_interface(); SAGA_EXPORT virtual saga::impl::task_interface const* get_task_interface() const; }; // class object /////////////////////////////////////////////////////////////////////////////// }} // namespace saga::impl #endif // SAGA_IMPL_ENGINE_OBJECT_HPP