This class proposes a mapping between a SlotKeyType and a SlotBase.
More...
#include <Slots.hpp>
|
typedef std::string | SlotKeyType |
|
typedef std::map< SlotKeyType, std::shared_ptr< SlotBase > > | SlotMapType |
|
typedef std::vector< SlotKeyType > | SlotKeyContainerType |
|
|
FWCOM_API | Slots () |
| Constructor, does nothing.
|
|
virtual FWCOM_API | ~Slots () |
| Constructor, check if all slots are disconnected.
|
|
FWCOM_API Slots & | operator() (const SlotKeyType &key, const std::shared_ptr< SlotBase > &slot) |
| Registers SlotBase in m_slots.
|
|
template<typename R , typename... A> |
Slots & | operator() (const SlotKeyType &key, std::shared_ptr< Slot< R(A...) > >slot) |
| Registers Slot in m_slots (defined here to avoid compiler error C2244)
|
|
template<typename F , typename... A> |
Slots & | operator() (const SlotKeyType &key, F f, A...a) |
| Creates in intern a new slot from function and registers it in m_slots.
|
|
FWCOM_API std::shared_ptr< SlotBase > | operator[] (const SlotKeyType &key) const |
| Returns the SlotBase associated to the key, if key does not exist, the ptr is null.
|
|
FWCOM_API void | setWorker (const std::shared_ptr< ::fwThread::Worker > &worker) |
| Assigns the worker to all slots stored in m_slots.
|
|
FWCOM_API SlotKeyContainerType | getSlotKeys () const |
| Returns all SlotKeyType registered in m_slots.
|
|
This class proposes a mapping between a SlotKeyType and a SlotBase.
Definition at line 33 of file Slots.hpp.
The documentation for this class was generated from the following files: