fw4spl
|
Base class for Slot implementations. More...
#include <SlotBase.hpp>
Public Types | |
typedef std::shared_future< void > | VoidSharedFutureType |
SlotBase::asyncRun return type. | |
typedef std::set< std::shared_ptr< const SlotConnectionBase > > | ConnectionSetType |
Connections container type. | |
typedefs | |
Slot pointer types. | |
typedef std::shared_ptr< SlotBase > | sptr |
typedef std::weak_ptr< SlotBase > | wptr |
typedef std::shared_ptr< SlotBase const > | csptr |
typedef std::weak_ptr< SlotBase const > | cwptr |
typedef std::string | IDType |
Public Member Functions | |||||
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::Worker > | getWorker () const | ||||
Returns Slot's Worker. | |||||
size_t | getNumberOfConnections () const | ||||
Returns number of connections. | |||||
Run helpers | |||||
Run the Slot.
| |||||
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 | ||||
Call helpers | |||||
Call the Slot (with return value).
| |||||
template<typename R , typename A1 , typename A2 , typename A3 > | |||||
R | call (A1 a1, A2 a2, A3 a3) const | ||||
template<typename R , typename A1 , typename A2 > | |||||
R | call (A1 a1, A2 a2) const | ||||
template<typename R , typename A1 > | |||||
R | call (A1 a1) const | ||||
template<typename R > | |||||
R | call () const | ||||
Asynchronous run helpers | |||||
Run the Slot asynchronously.
| |||||
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 | ||||
Asynchronous call helpers | |||||
Call the Slot asynchronously (with return value).
| |||||
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 | |
SlotBase (const SlotBase &) | |
Copy constructor forbidden. | |
SlotBase & | operator= (const SlotBase &) |
Copy operator forbidden. | |
template<typename F > | |
std::string | getTypeName () const |
Returns F typeid name. | |
SlotBase (unsigned int arity) | |
Protected Attributes | |
std::string | m_signature |
Slot's signature based on typeid. | |
const unsigned int | m_arity |
Slot's arity. | |
std::shared_ptr< ::fwThread::Worker > | m_worker |
Slot's Worker. | |
ConnectionSetType | m_connections |
Container of current connections. | |
mutable::fwCore::mt::ReadWriteMutex | m_connectionsMutex |
mutable::fwCore::mt::ReadWriteMutex | m_workerMutex |
Friends | |
SlotBase's friends | |
template<typename F > | |
struct | SlotConnection |
template<typename F > | |
struct | Signal |
template<typename T , typename R > | |
struct | util::WeakCall |
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 | |
Base class for Slot implementations.
Definition at line 46 of file SlotBase.hpp.