7 #ifndef _QI_SIGNAL_HPP_
8 #define _QI_SIGNAL_HPP_
15 #include <boost/thread/thread.hpp>
16 #include <boost/thread/mutex.hpp>
17 #include <boost/thread/condition.hpp>
18 #include <boost/enable_shared_from_this.hpp>
21 # pragma warning( push )
22 # pragma warning( disable: 4251 )
30 class ManageablePrivate;
31 class SignalSubscriber;
33 class SignalBasePrivate;
61 bool asyncDisconnectAll();
101 std::vector<SignalSubscriber> subscribers();
102 bool hasSubscribers();
105 using Trigger = boost::function<void(const GenericFunctionParameters& params, MetaCallType callType)>;
107 void setTriggerOverride(
Trigger trigger);
109 void callOnSubscribe(
bool v);
110 void createNewTrackLink(
int&
id,
SignalLink*& trackLink);
111 void disconnectTrackLink(
int id);
115 boost::shared_ptr<SignalBasePrivate>
_p;
116 friend class SignalBasePrivate;
133 using boost::function<T>::operator();
156 template <
typename F>
160 template <
typename U>
162 template <
typename... P>
165 template <
typename F,
typename Arg0,
typename... Args>
177 template<
typename... P>
186 using boost::function<FunctionType>::operator();
200 :
public boost::enable_shared_from_this<SignalSubscriber>
227 void waitForInactive();
229 void addActive(
bool acquireLock, boost::thread::id tid = boost::this_thread::get_id());
230 void removeActive(
bool acquireLock, boost::thread::id tid = boost::this_thread::get_id());
273 # pragma warning( pop )
280 #endif // _QITYPE_SIGNAL_HPP_
boost::function< void(bool)> OnSubscribers
boost::condition inactiveThread
boost::shared_ptr< SignalSubscriber > SignalSubscriberPtr
static const SignalLink invalidSignalLink
boost::shared_ptr< SignalBasePrivate > _p
Honor the default behavior.
ExecutionContext * executionContext
SignalSubscriber & connect(...)
virtual qi::Signature signature() const
void(const AnyValue &) FunctionType
boost::scoped_ptr< AnyWeakObject > target
MetaCallType threadingModel
typename ParentType::OnSubscribers OnSubscribers
Signal(OnSubscribers onSubscribers=OnSubscribers())
boost::function< void(const GenericFunctionParameters ¶ms, MetaCallType callType)> Trigger
std::vector< boost::thread::id > activeThreads
SignalLink linkId
Uid that can be passed to GenericObject::disconnect()
SignalF(OnSubscribers onSubscribers=OnSubscribers())