7 #ifndef __FWSERVICES_REGISTRY_PROXY_HPP__ 8 #define __FWSERVICES_REGISTRY_PROXY_HPP__ 13 #include <fwCore/base.hpp> 14 #include <fwCore/mt/types.hpp> 16 #include <fwCom/SignalBase.hpp> 17 #include <fwCom/SlotBase.hpp> 19 #include "fwServices/config.hpp" 38 typedef std::string ChannelKeyType;
46 typedef std::set< ::fwCom::SignalBase::sptr > SignalContainerType;
47 typedef std::set< ::fwCom::SlotBase::sptr > SlotContainerType;
48 SignalContainerType m_signals;
49 SlotContainerType m_slots;
50 SlotContainerType::iterator m_lastConnectedSlot;
55 typedef std::map< ChannelKeyType, SPTR(SigSlots) > ChannelMapType;
58 FWSERVICES_API
Proxy();
61 FWSERVICES_API
virtual ~Proxy();
64 FWSERVICES_API
static Proxy::sptr getDefault();
67 FWSERVICES_API
void connect(ChannelKeyType channel, ::fwCom::SignalBase::sptr signal);
70 FWSERVICES_API
void connect(ChannelKeyType channel, ::fwCom::SlotBase::sptr slot);
73 FWSERVICES_API
void disconnect(ChannelKeyType channel, ::fwCom::SignalBase::sptr signal);
76 FWSERVICES_API
void disconnect(ChannelKeyType channel, ::fwCom::SlotBase::sptr slot);
94 #endif // __FWSERVICES_REGISTRY_PROXY_HPP__ Contains fwAtomsFilter::registry details.
Base class for all FW4SPL's classes.
::boost::shared_mutex ReadWriteMutex
Defines a single writer, multiple readers mutex.
static Proxy::sptr s_currentProxy
The global instance of the proxy.
Namespace fwServices is dedicated to (mimic) the dynamic affectation of methods to (pure data) object...
ChannelMapType m_channels
Association channels, SigSlot.
Structure to regsiter signal and slot informations Contains a signal container, a slot container and ...
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
mutable::fwCore::mt::ReadWriteMutex m_channelMutex
Used to protect the m_channels access.
This class defines a proxy for signal/slot connections.