|
fw4spl
|
Weak functor class. Store a zero-arg-function and a weak pointer on an object. The WeakCall is callable only once. A bad_weak_ptr exception is thrown if the weak_ptr is expired when operator() is called A fwCom::exception::WorkerChanged exception is thrown if the target slot worker changed since weakcall request. More...
#include <WeakCall.hpp>
Collaboration diagram for fwCom::util::WeakCall< T, R >:Public Member Functions | |
| WeakCall (const std::shared_ptr< T const > &ptr, std::function< R() > f) | |
| WeakCall (const std::shared_ptr< T const > &ptr, std::function< R() > f, const std::shared_ptr< ::fwThread::Worker > &m) | |
| R | operator() () const |
Protected Attributes | |
| std::weak_ptr< T const > | m_weakPtr |
| std::function< R() > | m_func |
| std::weak_ptr< ::fwThread::Worker > | m_worker |
Weak functor class. Store a zero-arg-function and a weak pointer on an object. The WeakCall is callable only once. A bad_weak_ptr exception is thrown if the weak_ptr is expired when operator() is called A fwCom::exception::WorkerChanged exception is thrown if the target slot worker changed since weakcall request.
| T | Stored object type. |
| R | Stored function return type. |
Definition at line 32 of file SlotBase.hpp.