114class Dispatcher1Function:
public Dispatcher1<P1>
118 typedef FunctionType TFunction;
119 typedef Dispatcher1Function<P1, FunctionType, Enable> TSelf;
121 Dispatcher1Function(
typename CallTraits<TFunction>::TParam iFunction):
126 const TFunction& function()
const
133 void doCall(
typename util::CallTraits<P1>::TParam iP1)
const override
142 bool doIsEquivalent(
const Dispatcher1<P1>* other)
const override
144 if constexpr (impl::IsEqualityComparable<TFunction>::value)
146 return other &&
typeid( *other ) ==
typeid( TSelf )
147 &&
static_cast<const TSelf*
>(other)->function_ == function_;
170class Dispatcher1Method:
public Dispatcher1<P1>
174 typedef Dispatcher1Method<P1, ObjectPtr, Method> TSelf;
176 Dispatcher1Method(
typename CallTraits<ObjectPtr>::TParam iObject,
177 typename CallTraits<Method>::TParam iMethod):
185 void doCall(
typename util::CallTraits<P1>::TParam iP1)
const override
187 if (!object_ || !method_)
191 ((*object_).*method_)(iP1);
194 bool doIsEquivalent(
const Dispatcher1<P1>* iOther)
const override
196 const TSelf* other =
dynamic_cast<const TSelf*
>(iOther);
197 return other && object_ == other->object_ && method_ == other->method_;