CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
RangeSelector< T, fun > Struct Template Reference

#include <RangeSelector.h>

Public Member Functions

bool operator() (const T &t) const
 
 RangeSelector (double min, double max)
 

Private Attributes

double max_
 
double min_
 

Detailed Description

template<typename T, double(T::*)() const fun>
struct RangeSelector< T, fun >

Definition at line 12 of file RangeSelector.h.

Constructor & Destructor Documentation

template<typename T , double(T::*)() const fun>
RangeSelector< T, fun >::RangeSelector ( double  min,
double  max 
)
inline

Member Function Documentation

template<typename T , double(T::*)() const fun>
bool RangeSelector< T, fun >::operator() ( const T t) const
inline

Definition at line 14 of file RangeSelector.h.

References RangeSelector< T, fun >::max_, RangeSelector< T, fun >::min_, and x.

14  {
15  double x = (t.*fun)();
16  return min_ <= x && x <= max_;
17  }

Member Data Documentation

template<typename T , double(T::*)() const fun>
double RangeSelector< T, fun >::max_
private

Definition at line 20 of file RangeSelector.h.

Referenced by RangeSelector< T, fun >::operator()().

template<typename T , double(T::*)() const fun>
double RangeSelector< T, fun >::min_
private

Definition at line 20 of file RangeSelector.h.

Referenced by RangeSelector< T, fun >::operator()().