Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:42:42

0001 //
0002 // Copyright (c) 2019-2023 Ruben Perez Hidalgo (rubenperez038 at gmail dot com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 
0008 #ifndef BOOST_MYSQL_IMPL_CHANNEL_PTR_IPP
0009 #define BOOST_MYSQL_IMPL_CHANNEL_PTR_IPP
0010 
0011 #pragma once
0012 
0013 #include <boost/mysql/detail/channel_ptr.hpp>
0014 
0015 #include <boost/mysql/impl/internal/channel/channel.hpp>
0016 
0017 boost::mysql::detail::channel_ptr::channel_ptr(std::size_t read_buff_size, std::unique_ptr<any_stream> stream)
0018     : chan_(new channel(read_buff_size, std::move(stream)))
0019 {
0020 }
0021 
0022 boost::mysql::detail::channel_ptr::channel_ptr(channel_ptr&& rhs) noexcept : chan_(std::move(rhs.chan_)) {}
0023 
0024 boost::mysql::detail::channel_ptr& boost::mysql::detail::channel_ptr::operator=(channel_ptr&& rhs) noexcept
0025 {
0026     chan_ = std::move(rhs.chan_);
0027     return *this;
0028 }
0029 
0030 boost::mysql::detail::channel_ptr::~channel_ptr() {}
0031 
0032 boost::mysql::detail::any_stream& boost::mysql::detail::channel_ptr::get_stream() const
0033 {
0034     return chan_->stream();
0035 }
0036 
0037 boost::mysql::metadata_mode boost::mysql::detail::channel_ptr::meta_mode() const noexcept
0038 {
0039     return chan_->meta_mode();
0040 }
0041 
0042 void boost::mysql::detail::channel_ptr::set_meta_mode(metadata_mode v) noexcept { chan_->set_meta_mode(v); }
0043 
0044 boost::mysql::diagnostics& boost::mysql::detail::channel_ptr::shared_diag() noexcept
0045 {
0046     return chan_->shared_diag();
0047 }
0048 
0049 std::vector<boost::mysql::field_view>& boost::mysql::detail::get_shared_fields(channel& chan) noexcept
0050 {
0051     return chan.shared_fields();
0052 }
0053 
0054 #endif