lsst.afw  20.0.0-6-g4dd452d24+1caa149b74
Public Member Functions | List of all members
lsst::afw::table::detail::SchemaMapperImpl::VisitorWrapper< F > Struct Template Reference

A functor-wrapper used in the implementation of SchemaMapper::forEach. More...

#include <SchemaMapperImpl.h>

Inheritance diagram for lsst::afw::table::detail::SchemaMapperImpl::VisitorWrapper< F >:

Public Member Functions

template<typename T >
void operator() (std::pair< Key< T >, Key< T > > const &pair) const
 Call the wrapped function. More...
 
void operator() (KeyPairVariant const &v) const
 Invoke the visitation. More...
 
template<typename T >
 VisitorWrapper (T &&func)
 Construct the wrappper. More...
 

Detailed Description

template<typename F>
struct lsst::afw::table::detail::SchemaMapperImpl::VisitorWrapper< F >

A functor-wrapper used in the implementation of SchemaMapper::forEach.

See SchemaImpl::VisitorWrapper for discussion of the motivation.

Definition at line 54 of file SchemaMapperImpl.h.

Constructor & Destructor Documentation

◆ VisitorWrapper()

template<typename F >
template<typename T >
lsst::afw::table::detail::SchemaMapperImpl::VisitorWrapper< F >::VisitorWrapper ( T &&  func)
inlineexplicit

Construct the wrappper.

Definition at line 74 of file SchemaMapperImpl.h.

Member Function Documentation

◆ operator()() [1/2]

template<typename F >
void lsst::afw::table::detail::SchemaMapperImpl::VisitorWrapper< F >::operator() ( KeyPairVariant const &  v) const
inline

Invoke the visitation.

The call to boost::apply_visitor will call the appropriate template of operator().

This overload allows a VisitorWrapper to be applied directly on a variant object with function-call syntax, allowing us to use it on our vector of variants with std::for_each and other STL algorithms.

Definition at line 70 of file SchemaMapperImpl.h.

◆ operator()() [2/2]

template<typename F >
template<typename T >
void lsst::afw::table::detail::SchemaMapperImpl::VisitorWrapper< F >::operator() ( std::pair< Key< T >, Key< T > > const &  pair) const
inline

Call the wrapped function.

Definition at line 57 of file SchemaMapperImpl.h.


The documentation for this struct was generated from the following file: