8#include "Arp/System/Core/Impl/DelegateFunctorBase.hxx"
10namespace Arp {
namespace System {
namespace Core {
namespace Impl
15template <
typename T>
class StaticFunctor;
20template<
class R,
class ...A>
21class StaticFunctor<R(A...)> :
public DelegateFunctorBase<StaticFunctor<R(A...)>>
24 using FunctionPtr = R(*)(A...);
27 StaticFunctor(R(*pFunctionArg)(A...)) : pFunction(pFunctionArg) {}
28 StaticFunctor(
const StaticFunctor& arg) =
default;
29 StaticFunctor& operator=(
const StaticFunctor& arg) =
default;
30 virtual ~StaticFunctor(
void)
noexcept =
default;
33 template<
class ...Args>
34 static R Invoke(
void* pThis, Args&& ... args)
36 return static_cast<StaticFunctor*
>(pThis)->pFunction(std::forward<Args>(args)...);
40 bool Equals(
const StaticFunctor& other)
override
42 return this->pFunction == other.pFunction;
46 FunctionPtr pFunction;
@ Equals
Start recording if TriggerVariable1 is equal to TriggerVariable2.
Root namespace for the PLCnext API