WeakBinder< Func, T > Class Template Reference

Function object wrapper used by common::weakBind. More...

#include <WeakBind.hh>

Public Types

using WeakPtr = boost::weak_ptr< T >
 

Public Member Functions

 WeakBinder (Func _func, WeakPtr _ptr)
 Constructor. More...
 
template<typename... Args>
auto operator() (Args &&... _args) -> typename std::enable_if< !std::is_void< decltype(this->func(std::forward< Args >(_args)...)) >::value, decltype(this->func(std::forward< Args >(_args)...)) >::type
 Return non-void version. More...
 
template<typename... Args>
auto operator() (Args &&... _args) -> typename std::enable_if< std::is_void< decltype(this->func(std::forward< Args >(_args)...)) >::value, void >::type
 Return void version. More...
 

Detailed Description

template<typename Func, typename T>
class gazebo::common::details::WeakBinder< Func, T >

Function object wrapper used by common::weakBind.

Member Typedef Documentation

◆ WeakPtr

using WeakPtr = boost::weak_ptr<T>

Constructor & Destructor Documentation

◆ WeakBinder()

WeakBinder ( Func  _func,
WeakPtr  _ptr 
)
inline

Constructor.

Parameters
[in]_funcWrapped function object
[in]_ptrOwning pointer to bind as the first argument of the function object.

Member Function Documentation

◆ operator()() [1/2]

auto operator() ( Args &&...  _args) -> typename std::enable_if< !std::is_void< decltype(this->func(std::forward<Args>(_args)...)) >::value, decltype(this->func(std::forward<Args>(_args)...)) >::type
inline

Return non-void version.

◆ operator()() [2/2]

auto operator() ( Args &&...  _args) -> typename std::enable_if< std::is_void< decltype(this->func(std::forward<Args>(_args)...)) >::value, void >::type
inline

Return void version.


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