jaulib v1.3.0
Jau Support Library (C++, Java, ..)
Classes | Public Types | Static Public Member Functions | List of all members
jau::func::member_target_t< R, C0, C1, A > Class Template Referencefinal

func::member_target_t implementation for class member functions, identifiable as func::target_type::member via jau::function<R(A...)>::type(). More...

#include <functional.hpp>

Collaboration diagram for jau::func::member_target_t< R, C0, C1, A >:

Public Types

typedef delegate_t< R, A... > delegate_type
 

Static Public Member Functions

static delegate_type delegate (C1 *base, R(C0::*method)(A...), std::enable_if_t< std::is_base_of_v< C0, C1 >, bool >=true) noexcept
 Construct a delegate_t<R, A...> instance from given this base-pointer and member-function. More...
 

Detailed Description

template<typename R, typename C0, typename C1, typename... A>
class jau::func::member_target_t< R, C0, C1, A >

func::member_target_t implementation for class member functions, identifiable as func::target_type::member via jau::function<R(A...)>::type().

Template Parameters
Rfunction return type
C0class type holding the member-function
C1class derived from C0 or C0 of this base-pointer used to invoke the member-function
Afunction arguments
See also
Function Overview

Definition at line 783 of file functional.hpp.

Member Typedef Documentation

◆ delegate_type

template<typename R , typename C0 , typename C1 , typename... A>
typedef delegate_t<R, A...> jau::func::member_target_t< R, C0, C1, A >::delegate_type

Definition at line 785 of file functional.hpp.

Member Function Documentation

◆ delegate()

template<typename R , typename C0 , typename C1 , typename... A>
static delegate_type jau::func::member_target_t< R, C0, C1, A >::delegate ( C1 base,
R(C0::*)(A...)  method,
std::enable_if_t< std::is_base_of_v< C0, C1 >, bool >  = true 
)
inlinestaticnoexcept

Construct a delegate_t<R, A...> instance from given this base-pointer and member-function.

This factory function is only enabled if C0 is base of C1.

Parameters
basethis base-pointer of class C1 derived from C0 or C0 used to invoke the member-function
methodmember-function of class C0
Returns
delegate_t<R, A...> instance holding the target-function object.

Definition at line 865 of file functional.hpp.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: