/usr/include/boost/gil
NameSizeModeActions
concepts/-0755rm
detail/-0755rm
extension/-0755rm
image_processing/-0755rm
io/-0755rm
algorithm.hpp413330644editdlrm
bit_aligned_pixel_iterator.hpp92000644editdlrm
bit_aligned_pixel_reference.hpp140960644editdlrm
channel.hpp299130644editdlrm
channel_algorithm.hpp230810644editdlrm
cmyk.hpp12960644editdlrm
color_base.hpp220100644editdlrm
color_base_algorithm.hpp298890644editdlrm
color_convert.hpp138510644editdlrm
concepts.hpp8970644editdlrm
deprecated.hpp24770644editdlrm
device_n.hpp35910644editdlrm
dynamic_step.hpp8930644editdlrm
gray.hpp6190644editdlrm
image.hpp204520644editdlrm
image_view.hpp140460644editdlrm
image_view_factory.hpp246250644editdlrm
iterator_from_2d.hpp66480644editdlrm
locator.hpp187860644editdlrm
metafunctions.hpp311860644editdlrm
packed_pixel.hpp92140644editdlrm
pixel.hpp98660644editdlrm
pixel_iterator.hpp53070644editdlrm
pixel_iterator_adaptor.hpp90710644editdlrm
planar_pixel_iterator.hpp100590644editdlrm
planar_pixel_reference.hpp99160644editdlrm
point.hpp68990644editdlrm
position_iterator.hpp50050644editdlrm
premultiply.hpp35210644editdlrm
promote_integral.hpp61850644editdlrm
rgb.hpp14580644editdlrm
rgba.hpp16740644editdlrm
step_iterator.hpp142260644editdlrm
typedefs.hpp134150644editdlrm
utilities.hpp81610644editdlrm
virtual_locator.hpp62880644editdlrm
Edit: /usr/include/boost/gil/planar_pixel_reference.hpp (9916B)
// // Copyright 2005-2007 Adobe Systems Incorporated // // Distributed under the Boost Software License, Version 1.0 // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // #ifndef BOOST_GIL_PLANAR_PIXEL_REFERENCE_HPP #define BOOST_GIL_PLANAR_PIXEL_REFERENCE_HPP #include #include #include #include #include #include #include namespace boost { namespace gil { /// \defgroup ColorBaseModelPlanarRef planar_pixel_reference /// \ingroup ColorBaseModel /// \brief A homogeneous color base whose element is a channel reference. Models HomogeneousColorBaseConcept, HomogeneousPixelConcept. /// This class is used as a reference proxy to a planar pixel. /// \defgroup PixelModelPlanarRef planar_pixel_reference /// \ingroup PixelModel /// \brief A reference proxy to a planar pixel. Models HomogeneousColorBaseConcept, HomogeneousPixelConcept. /// \ingroup PixelModelPlanarRef ColorBaseModelPlanarRef PixelBasedModel /// \brief A reference proxy to a planar pixel. /// /// A reference to a planar pixel is a proxy class containing references to each of the corresponding channels. /// Models: HomogeneousColorBaseConcept, HomogeneousPixelConcept /// /// \tparam ChannelReference A channel reference, either const or mutable /// \tparam ColorSpace template struct planar_pixel_reference : detail::homogeneous_color_base < ChannelReference, layout, mp11::mp_size::value > { using parent_t =detail::homogeneous_color_base < ChannelReference, layout, mp11::mp_size::value >; private: // These three are only defined for homogeneous pixels using channel_t = typename channel_traits::value_type; using channel_const_reference = typename channel_traits::const_reference; public: static constexpr bool is_mutable = channel_traits::is_mutable; using value_type = pixel>; using reference = planar_pixel_reference; using const_reference = planar_pixel_reference; planar_pixel_reference(ChannelReference v0, ChannelReference v1) : parent_t(v0, v1) {} planar_pixel_reference(ChannelReference v0, ChannelReference v1, ChannelReference v2) : parent_t(v0, v1, v2) {} planar_pixel_reference(ChannelReference v0, ChannelReference v1, ChannelReference v2, ChannelReference v3) : parent_t(v0, v1, v2, v3) {} planar_pixel_reference(ChannelReference v0, ChannelReference v1, ChannelReference v2, ChannelReference v3, ChannelReference v4) : parent_t(v0, v1, v2, v3, v4) {} planar_pixel_reference(ChannelReference v0, ChannelReference v1, ChannelReference v2, ChannelReference v3, ChannelReference v4, ChannelReference v5) : parent_t(v0, v1, v2, v3, v4, v5) {} planar_pixel_reference(planar_pixel_reference const& p) : parent_t(p) {} // TODO: What is the purpose of returning via const reference? auto operator=(planar_pixel_reference const& p) const -> planar_pixel_reference const& { static_copy(p, *this); return *this; } template planar_pixel_reference(Pixel const& p) : parent_t(p) { check_compatible(); } // TODO: What is the purpose of returning via const reference? template auto operator=(Pixel const& p) const -> planar_pixel_reference const& { check_compatible(); static_copy(p, *this); return *this; } // PERFORMANCE_CHECK: Is this constructor necessary? template planar_pixel_reference(pixel>& p) : parent_t(p) { check_compatible>>(); } // Construct at offset from a given location template planar_pixel_reference(planar_pixel_iterator const& p, std::ptrdiff_t diff) : parent_t(p, diff) {} // This overload is necessary for a compiler implementing Core Issue 574 // to prevent generation of an implicit copy assignment operator (the reason // for generating implicit copy assignment operator is that according to // Core Issue 574, a cv-qualified assignment operator is not considered // "copy assignment operator"). // EDG implemented Core Issue 574 starting with EDG Version 3.8. I'm not // sure why they did it for a template member function as well. #if BOOST_WORKAROUND(__HP_aCC, >= 61700) || BOOST_WORKAROUND(__INTEL_COMPILER, >= 1000) const planar_pixel_reference& operator=(const planar_pixel_reference& p) { static_copy(p,*this); return *this; } template const planar_pixel_reference& operator=(const P& p) { check_compatible

(); static_copy(p,*this); return *this; } #endif template bool operator==(Pixel const& p) const { check_compatible(); return static_equal(*this, p); } template bool operator!=(Pixel const &p) const { return !(*this == p); } auto operator[](std::size_t i) const -> ChannelReference { return this->at_c_dynamic(i); } auto operator->() const -> planar_pixel_reference const* { return this; } private: template static void check_compatible() { gil_function_requires>(); } }; ///////////////////////////// // ColorBasedConcept ///////////////////////////// template struct kth_element_type, K> { using type = ChannelReference; }; template struct kth_element_reference_type < planar_pixel_reference, K > { using type = ChannelReference; }; template struct kth_element_const_reference_type < planar_pixel_reference, K > : std::add_lvalue_reference::type> { // using type = typename channel_traits::const_reference; }; ///////////////////////////// // PixelConcept ///////////////////////////// /// \brief Metafunction predicate that flags planar_pixel_reference as a model of PixelConcept. Required by PixelConcept /// \ingroup PixelModelPlanarRef template struct is_pixel< planar_pixel_reference> : std::true_type {}; ///////////////////////////// // HomogeneousPixelBasedConcept ///////////////////////////// /// \brief Specifies the color space type of a planar pixel reference. Required by PixelBasedConcept /// \ingroup PixelModelPlanarRef template struct color_space_type > { using type = ColorSpace; }; /// \brief Specifies the color space type of a planar pixel reference. Required by PixelBasedConcept /// \ingroup PixelModelPlanarRef template struct channel_mapping_type > { using type = typename layout::channel_mapping_t; }; /// \brief Specifies that planar_pixel_reference represents a planar construct. Required by PixelBasedConcept /// \ingroup PixelModelPlanarRef template struct is_planar> : std::true_type {}; /// \brief Specifies the color space type of a planar pixel reference. Required by HomogeneousPixelBasedConcept /// \ingroup PixelModelPlanarRef template struct channel_type > { using type = typename channel_traits::value_type; }; }} // namespace boost::gil namespace std { // We are forced to define swap inside std namespace because on some platforms (Visual Studio 8) STL calls swap qualified. // swap with 'left bias': // - swap between proxy and anything // - swap between value type and proxy // - swap between proxy and proxy // Having three overloads allows us to swap between different (but compatible) models of PixelConcept /// \brief swap for planar_pixel_reference /// \ingroup PixelModelPlanarRef template inline void swap(const boost::gil::planar_pixel_reference x, R& y) { boost::gil::swap_proxy::value_type>(x,y); } /// \brief swap for planar_pixel_reference /// \ingroup PixelModelPlanarRef template inline void swap(typename boost::gil::planar_pixel_reference::value_type& x, const boost::gil::planar_pixel_reference y) { boost::gil::swap_proxy::value_type>(x,y); } /// \brief swap for planar_pixel_reference /// \ingroup PixelModelPlanarRef template inline void swap(const boost::gil::planar_pixel_reference x, const boost::gil::planar_pixel_reference y) { boost::gil::swap_proxy::value_type>(x,y); } } // namespace std #endif