File indexing completed on 2025-01-18 09:37:03
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_GIL_IO_GET_WRITE_DEVICE_HPP
0009 #define BOOST_GIL_IO_GET_WRITE_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, typename FormatTag, class Enable = void>
0020 struct get_write_device {};
0021
0022 template <typename Device, typename FormatTag>
0023 struct get_write_device
0024 <
0025 Device,
0026 FormatTag,
0027 typename std::enable_if
0028 <
0029 mp11::mp_and
0030 <
0031 detail::is_adaptable_output_device<FormatTag, Device>,
0032 is_format_tag<FormatTag>
0033 >::value
0034 >::type
0035 >
0036 {
0037 using type =
0038 typename detail::is_adaptable_output_device<FormatTag, Device>::device_type;
0039 };
0040
0041 template <typename String, typename FormatTag>
0042 struct get_write_device
0043 <
0044 String,
0045 FormatTag,
0046 typename std::enable_if
0047 <
0048 mp11::mp_and
0049 <
0050 detail::is_supported_path_spec<String>,
0051 is_format_tag<FormatTag>
0052 >::value
0053 >::type
0054 >
0055 {
0056 using type = detail::file_stream_device<FormatTag>;
0057 };
0058
0059 }}
0060
0061 #endif