Boost GIL


Namespaces | Macros | Functions
apply_operation_base.hpp File Reference

Given an object with run-time specified type (denoted as an array of Bits, dynamic index, and a static set of Types) and a generic operation, casts the object to its appropriate type and applies the operation. More...

#include "../../gil_config.hpp"
#include "../../utilities.hpp"
#include <boost/mpl/begin.hpp>
#include <boost/mpl/next.hpp>
#include <boost/mpl/deref.hpp>
#include <boost/mpl/size.hpp>
#include <boost/preprocessor/repeat.hpp>

Go to the source code of this file.

Namespaces

 boost
 Pixel 2D LOCATOR.
 

Macros

#define GIL_FWD_TYPEDEFS(z, N, text)   T##N; typedef typename mpl::next<T##N>::type
 
#define GIL_FWD_CASE(z, N, SUM)   case N: return op(*gil_reinterpret_cast<typename mpl::deref<T##N>::type*>(&bits));
 
#define GIL_FWD_CONST_CASE(z, N, SUM)   case N: return op(*gil_reinterpret_cast_c<const typename mpl::deref<T##N>::type*>(&bits));
 
#define GIL_FWD_CASE_WITH_INFO(z, N, SUM)   case N: return op(*gil_reinterpret_cast<typename mpl::deref<T##N>::type*>(&bits), info);
 
#define GIL_FWD_CONST_CASE_WITH_INFO(z, N, SUM)   case N: return op(*gil_reinterpret_cast_c<const typename mpl::deref<T##N>::type*>(&bits), info);
 
#define GIL_APPLY_FWD_OP(z, N, text)
 
#define GIL_GENERATE_APPLY_FWD_OPS(N)   BOOST_PP_REPEAT(N, GIL_APPLY_FWD_OP, BOOST_PP_EMPTY)
 

Functions

template<typename Types , typename Bits , typename Op >
Op::result_type BOOST_FORCEINLINE apply_operation_basec (const Bits &bits, std::size_t index, Op op)
 
template<typename Types , typename Bits , typename Op >
Op::result_type BOOST_FORCEINLINE apply_operation_base (Bits &bits, std::size_t index, Op op)
 
template<typename Types1 , typename Types2 , typename Bits1 , typename Bits2 , typename Op >
static Op::result_type
BOOST_FORCEINLINE 
apply_operation_base (const Bits1 &bits1, std::size_t index1, const Bits2 &bits2, std::size_t index2, Op op)
 

Detailed Description

Given an object with run-time specified type (denoted as an array of Bits, dynamic index, and a static set of Types) and a generic operation, casts the object to its appropriate type and applies the operation.

Author
Lubomir Bourdev and Hailin Jin
Adobe Systems Incorporated
Date
2005-2007
Last updated on November 6, 2007