File indexing completed on 2025-01-18 09:36:55
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_GIL_CONCEPTS_PIXEL_BASED_HPP
0009 #define BOOST_GIL_CONCEPTS_PIXEL_BASED_HPP
0010
0011 #include <boost/gil/concepts/basic.hpp>
0012 #include <boost/gil/concepts/channel.hpp>
0013 #include <boost/gil/concepts/color.hpp>
0014 #include <boost/gil/concepts/concept_check.hpp>
0015 #include <boost/gil/concepts/fwd.hpp>
0016
0017 #include <cstddef>
0018
0019 #if defined(BOOST_CLANG)
0020 #pragma clang diagnostic push
0021 #pragma clang diagnostic ignored "-Wunknown-pragmas"
0022 #pragma clang diagnostic ignored "-Wunused-local-typedefs"
0023 #endif
0024
0025 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
0026 #pragma GCC diagnostic push
0027 #pragma GCC diagnostic ignored "-Wunused-local-typedefs"
0028 #endif
0029
0030 namespace boost { namespace gil {
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052 template <typename P>
0053 struct PixelBasedConcept
0054 {
0055 void constraints()
0056 {
0057 using color_space_t = typename color_space_type<P>::type;
0058 gil_function_requires<ColorSpaceConcept<color_space_t>>();
0059
0060 using channel_mapping_t = typename channel_mapping_type<P>::type ;
0061 gil_function_requires<ChannelMappingConcept<channel_mapping_t>>();
0062
0063 static const bool planar = is_planar<P>::value;
0064 ignore_unused_variable_warning(planar);
0065
0066
0067 static const std::size_t nc = num_channels<P>::value;
0068 ignore_unused_variable_warning(nc);
0069 }
0070 };
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082 template <typename P>
0083 struct HomogeneousPixelBasedConcept
0084 {
0085 void constraints()
0086 {
0087 gil_function_requires<PixelBasedConcept<P>>();
0088
0089 using channel_t = typename channel_type<P>::type;
0090 gil_function_requires<ChannelConcept<channel_t>>();
0091 }
0092 };
0093
0094 }}
0095
0096 #if defined(BOOST_CLANG)
0097 #pragma clang diagnostic pop
0098 #endif
0099
0100 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
0101 #pragma GCC diagnostic pop
0102 #endif
0103
0104 #endif