- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Search for |

# ostream.hpp

Go to the documentation of this file.

    00001 //  Copyright (c) 2005-2009 Hartmut Kaiser
    00002 //  Copyright (c) 2007 Ole Weidner (oweidner@cct.lsu.edu)
    00003 //
    00004 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
    00005 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    00006
    00007 #if !defined(SAGA_PACKAGES_JOB_ADAPTORS_OSTREAM_HPP)
    00008 #define SAGA_PACKAGES_JOB_ADAPTORS_OSTREAM_HPP
    00009
    00010 #include <iosfwd>
    00011
    00012 #include <boost/config.hpp>
    00013
    00014 #include <saga/saga/util.hpp>
    00015 #include <saga/saga/base.hpp>
    00016 #include <saga/saga/packages/job/config.hpp>
    00017
    00018 // suppress warnings about dependent classes not being exported from the dll
    00019 #if defined(BOOST_MSVC)
    00020 #pragma warning(push)
    00021 #pragma warning(disable: 4251 4231 4275 4660)
    00022 #endif
    00023
    00025 namespace saga { namespace job
    00026 {
    00031     class SAGA_JOB_PACKAGE_EXPORT ostream
    00032         :   public std::basic_ostream<char>
    00033     {
    00034     private:
    00035         typedef std::basic_ostream<char> base_type;
    00036         TR1::shared_ptr<saga::impl::ostream_interface> impl_;
    00037
    00038     private:
    00039          friend struct saga::impl::job_runtime;    // needed to allow access to get_handle
    00040
    00041     protected:
    00043
    00044         ostream(saga::impl::ostream_interface *impl);
    00046
    00047     public:
    00052         ostream();
    00053
    00058         ostream(ostream const& rhs);
    00059
    00064         ~ostream();
    00065
    00070         ostream& operator=(ostream const& rhs);
    00071     };
    00072
    00073     namespace detail
    00074     {
    00075 #if defined(BOOST_WINDOWS)
    00076         typedef void* handle_type;
    00077 #else
    00078         typedef int handle_type;
    00079 #endif
    00080
    00087          SAGA_JOB_PACKAGE_EXPORT handle_type
    00088          get_handle(saga::job::ostream const& ostream, bool detach = false);
    00089     }
    00090
    00092 }}    // namespace saga
    00093
    00094 // re-enable warnings about dependent classes not being exported from the dll
    00095 #if defined(BOOST_MSVC)
    00096 #pragma warning(pop)
    00097 #endif
    00098
    00099 #endif // !defined(SAGA_PACKAGES_JOB_ADAPTORS_OSTREAM_HPP)
    00100