CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
npstat::FcnFunctor2< Result, Arg1, Arg2 > Struct Template Reference

#include <SimpleFunctors.h>

Inheritance diagram for npstat::FcnFunctor2< Result, Arg1, Arg2 >:
npstat::Functor2< Result, Arg1, Arg2 >

Public Member Functions

 FcnFunctor2 (Result(*fcn)(Arg1, Arg2))
 
Result operator() (const Arg1 &x, const Arg2 &y) const
 
- Public Member Functions inherited from npstat::Functor2< Result, Arg1, Arg2 >
virtual ~Functor2 ()
 

Private Member Functions

 FcnFunctor2 ()=delete
 

Private Attributes

Result(* fcn_ )(Arg1, Arg2)
 

Additional Inherited Members

- Public Types inherited from npstat::Functor2< Result, Arg1, Arg2 >
typedef Arg1 first_argument_type
 
typedef Result result_type
 
typedef Arg2 second_argument_type
 

Detailed Description

template<typename Result, typename Arg1, typename Arg2>
struct npstat::FcnFunctor2< Result, Arg1, Arg2 >

Adaptation for using two-argument functors with simple cmath-style functions. Do not use this struct as a base class.

Definition at line 150 of file SimpleFunctors.h.

Constructor & Destructor Documentation

◆ FcnFunctor2() [1/2]

template<typename Result , typename Arg1 , typename Arg2 >
npstat::FcnFunctor2< Result, Arg1, Arg2 >::FcnFunctor2 ( Result(*)(Arg1, Arg2)  fcn)
inlineexplicit

Definition at line 151 of file SimpleFunctors.h.

151 : fcn_(fcn) {}

◆ FcnFunctor2() [2/2]

template<typename Result , typename Arg1 , typename Arg2 >
npstat::FcnFunctor2< Result, Arg1, Arg2 >::FcnFunctor2 ( )
privatedelete

Member Function Documentation

◆ operator()()

template<typename Result , typename Arg1 , typename Arg2 >
Result npstat::FcnFunctor2< Result, Arg1, Arg2 >::operator() ( const Arg1 &  x,
const Arg2 &  y 
) const
inlinevirtual

Implements npstat::Functor2< Result, Arg1, Arg2 >.

Definition at line 153 of file SimpleFunctors.h.

153 { return fcn_(x, y); }

References npstat::FcnFunctor2< Result, Arg1, Arg2 >::fcn_.

Member Data Documentation

◆ fcn_

template<typename Result , typename Arg1 , typename Arg2 >
Result(* npstat::FcnFunctor2< Result, Arg1, Arg2 >::fcn_) (Arg1, Arg2)
private
DDAxes::y
DDAxes::x
fcn
void fcn(int &, double *, double &, double *, int)
Definition: LASBarrelAlgorithm.cc:388
npstat::FcnFunctor2::fcn_
Result(* fcn_)(Arg1, Arg2)
Definition: SimpleFunctors.h:157