7 #ifndef __FWCOM_SLOTS_HPP__ 8 #define __FWCOM_SLOTS_HPP__ 15 #include "fwCom/config.hpp" 27 template<
typename F >
37 typedef std::string SlotKeyType;
38 typedef std::map< SlotKeyType, SPTR( SlotBase ) > SlotMapType;
39 typedef std::vector < SlotKeyType > SlotKeyContainerType;
45 FWCOM_API
virtual ~Slots();
48 FWCOM_API Slots& operator()(
const SlotKeyType& key,
const SPTR(
SlotBase )& slot );
51 template<
typename R,
typename ... A>
55 return this->operator()(key, slotBase);
59 template<
typename F,
typename ... A>
60 Slots& operator()(
const SlotKeyType& key, F f, A ...
a );
63 FWCOM_API
SPTR(
SlotBase ) operator[](
const SlotKeyType &key )
const;
69 FWCOM_API SlotKeyContainerType getSlotKeys()
const;
74 Slots(
const Slots& );
77 Slots& operator=(
const Slots& );
85 #endif //__FWCOM_SLOTS_HPP__
Namespace containing fw4spl communication tools.
Slots & operator()(const SlotKeyType &key, std::shared_ptr< Slot< R(A...) > >slot)
Registers Slot in m_slots (defined here to avoid compiler error C2244)
SlotMapType m_slots
Association < key , SPTR( SlotBase ) >
This file defines fwCore base macros.
This class proposes a mapping between a SlotKeyType and a SlotBase.
Base class for Slot implementations.
This class creates and manages a task loop. The default implementation create a loop in a new thread...
This namespace fwThread provides few tools to execute asynchronous tasks on different threads...