Boost GIL


Namespaces | Macros | Functions
dynamic_at_c.hpp File Reference

Constructs for static-to-dynamic integer convesion. More...

#include "../../gil_config.hpp"
#include <cassert>
#include <stdexcept>
#include <boost/mpl/at.hpp>
#include <boost/mpl/size.hpp>

Go to the source code of this file.

Namespaces

 boost
 Pixel 2D LOCATOR.
 

Macros

#define GIL_AT_C_VALUE(z, N, text)   mpl::at_c<IntTypes,S+N>::type::value,
 
#define GIL_DYNAMIC_AT_C_LIMIT   226
 
#define GIL_AT_C_LOOKUP(z, NUM, text)
 

Functions

template<typename IntTypes , typename ValueType >
ValueType at_c (std::size_t index)
 Given an MPL Random Access Sequence and a dynamic index n, returns the value of the n-th element It constructs a lookup table at compile time.
 

Detailed Description

Constructs for static-to-dynamic integer convesion.

Author
Lubomir Bourdev and Hailin Jin
Adobe Systems Incorporated
Date
2005-2007
Last updated on May 4, 2006

Macro Definition Documentation

#define GIL_AT_C_LOOKUP (   z,
  NUM,
  text 
)
Value:
template<std::size_t S> \
struct at_c_fn<S,NUM> { \
template <typename IntTypes, typename ValueType> inline \
static ValueType apply(std::size_t index) { \
static ValueType table[] = { \
BOOST_PP_REPEAT(NUM, GIL_AT_C_VALUE, BOOST_PP_EMPTY) \
}; \
return table[index]; \
} \
};