Adobe Systems, Inc.

metafunctions.hpp File Reference

metafunctions that construct types or return type properties More...

#include <iterator>
#include "gil_config.hpp"
#include "gil_concept.hpp"
#include <boost/mpl/if.hpp>
#include <boost/type_traits.hpp>

Go to the source code of this file.


Classes

struct  color_space_is_base< CS >
 Determines if a color space is base or derived. Derived color spaces represent permutations of the channels of a base color space. More...
struct  derived_image_type< IMAGE, T, CS, PLANAR >
 Constructs an image type from a source image type by changing some of the properties.

Use gil::use_default for the properties of the source image that you want to keep. More...

struct  derived_view_type< VIEW, T, CS, PLANAR, STEP, MUTABLE >
 Constructs an image view type from a source view type by changing some of the properties.

Use gil::use_default for the properties of the source view that you want to keep. More...

struct  image_is_basic< IMG >
struct  image_is_basic< image< VIEW, std::allocator< unsigned char > > >
 Basic images must use basic views and std::allocator of char. More...
struct  image_is_planar< I >
struct  image_type< T, C, IS_PLANAR, ALLOC >
 Returns the type of an image given the channel type, color space tag and whether it operates on planar data. More...
struct  iterator_is_basic< IT >
 Determines if a given pixel iterator is basic Basic iterators must use gil::pixel (if interleaved), gil::planar_ptr (if planar) and gil::pixel_step_iterator (if step). They must use the standard constness rules. More...
struct  iterator_is_basic< const pixel< T, CS > * >
 immutable interleaved More...
struct  iterator_is_basic< pixel< T, CS > * >
 mutable interleaved More...
struct  iterator_is_basic< pixel_step_iterator< const pixel< T, CS > * > >
 immutable interleaved step More...
struct  iterator_is_basic< pixel_step_iterator< pixel< T, CS > * > >
 mutable interleaved step More...
struct  iterator_is_basic< pixel_step_iterator< planar_ptr< const T *, CS > > >
 immutable planar step More...
struct  iterator_is_basic< pixel_step_iterator< planar_ptr< T *, CS > > >
 mutable planar step More...
struct  iterator_is_basic< planar_ptr< const T *, CS > >
 immutable planar More...
struct  iterator_is_basic< planar_ptr< T *, CS > >
 mutable planar More...
struct  iterator_is_mutable< I >
struct  iterator_is_planar< I >
struct  iterator_is_step< I >
struct  iterator_type< T, C, IS_PLANAR, IS_STEP, IS_MUTABLE >
 Returns the type of an iterator given the channel type, color space tag, whether it operates on planar data and whether it is a step iterator. More...
struct  iterator_type< T, C, false, false, false >
struct  iterator_type< T, C, false, false, true >
struct  iterator_type< T, C, IS_PLANAR, true, IS_MUTABLE >
struct  iterator_type< T, C, true, false, false >
struct  iterator_type< T, C, true, false, true >
struct  locator_is_basic< LOC >
struct  locator_is_basic< pixel_2d_locator< pixel_step_iterator< IT > > >
 Basic locators must be over step iterators of basic iterators. More...
struct  locator_is_mutable< L >
struct  locator_is_planar< L >
struct  locator_is_step< L >
struct  pixel_2d_locator_type< T, C, IS_PLANAR, IS_STEP, IS_MUTABLE >
 Returns the type of a locator given the channel type, color space tag, whether it operates on planar data and whether it has a step horizontally. More...
struct  type_from_x_iterator< X_IT >
 Given a pixel iterator defining access to pixels along a row, returns the types of the correspnding built-in step_iterator, xy_locator, image_view. More...
struct  use_default
struct  view_is_basic< VIEW >
struct  view_is_basic< image_view< LOC > >
 Basic views must be over basic locators. More...
struct  view_is_mutable< V >
struct  view_is_planar< V >
struct  view_is_step< V >
struct  view_type< T, C, IS_PLANAR, IS_STEP, IS_MUTABLE >
 Returns the type of a view given the channel type, color space tag, whether it operates on planar data and whether it has a step horizontally. More...

make_step_iterator

Constructs a step iterator from a base iterator and a step.

To construct a step iterator from a given iterator IT and a given step, if IT does not already have a dynamic step, we wrap it in a pixel_step_iterator. Otherwise we do a compile-time traversal of the chain of iterator adaptors to locate the step iterator and then set it step to the new one.

The step iterator of IT is not always pixel_step_iterator<IT>. For example, IT may already be a pixel step iterator, in which case it will be inefficient to stack them; we can obtain the same result by multiplying their steps. Note that for IT to be a step iterator it does not necessarily have to have the form pixel_step_iterator<J>. The step iterator can be wrapped inside another iterator. Also, it may not have the type pixel_step_iterator, but it could be a user-provided type. We know that IT is a step iterator if iterator_is_step<IT>() is true.

template<typename I>
pixel_iterator_traits< I
>::dynamic_step_t 
make_step_iterator (const pixel_step_iterator< I > &it, std::ptrdiff_t step)
template<typename IC, typename C>
pixel_step_iterator< planar_ptr<
IC, C > > 
make_step_iterator (const planar_ptr< IC, C > &it, std::ptrdiff_t step)
template<typename T, typename C>
pixel_step_iterator< const
pixel< T, C > * > 
make_step_iterator (const pixel< T, C > *it, std::ptrdiff_t step)
template<typename T, typename C>
pixel_step_iterator< pixel<
T, C > * > 
make_step_iterator (pixel< T, C > *it, std::ptrdiff_t step)
template<typename I>
pixel_iterator_traits< I
>::dynamic_step_t 
make_step_iterator (const I &it, std::ptrdiff_t step)

Detailed Description

Author:
Lubomir Bourdev and Hailin Jin
Adobe Systems Incorporated

Definition in file metafunctions.hpp.

Copyright © 2006 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google