BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bdlf::Bind_MemFnObjectWrapper< t_TYPE > Class Template Reference

#include <bdlf_bind.h>

Detailed Description

template<class t_TYPE>
class bdlf::Bind_MemFnObjectWrapper< t_TYPE >

This local class is used to wrap an object used to invoke a member functions bound to a Bind binder. In explicit binding, the argument types of operator() are determined during Bind instantiation. If a member function is bound to the binder, and the object to invoke the member function on is passed as an invocation argument (instead of a bound argument), the exact type of the object - whether it is a pointer or reference - cannot be determined based on the method signature. This wrapper serve as an intermediate type to wrap around the object pointer or reference. This class is declared to have pointer semantics, such that MemFn will properly dereference the object to invoke the member function.

See bdlf_bind

Public Member Functions

 BSLMF_NESTED_TRAIT_DECLARATION (Bind_MemFnObjectWrapper, bslmf::HasPointerSemantics)
 
 BSLMF_NESTED_TRAIT_DECLARATION (Bind_MemFnObjectWrapper, bslmf::IsBitwiseMoveable)
 
template<class t_ARG_TYPE >
 Bind_MemFnObjectWrapper (t_ARG_TYPE &object)
 
template<class t_ARG_TYPE >
 Bind_MemFnObjectWrapper (BSLMF_MOVABLEREF_DEDUCE(t_ARG_TYPE) object)
 
t_TYPE & operator* () const
 

Constructor & Destructor Documentation

◆ Bind_MemFnObjectWrapper() [1/2]

template<class t_TYPE >
template<class t_ARG_TYPE >
bdlf::Bind_MemFnObjectWrapper< t_TYPE >::Bind_MemFnObjectWrapper ( t_ARG_TYPE &  object)
inline

If the c'tor argument has pointer sematics to 't_TYPE', perform '&*' on it to initialize 'd_object_p', otherwise take its address to initialize 'd_object_p'.

Note
Note that 't_TYPE' and/or 't_ARG_TYPE' may be 'const', though a compilation error will result if 't_ARG_TYPE' is 'const' and 't_TYPE' is not.

◆ Bind_MemFnObjectWrapper() [2/2]

template<class t_TYPE >
template<class t_ARG_TYPE >
bdlf::Bind_MemFnObjectWrapper< t_TYPE >::Bind_MemFnObjectWrapper ( BSLMF_MOVABLEREF_DEDUCE(t_ARG_TYPE)  object)
inline

Member Function Documentation

◆ BSLMF_NESTED_TRAIT_DECLARATION() [1/2]

template<class t_TYPE >
bdlf::Bind_MemFnObjectWrapper< t_TYPE >::BSLMF_NESTED_TRAIT_DECLARATION ( Bind_MemFnObjectWrapper< t_TYPE >  ,
bslmf::HasPointerSemantics   
)

◆ BSLMF_NESTED_TRAIT_DECLARATION() [2/2]

template<class t_TYPE >
bdlf::Bind_MemFnObjectWrapper< t_TYPE >::BSLMF_NESTED_TRAIT_DECLARATION ( Bind_MemFnObjectWrapper< t_TYPE >  ,
bslmf::IsBitwiseMoveable   
)

◆ operator*()

template<class t_TYPE >
t_TYPE & bdlf::Bind_MemFnObjectWrapper< t_TYPE >::operator* ( ) const
inline

Returns a reference to the object (of parameterized TYPE) pointed to by this Bind_MemFnObjectWrapper.


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