Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-17 08:39:19

0001 //
0002 // Copyright (c) 2025 Klemens Morgenstern (klemens.morgenstern@gmx.net)
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_COBALT_IO_RANDOM_ACCESS_DEVICE_HPP
0009 #define BOOST_COBALT_IO_RANDOM_ACCESS_DEVICE_HPP
0010 
0011 #include <boost/cobalt/io/detail/config.hpp>
0012 #include <boost/cobalt/io/buffer.hpp>
0013 #include <boost/cobalt/io/ops.hpp>
0014 
0015 namespace boost::cobalt::io
0016 {
0017 
0018 // tag::outline[]
0019 struct BOOST_SYMBOL_VISIBLE random_access_write_device
0020 {
0021   virtual ~random_access_write_device() = default;
0022   [[nodiscard]] virtual write_at_op write_some_at(std::uint64_t offset, const_buffer_sequence buffer) = 0;
0023 };
0024 
0025 struct BOOST_SYMBOL_VISIBLE random_access_read_device
0026 {
0027   virtual ~random_access_read_device() = default;
0028   [[nodiscard]] virtual read_at_op read_some_at(std::uint64_t offset, mutable_buffer_sequence buffer) = 0;
0029 };
0030 
0031 struct random_access_device : random_access_read_device, random_access_write_device
0032 {
0033 };
0034 // end::outline[]
0035 
0036 }
0037 
0038 #endif //BOOST_COBALT_IO_RANDOM_ACCESS_DEVICE_HPP