8 #ifndef BOOST_GIL_CONCEPTS_PIXEL_ITERATOR_HPP     9 #define BOOST_GIL_CONCEPTS_PIXEL_ITERATOR_HPP    11 #include <boost/gil/concepts/channel.hpp>    12 #include <boost/gil/concepts/color.hpp>    13 #include <boost/gil/concepts/concept_check.hpp>    14 #include <boost/gil/concepts/fwd.hpp>    15 #include <boost/gil/concepts/pixel.hpp>    16 #include <boost/gil/concepts/pixel_based.hpp>    18 #include <boost/iterator/iterator_concepts.hpp>    22 #include <type_traits>    24 #if defined(BOOST_CLANG)    25 #pragma clang diagnostic push    26 #pragma clang diagnostic ignored "-Wunused-local-typedefs"    29 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)    30 #pragma GCC diagnostic push    31 #pragma GCC diagnostic ignored "-Wunused-local-typedefs"    34 namespace boost { 
namespace gil {
    37 template <
typename It> 
struct const_iterator_type;
    38 template <
typename It> 
struct iterator_is_mutable;
    39 template <
typename It> 
struct is_iterator_adaptor;
    40 template <
typename It, 
typename NewBaseIt> 
struct iterator_adaptor_rebind;
    41 template <
typename It> 
struct iterator_adaptor_get_base;
    49 struct ForwardIteratorIsMutableConcept
    61 struct BidirectionalIteratorIsMutableConcept
    65         gil_function_requires< ForwardIteratorIsMutableConcept<TT>>();
    74 struct RandomAccessIteratorIsMutableConcept
    78         gil_function_requires<BidirectionalIteratorIsMutableConcept<TT>>();
    80         typename std::iterator_traits<TT>::difference_type n = 0;
    81         ignore_unused_variable_warning(n);
    89 template <
typename Iterator>
    90 struct RandomAccessIteratorIsMemoryBasedConcept
    94         std::ptrdiff_t bs = memunit_step(it);
    95         ignore_unused_variable_warning(bs);
    97         it = memunit_advanced(it, 3);
    98         std::ptrdiff_t bd = memunit_distance(it, it);
    99         ignore_unused_variable_warning(bd);
   101         memunit_advance(it,3);
   108 template <
typename Iterator>
   113         gil_function_requires<detail::RandomAccessIteratorIsMutableConcept<Iterator>>();
   115         using ref_t = 
typename std::remove_reference
   117                 typename std::iterator_traits<Iterator>::reference
   120         gil_function_requires<detail::ChannelIsMutableConcept<channel_t>>();
   135 template <
typename T>
   140         using type = 
typename transposed_type<T>::type;
   141         ignore_unused_variable_warning(type{});
   168 template <
typename Iterator>
   173         gil_function_requires<boost_concepts::RandomAccessTraversalConcept<Iterator>>();
   174         gil_function_requires<PixelBasedConcept<Iterator>>();
   176         using value_type = 
typename std::iterator_traits<Iterator>::value_type;
   177         gil_function_requires<PixelValueConcept<value_type>>();
   181         ignore_unused_variable_warning(is_mutable);
   184         const_t const_it(it);
   185         ignore_unused_variable_warning(const_it);
   190     void check_base(std::false_type) {}
   192     void check_base(std::true_type)
   195         gil_function_requires<PixelIteratorConcept<base_t>>();
   207 template <
typename Iterator>
   212         gil_function_requires<PixelIteratorConcept<Iterator>>();
   213         gil_function_requires<detail::PixelIteratorIsMutableConcept<Iterator>>();
   234 template <
typename Iterator>
   239         gil_function_requires<boost_concepts::RandomAccessTraversalConcept<Iterator>>();
   240         gil_function_requires<detail::RandomAccessIteratorIsMemoryBasedConcept<Iterator>>();
   255 template <
typename Iterator>
   260         gil_function_requires<boost_concepts::ForwardTraversalConcept<Iterator>>();
   273 template <
typename Iterator>
   278         gil_function_requires<StepIteratorConcept<Iterator>>();
   279         gil_function_requires<detail::ForwardIteratorIsMutableConcept<Iterator>>();
   315 template <
typename Iterator>
   320         gil_function_requires<boost_concepts::ForwardTraversalConcept<Iterator>>();
   323         gil_function_requires<boost_concepts::ForwardTraversalConcept<base_t>>();
   328         base_t base = it.base();
   329         ignore_unused_variable_warning(base);
   340 template <
typename Iterator>
   345         gil_function_requires<IteratorAdaptorConcept<Iterator>>();
   346         gil_function_requires<detail::ForwardIteratorIsMutableConcept<Iterator>>();
   352 #if defined(BOOST_CLANG)   353 #pragma clang diagnostic pop   356 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)   357 #pragma GCC diagnostic pop metafunction predicate determining whether the given iterator is a plain one or an adaptor over anoth...
Definition: metafunctions.hpp:34
Pixel iterator that allows for changing its pixel.
Definition: concepts/pixel_iterator.hpp:208
Concept of a random-access iterator that can be advanced in memory units (bytes or bits)
Definition: concepts/pixel_iterator.hpp:235
returns the base iterator for a given iterator adaptor. Provide an specialization when introducing ne...
Definition: metafunctions.hpp:35
Iterator adaptor is a forward iterator adapting another forward iterator.
Definition: concepts/pixel_iterator.hpp:316
Step iterator that allows for modifying its current value.
Definition: concepts/pixel_iterator.hpp:274
Specifies the element type of a homogeneous color base.
Definition: color_base_algorithm.hpp:221
Concept for locators and views that can define a type just like the given locator or view,...
Definition: concepts/pixel_iterator.hpp:136
Changes the base iterator of an iterator adaptor. Provide an specialization when introducing new iter...
Definition: pixel_iterator.hpp:36
Iterator adaptor that is mutable.
Definition: concepts/pixel_iterator.hpp:341
Metafunction predicate returning whether the given iterator allows for changing its values.
Definition: pixel_iterator.hpp:49
Definition: concepts/pixel_iterator.hpp:109
An STL random access traversal iterator over a model of PixelConcept.
Definition: concepts/pixel_iterator.hpp:169
Returns the type of an iterator just like the input iterator, except operating over immutable values.
Definition: pixel_iterator.hpp:40
Step iterator concept.
Definition: concepts/pixel_iterator.hpp:256