Molassembler  1.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Scine::Molassembler::Temple::Functor Namespace Reference

Functors for transformations. More...

Data Structures

struct  Map
 
struct  Identity
 Metafunction required for default arguments. More...
 
struct  At
 Metafunction calling at on a bound container. More...
 
struct  IndexIn
 Metafunction determining the index of an item in a bound container. More...
 
struct  Get
 Metafunction calling std::get on an argument with a bound index. More...
 

Functions

template<typename Transformation >
auto map (Transformation &&t)
 
template<class Container >
auto at (Container &&container)
 Make functor calling at on arguments. More...
 
template<class Container >
auto indexIn (Container &&container)
 Make functor determining the index of an item in a bound container. More...
 
template<unsigned i>
constexpr auto get ()
 Make functor calling std::get with particular index on an argument. More...
 

Variables

constexpr Get< 0 > first
 Calls std::get<0> on any argument it is invoked with.
 
constexpr Get< 1 > second
 Calls std::get<1> on any argument it is invoked with.
 

Detailed Description

Functors for transformations.

Function Documentation

template<class Container >
auto Scine::Molassembler::Temple::Functor::at ( Container &&  container)

Make functor calling at on arguments.

Parameters
containercontainer to bind
Returns
functor invokable with index type
template<unsigned i>
constexpr auto Scine::Molassembler::Temple::Functor::get ( )

Make functor calling std::get with particular index on an argument.

Template Parameters
iIndex of get to use
Returns
Functor invokable with everything you can call std::get on
template<class Container >
auto Scine::Molassembler::Temple::Functor::indexIn ( Container &&  container)

Make functor determining the index of an item in a bound container.

Parameters
containercontainer to bind
Returns
functor invokable with index type