8#include "Arp/System/Core/Impl/DelegateFunctorBase.hxx"
10namespace Arp {
namespace System {
namespace Core {
namespace Impl
14template <
typename T>
class ConstMethodFunctor;
19template<
class C,
class R,
class ...A>
20class ConstMethodFunctor<R(C::*)(A...)const> :
public DelegateFunctorBase<ConstMethodFunctor<R(C::*)(A...)const>>
23 using MethodPtr = R(C::*)(A...)
const;
26 ConstMethodFunctor(
const C* pObjectArg, R(C::*pMethodArg)(A...)const) : pObject(pObjectArg), pMethod(pMethodArg) {}
27 ConstMethodFunctor(
const C& objectArg, R(C::*pMethodArg)(A...)const) : pObject(&objectArg), pMethod(pMethodArg) {}
28 ConstMethodFunctor(
const ConstMethodFunctor& arg) =
default;
29 ConstMethodFunctor& operator=(
const ConstMethodFunctor& arg) =
default;
30 ~ConstMethodFunctor(
void)
noexcept override =
default;
33 template<
class ...Args>
34 static R Invoke(
void* pArg, Args&& ...args)
36 ConstMethodFunctor* pThis =
static_cast<ConstMethodFunctor*
>(pArg);
37 return ((pThis->pObject)->*(pThis->pMethod))(std::forward<Args>(args)...);
41 bool Equals(
const ConstMethodFunctor& other)
override
43 return this->pObject == other.pObject && this->pMethod == other.pMethod;
@ Equals
Start recording if TriggerVariable1 is equal to TriggerVariable2.
Root namespace for the PLCnext API