2 #ifndef AFW_TABLE_DETAIL_SchemaMapperImpl_h_INCLUDED
3 #define AFW_TABLE_DETAIL_SchemaMapperImpl_h_INCLUDED
8 #include "boost/variant.hpp"
9 #include "boost/mpl/transform.hpp"
10 #include "boost/type_traits/remove_const.hpp"
11 #include "boost/type_traits/remove_reference.hpp"
17 namespace lsst {
namespace afw {
namespace table {
44 typedef boost::mpl::transform<FieldTypes,MakeKeyPair>::type
KeyPairTypes;
64 _func(pair.first, pair.second);
77 boost::apply_visitor(*
this, v);
101 #endif // !AFW_TABLE_DETAIL_SchemaMapperImpl_h_INCLUDED
Defines the fields and offsets for a table.
A functor-wrapper used in the implementation of SchemaMapper::forEach.
void operator()(std::pair< Key< T >, Key< T > > const &pair) const
Call the wrapped function.
A mapping between the keys of two Schemas, used to copy data between them.
Boost.MPL metafunction that returns a std::pair< Key<T>, Key<T> > given a T.
A private implementation class to hide the messy details of SchemaMapper.
boost::make_variant_over< KeyPairTypes >::type KeyPairVariant
A Boost.Variant type that can hold any one of the allowed pair types.
SchemaMapperImpl(Schema const &input, Schema const &output)
Constructor from the given input and output schemas.
std::vector< KeyPairVariant > KeyPairMap
A std::vector whose elements can be any of the allowed pair types.
std::pair< Key< T >, Key< T > > type
A class used as a handle to a particular field in a table.
VisitorWrapper(F func)
Construct the wrappper.
boost::mpl::transform< FieldTypes, MakeKeyPair >::type KeyPairTypes
An MPL sequence of all the allowed pair templates.
void operator()(KeyPairVariant const &v) const
Invoke the visitation.