CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

npstat::FcnFunctor1< Result, Arg1 > Struct Template Reference

#include <SimpleFunctors.h>

Inheritance diagram for npstat::FcnFunctor1< Result, Arg1 >:
npstat::Functor1< Result, Arg1 >

List of all members.

Public Member Functions

 FcnFunctor1 (Result(*fcn)(Arg1))
Result operator() (const Arg1 &a) const

Private Member Functions

 FcnFunctor1 ()

Private Attributes

Result(* fcn_ )(Arg1)

Detailed Description

template<typename Result, typename Arg1>
struct npstat::FcnFunctor1< Result, Arg1 >

Adaptation for using single-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

template<typename Result , typename Arg1 >
npstat::FcnFunctor1< Result, Arg1 >::FcnFunctor1 ( Result(*)(Arg1)  fcn) [inline, explicit]

Definition at line 152 of file SimpleFunctors.h.

: fcn_(fcn) {}
template<typename Result , typename Arg1 >
npstat::FcnFunctor1< Result, Arg1 >::FcnFunctor1 ( ) [private]

Member Function Documentation

template<typename Result , typename Arg1 >
Result npstat::FcnFunctor1< Result, Arg1 >::operator() ( const Arg1 &  a) const [inline, virtual]

Implements npstat::Functor1< Result, Arg1 >.

Definition at line 154 of file SimpleFunctors.h.

References npstat::FcnFunctor1< Result, Arg1 >::fcn_.

{return fcn_(a);}

Member Data Documentation

template<typename Result , typename Arg1 >
Result(* npstat::FcnFunctor1< Result, Arg1 >::fcn_)(Arg1) [private]

Definition at line 158 of file SimpleFunctors.h.

Referenced by npstat::FcnFunctor1< Result, Arg1 >::operator()().