11 #include "fwCom/SignalBase.hpp" 12 #include "fwCom/Signals.hpp" 26 for( SignalMapType::value_type elem :
m_signals )
28 OSLM_ASSERT(
"Signal '"<< elem.first <<
"' has connected slots", elem.second->getNumberOfConnections() == 0 );
37 m_signals.insert( SignalMapType::value_type(key, Signal) );
45 SignalMapType::const_iterator it =
m_signals.find(key);
52 return SignalBase::sptr();
59 Signals::SignalKeyContainerType SignalKeys;
60 for( SignalMapType::value_type elem :
m_signals )
62 SignalKeys.push_back(elem.first);
Signals & operator=(const Signals &)
Copy constructor forbidden.
FWCOM_API Signals & operator()(const SignalKeyType &key, const std::shared_ptr< SignalBase > &Signal)
Registers SignalBase in m_signals.
#define OSLM_ASSERT(message, cond)
work like 'assert' from 'cassert', with in addition a message logged by spylog (with FATAL loglevel) ...
Namespace containing fw4spl communication tools.
FWCOM_API Signals()
Constructor, does nothing.
This class proposes a mapping between a SignalKeyType and a SignalBase.
SignalMapType m_signals
Association < key , SPTR( SignalBase ) >
FWCOM_API SignalKeyContainerType getSignalKeys() const
Returns all SignalKeyType registered in m_signals.
virtual FWCOM_API ~Signals()
Constructor, check if all signals are disconnected.
FWCOM_API std::shared_ptr< SignalBase > operator[](const SignalKeyType &key) const
Returns the SignalBase associated to the key, if key does not exist, the ptr is null.
This file defines SpyLog macros. These macros are used to log messages to a file or to the console du...