fw4spl
fwCom::SlotRun< void(A...) > Struct Template Referenceabstract

Slot run interface (call without return value). More...

#include <SlotRun.hpp>

+ Inheritance diagram for fwCom::SlotRun< void(A...) >:
+ Collaboration diagram for fwCom::SlotRun< void(A...) >:

Public Types

Typedefs
typedef void SignatureType(A...)
 
typedef SlotRun< SignatureType > SelfType
 
typedef std::shared_ptr< SelfTypesptr
 
typedef std::weak_ptr< SelfTypewptr
 
- Public Types inherited from fwCom::SlotBase
typedef std::shared_future< void > VoidSharedFutureType
 SlotBase::asyncRun return type.
 
typedef std::set< std::shared_ptr< const SlotConnectionBase > > ConnectionSetType
 Connections container type.
 
typedef std::shared_ptr< SlotBasesptr
 
typedef std::weak_ptr< SlotBasewptr
 
typedef std::shared_ptr< SlotBase const > csptr
 
typedef std::weak_ptr< SlotBase const > cwptr
 
typedef std::string IDType
 

Public Member Functions

virtual void run (A...a) const =0
 Run the Slot with the given parameters.
 
virtual SlotBase::VoidSharedFutureType asyncRun (const std::shared_ptr< ::fwThread::Worker > &worker, A...args) const
 Run the Slot with the given parameters asynchronously. More...
 
virtual SlotBase::VoidSharedFutureType asyncRun (A...args) const
 Run the Slot with the given parameters asynchronously. The execution of this slot will occur on it's own worker. More...
 
template<typename R , typename WEAKCALL >
std::shared_future< R > postWeakCall (const ::fwThread::Worker::sptr &worker, WEAKCALL f)
 
- Public Member Functions inherited from fwCom::SlotBase
unsigned int arity () const
 Returns Slot's arity. The arity defines the number of parameters in Slot signature.
 
void setWorker (const std::shared_ptr< ::fwThread::Worker > &worker)
 Sets Slot's Worker.
 
std::shared_ptr< ::fwThread::WorkergetWorker () const
 Returns Slot's Worker.
 
size_t getNumberOfConnections () const
 Returns number of connections.
 
template<typename A1 , typename A2 , typename A3 >
void run (A1 a1, A2 a2, A3 a3) const
 
template<typename A1 , typename A2 >
void run (A1 a1, A2 a2) const
 
template<typename A1 >
void run (A1 a1) const
 
FWCOM_API void run () const
 
template<typename R , typename A1 , typename A2 , typename A3 >
call (A1 a1, A2 a2, A3 a3) const
 
template<typename R , typename A1 , typename A2 >
call (A1 a1, A2 a2) const
 
template<typename R , typename A1 >
call (A1 a1) const
 
template<typename R >
call () const
 
template<typename A1 , typename A2 , typename A3 >
VoidSharedFutureType asyncRun (A1 a1, A2 a2, A3 a3) const
 
template<typename A1 , typename A2 >
VoidSharedFutureType asyncRun (A1 a1, A2 a2) const
 
template<typename A1 >
VoidSharedFutureType asyncRun (A1 a1) const
 
FWCOM_API VoidSharedFutureType asyncRun () const
 
template<typename R , typename A1 , typename A2 , typename A3 >
std::shared_future< R > asyncCall (A1 a1, A2 a2, A3 a3) const
 
template<typename R , typename A1 , typename A2 >
std::shared_future< R > asyncCall (A1 a1, A2 a2) const
 
template<typename R , typename A1 >
std::shared_future< R > asyncCall (A1 a1) const
 
template<typename R >
std::shared_future< R > asyncCall () const
 
- Public Member Functions inherited from fwCore::BaseObject
virtual bool isA (const std::string &type) const
 
virtual const std::string & getLeafClassname () const
 return object's classname without its namespace, i.e. BaseObject
 
virtual const std::string & getClassname () const
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 

Protected Member Functions

virtual std::function< void() > bindRun (A...args) const
 Binds the given parameters to the run method within a void() function. More...
 
- Protected Member Functions inherited from fwCom::SlotBase
 SlotBase (const SlotBase &)
 Copy constructor forbidden.
 
SlotBaseoperator= (const SlotBase &)
 Copy operator forbidden.
 
template<typename F >
std::string getTypeName () const
 Returns F typeid name.
 
 SlotBase (unsigned int arity)
 

Static Protected Member Functions

template<typename R , typename WEAKCALL >
static std::shared_future< R > postWeakCall (const std::shared_ptr< ::fwThread::Worker > &worker, WEAKCALL f)
 

Additional Inherited Members

- Static Public Member Functions inherited from fwCore::BaseObject
static bool isTypeOf (const std::string &type)
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 
- Protected Attributes inherited from fwCom::SlotBase
std::string m_signature
 Slot's signature based on typeid.
 
const unsigned int m_arity
 Slot's arity.
 
std::shared_ptr< ::fwThread::Workerm_worker
 Slot's Worker.
 
ConnectionSetType m_connections
 Container of current connections.
 
mutable::fwCore::mt::ReadWriteMutex m_connectionsMutex
 
mutable::fwCore::mt::ReadWriteMutex m_workerMutex
 

Detailed Description

template<typename... A>
struct fwCom::SlotRun< void(A...) >

Slot run interface (call without return value).

Template Parameters
ASlot's arguments types.

Definition at line 31 of file SlotRun.hpp.

Member Function Documentation

template<typename... A>
virtual SlotBase::VoidSharedFutureType fwCom::SlotRun< void(A...) >::asyncRun ( const std::shared_ptr< ::fwThread::Worker > &  worker,
A...  args 
) const
virtual

Run the Slot with the given parameters asynchronously.

Parameters
workerWorker that will run the Slot.
argsrun arguments.
Returns
a shared_future object associated with Slot's run result.
Exceptions
NoWorkerif given worker is not valid.
template<typename... A>
SlotBase::VoidSharedFutureType fwCom::SlotRun< void(A...) >::asyncRun ( A...  args) const
inlinevirtual

Run the Slot with the given parameters asynchronously. The execution of this slot will occur on it's own worker.

Precondition
Slot's worker must be set.
Returns
a shared_future object associated with Slot's run result.
Exceptions
NoWorkerif slot has no worker set.

Definition at line 58 of file SlotRun.hxx.

template<typename... A>
std::function< void() > fwCom::SlotRun< void(A...) >::bindRun ( A...  args) const
inlineprotectedvirtual

Binds the given parameters to the run method within a void() function.

Returns
a void() function.

Definition at line 30 of file SlotRun.hxx.


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