PLCnext API Documentation  22.9.0.33
Classes | Functions
Delegate

Classes

class  Arp::delegate< R(A...)>
 This class represents a delegate, that is a compound of an object reference and a member function pointer. The generic type of a delegate just depends on the signature of the (member) function pointer but not on the type of the object on which the member function pointer is invoked. More...
 

Functions

template<class R , class ... A>
delegate< R(A...)> Arp::make_delegate (R(*const function_ptr)(A...)) noexcept
 Creates a delegate from a static function. More...
 
template<class C , class R , class ... A>
delegate< R(A...)> Arp::make_delegate (C *const pObject, R(C::*const pMethod)(A...)) noexcept
 Creates a delegate from a member function and object pointer. More...
 
template<class C , class R , class ... A>
delegate< R(A...)> Arp::make_delegate (C const *const pObject, R(C::*const pMethod)(A...) const) noexcept
 Creates a delegate from a member function and object pointer. More...
 
template<class C , class R , class ... A>
delegate< R(A...)> Arp::make_delegate (C &object, R(C::*const pMethod)(A...)) noexcept
 Creates a delegate from a const member function and const object reference. More...
 
template<class C , class R , class ... A>
delegate< R(A...)> Arp::make_delegate (const C &object, R(C::*const pMethod)(A...) const) noexcept
 Creates a delegate from a const member function and const object reference. More...
 
template<class R , class ... A>
delegate< R(A...)> Arp::make_delegate (std::function< R(A...)> &&f) noexcept
 Creates a delegate from a lambda expression or std::function. More...
 
template<class R , class ... A>
delegate< R(A...)> Arp::make_delegate (const std::function< R(A...)> &f) noexcept
 Creates a delegate from a lambda expression or std::function. More...
 

Detailed Description

Function Documentation

◆ make_delegate() [1/7]

template<class C , class R , class ... A>
delegate<R(A...)> Arp::make_delegate ( C &  object,
R(C::*)(A...)  pMethod 
)
inlinenoexcept

Creates a delegate from a const member function and const object reference.

Parameters
pMethodThe member function to invoke.
objectThe object to invoke the member function on.
Returns
The new create delegate initialized by the given arguments.

◆ make_delegate() [2/7]

template<class C , class R , class ... A>
delegate<R(A...)> Arp::make_delegate ( C *const  pObject,
R(C::*)(A...)  pMethod 
)
inlinenoexcept

Creates a delegate from a member function and object pointer.

Parameters
pMethodThe member function to invoke.
pObjectThe object pointer to invoke the member function on.
Returns
The new create delegate initialized by the given arguments.

◆ make_delegate() [3/7]

template<class C , class R , class ... A>
delegate<R(A...)> Arp::make_delegate ( C const *const  pObject,
R(C::*)(A...) const  pMethod 
)
inlinenoexcept

Creates a delegate from a member function and object pointer.

Parameters
pMethodThe member function to invoke.
pObjectThe object pointer to invoke the member function on.
Returns
The new create delegate initialized by the given arguments.

◆ make_delegate() [4/7]

template<class C , class R , class ... A>
delegate<R(A...)> Arp::make_delegate ( const C &  object,
R(C::*)(A...) const  pMethod 
)
inlinenoexcept

Creates a delegate from a const member function and const object reference.

Parameters
pMethodThe member function to invoke.
objectThe object to invoke the member function on.
Returns
The new create delegate initialized by the given arguments.

◆ make_delegate() [5/7]

template<class R , class ... A>
delegate<R(A...)> Arp::make_delegate ( const std::function< R(A...)> &  f)
inlinenoexcept

Creates a delegate from a lambda expression or std::function.

Parameters
fThe function to invoke.
Returns
The new create delegate initialized by the given arguments.

◆ make_delegate() [6/7]

template<class R , class ... A>
delegate<R(A...)> Arp::make_delegate ( R(*)(A...)  function_ptr)
inlinenoexcept

Creates a delegate from a static function.

Parameters
function_ptrThe static function to invoke.
Returns
The new create delegate initialized by the given arguments.

◆ make_delegate() [7/7]

template<class R , class ... A>
delegate<R(A...)> Arp::make_delegate ( std::function< R(A...)> &&  f)
inlinenoexcept

Creates a delegate from a lambda expression or std::function.

Parameters
fThe function to invoke.
Returns
The new create delegate initialized by the given arguments.