File indexing completed on 2025-01-30 09:42:29
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_GIL_IO_GET_READ_DEVICE_HPP
0009 #define BOOST_GIL_IO_GET_READ_DEVICE_HPP
0010
0011 #include <boost/gil/detail/mp11.hpp>
0012 #include <boost/gil/io/device.hpp>
0013 #include <boost/gil/io/path_spec.hpp>
0014
0015 #include <type_traits>
0016
0017 namespace boost { namespace gil {
0018
0019 template< typename T
0020 , typename FormatTag
0021 , class Enable = void
0022 >
0023 struct get_read_device
0024 {};
0025
0026 template <typename Device, typename FormatTag>
0027 struct get_read_device
0028 <
0029 Device,
0030 FormatTag,
0031 typename std::enable_if
0032 <
0033 mp11::mp_and
0034 <
0035 detail::is_adaptable_input_device<FormatTag, Device>,
0036 is_format_tag<FormatTag>
0037 >::value
0038 >::type
0039 >
0040 {
0041 using type = typename detail::is_adaptable_input_device
0042 <
0043 FormatTag,
0044 Device
0045 >::device_type;
0046 };
0047
0048 template <typename String, typename FormatTag>
0049 struct get_read_device
0050 <
0051 String,
0052 FormatTag,
0053 typename std::enable_if
0054 <
0055 mp11::mp_and
0056 <
0057 detail::is_supported_path_spec<String>,
0058 is_format_tag<FormatTag>
0059 >::value
0060 >::type
0061 >
0062 {
0063 using type = detail::file_stream_device<FormatTag>;
0064 };
0065
0066 }
0067 }
0068
0069 #endif