1#ifndef DCHAIN_DCSIMPLESELECTOR_H
2#define DCHAIN_DCSIMPLESELECTOR_H
59#include "DecayChain/Function/DCSelectionFunction.h"
76 MethodAnd(
const LHS& iLHS,
const RHS& iRHS ) : m_lhs( iLHS ), m_rhs( iRHS ) {}
80 bool select( Arg& iArg ) {
return m_lhs.select( iArg ) && m_rhs.select( iArg ); }
94 MethodOr(
const LHS& iLHS,
const RHS& iRHS ) : m_lhs( iLHS ), m_rhs( iRHS ) {}
97 bool select( Arg& iArg ) {
return m_lhs.select( iArg ) || m_rhs.select( iArg ); }
113 bool select( Arg& iArg ) {
return m_selector( iArg ); }
170 template <
class T1,
class T2>
struct ChooseArg<T1, T2, false> {
201 template <
class LHS,
class RHS>
207 template <
class LHS,
class RHS>
213 template <
class LHS,
class RHS>
227 template <
class LHS,
class RHS>
233 template <
class LHS,
class RHS>
239 template <
class LHS,
class RHS>
250 bool select( Arg& iArg ) {
return m_method.select( iArg ); }
275 if ( 0 != m_method ) {
return m_method->select( iArg ); }
280 if ( 0 != iCopy.m_method ) { m_method = iCopy.m_method->clone(); }
294 m_method = iOther.m_method;
295 iOther.m_method = temp;
void swap(DataList< T > lhs, DataList< T > rhs)
const DCSimpleSelector< Arg > & operator=(const DCSimpleSelector< Arg > &iRHS)
virtual bool operator()(Arg &iArg)
DCSimpleSelector(const DChain::MethodBase< Arg > &iMethod)
DCSimpleSelector(const DCSimpleSelector< Arg > &iCopy)
virtual ~DCSimpleSelector()
DCSimpleSelector(const T &iMethod)
MethodAdapter(const MethodT &iMethod)
MethodBase< Arg > * clone() const
MethodAnd(const LHS &iLHS, const RHS &iRHS)
MethodBase< Arg > * clone() const
virtual bool select(Arg &)=0
virtual MethodBase * clone() const =0
MethodHolder(DCSelectionFunction< Arg > &iSelector)
MethodBase< Arg > * clone() const
MethodOr(const LHS &iLHS, const RHS &iRHS)
MethodBase< Arg > * clone() const
UseHolder< T,(sizeof(testForHolder((T *) 0))==sizeof(PassTest))>::Method Method
Method::arg_type arg_type
ChooseArg< T1, T2,(sizeof(PickArgTester< T1, T2 >::inheritsFrom((T1 *) 0))==sizeof(PassTest))>::arg_type arg_type
static PassTest inheritsFrom(const T2 *)
static FailTest inheritsFrom(...)
Method::arg_type arg_type
MethodHolder< typename T::arg_type > Method
OrOpReturn< LHS, RHS >::Return operator||(LHS &iLHS, RHS &iRHS)
PassTest testForHolder(const DCSelectionFunction< Arg > *)
AndOpReturn< LHS, RHS >::Return operator&&(LHS &iLHS, RHS &iRHS)
MethodAnd< typename MethodType< LHS >::Method, typename MethodType< RHS >::Method, typename PickArg< typename MethodType< LHS >::arg_type, typename MethodType< RHS >::arg_type >::arg_type > Return
MethodOr< typename MethodType< LHS >::Method, typename MethodType< RHS >::Method, typename PickArg< typename MethodType< LHS >::arg_type, typename MethodType< RHS >::arg_type >::arg_type > Return
static PassTest inheritsFrom(const T2 *)
static FailTest inheritsFrom(...)