Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Classes | Public Types | Public Member Functions | 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>

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

Public Types

typedef delegate_t< R, A... > delegate_type
 

Public Member Functions

 member_target_t (C1 *_base, R(C0::*_member)(A...), std::enable_if_t< std::is_base_of_v< C0, C1 >, bool >=true) noexcept
 Construct a target_t<R, A...> instance from given this base-pointer and member-function. More...
 
operator() (A... args) override
 
bool operator== (const target_t< R, A... > &rhs) const noexcept override
 
- Public Member Functions inherited from jau::func::target_t< R, A... >
 target_t (const target_t &o) noexcept=default
 
 target_t (target_t &&o) noexcept=default
 
virtual ~target_t () noexcept
 
virtual R operator() (A... args)=0
 
target_toperator= (const target_t &o) noexcept=default
 
target_toperator= (target_t &&o) noexcept=default
 
virtual bool operator== (const target_t< R, A... > &rhs) const noexcept=0
 
constexpr target_type type () const noexcept
 Return the func::target_type of this invocation function wrapper. More...
 

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...
 

Additional Inherited Members

- Protected Member Functions inherited from jau::func::target_t< R, A... >
 target_t (target_type ttype_) noexcept
 

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.

Constructor & Destructor Documentation

◆ member_target_t()

template<typename R , typename C0 , typename C1 , typename... A>
jau::func::member_target_t< R, C0, C1, A >::member_target_t ( C1 _base,
R(C0::*)(A...)  _member,
std::enable_if_t< std::is_base_of_v< C0, C1 >, bool >  = true 
)
inlinenoexcept

Construct a target_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
_membermember-function of class C0
Returns
target_t<R, A...> instance holding the target-function details.

Definition at line 378 of file functional2.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:

◆ operator()()

template<typename R , typename C0 , typename C1 , typename... A>
R jau::func::member_target_t< R, C0, C1, A >::operator() ( A...  args)
inlineoverridevirtual

Implements jau::func::target_t< R, A... >.

Definition at line 383 of file functional2.hpp.

◆ operator==()

template<typename R , typename C0 , typename C1 , typename... A>
bool jau::func::member_target_t< R, C0, C1, A >::operator== ( const target_t< R, A... > &  rhs) const
inlineoverridevirtualnoexcept

Implements jau::func::target_t< R, A... >.

Definition at line 387 of file functional2.hpp.


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