SAGA Adaptor CPI v.1.0
istream.cpp
Go to the documentation of this file.
00001 //  Copyright (c) 2005-2009 Hartmut Kaiser
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 
00006 #include <saga/saga/job.hpp>
00007 #include <saga/saga/adaptors/task.hpp>
00008 #include <saga/impl/job.hpp>
00009 #include <saga/impl/packages/job/job_runtime.hpp>
00010 
00012 namespace saga { namespace job 
00013 {
00014     istream::istream(saga::impl::istream_interface *impl)
00015     :   std::ios(0), base_type(impl->get_streambuf()), impl_(impl)
00016     {
00017     }
00018 
00019     istream::istream(istream const& rhs)
00020     :   std::ios(0), base_type(rhs.rdbuf()), impl_(rhs.impl_)
00021     {
00022         this->copyfmt(rhs);
00023         this->clear(rhs.rdstate());
00024     }
00025 
00026     istream::istream()
00027     :   std::ios(0), base_type(0)
00028     {
00029         this->clear(std::ios::eofbit);
00030     }
00031 
00032     istream& istream::operator=(istream const& rhs)
00033     {
00034         if (this != &rhs) {
00035             this->copyfmt(rhs);
00036             this->clear(rhs.rdstate());
00037             this->std::basic_ios<char>::rdbuf(rhs.rdbuf());
00038             impl_ = rhs.impl_;
00039         }
00040         return *this;
00041     }
00042 
00044     namespace detail
00045     {
00046         handle_type get_handle(saga::job::istream const& istrm, bool detach) 
00047         {
00048             return saga::impl::job_runtime::get_handle(istrm, detach);
00049         }
00050     }
00051 
00053 }}   // namespace saga
00054 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines