|
libqi-api
release-2.5.3-2016-11-18
|
#include <signal.hpp>
Public Types | |
| using | OnSubscribers = boost::function< void(bool)> |
Public Attributes | |
| boost::shared_ptr < SignalBasePrivate > | _p |
Static Public Attributes | |
| static const SignalLink | invalidSignalLink |
Protected Types | |
| using | Trigger = boost::function< void(const GenericFunctionParameters ¶ms, MetaCallType callType)> |
Protected Member Functions | |
| void | callSubscribers (const GenericFunctionParameters ¶ms, MetaCallType callType=MetaCallType_Auto) |
| void | setTriggerOverride (Trigger trigger) |
| void | setOnSubscribers (OnSubscribers onSubscribers) |
| void | callOnSubscribe (bool v) |
| void | createNewTrackLink (int &id, SignalLink *&trackLink) |
| void | disconnectTrackLink (int id) |
Friends | |
| class | SignalBasePrivate |
Definition at line 38 of file signal.hpp.
| using qi::SignalBase::OnSubscribers = boost::function<void(bool)> |
Definition at line 41 of file signal.hpp.
|
protected |
Definition at line 105 of file signal.hpp.
|
explicit |
| qi::SignalBase::SignalBase | ( | OnSubscribers | onSubscribers = OnSubscribers() | ) |
|
virtual |
| void qi::SignalBase::_setSignature | ( | const Signature & | s | ) |
| bool qi::SignalBase::asyncDisconnect | ( | const SignalLink & | link | ) |
Disconnect a SignalHandler without waiting for it.
Same as disconnect, but this method does not block.
| bool qi::SignalBase::asyncDisconnectAll | ( | ) |
Disconnect all callbacks from signal without waiting for them.
This function does not block.
|
protected |
|
protected |
| SignalSubscriber & qi::SignalBase::connect | ( | boost::function< F > | func | ) |
Definition at line 72 of file signal.hxx.
| SignalSubscriber& qi::SignalBase::connect | ( | const SignalSubscriber & | s | ) |
| SignalSubscriber& qi::SignalBase::connect | ( | AnyObject | object, |
| const unsigned int | slot | ||
| ) |
| SignalSubscriber& qi::SignalBase::connect | ( | AnyObject | object, |
| const std::string & | slot | ||
| ) |
|
protected |
| bool qi::SignalBase::disconnect | ( | const SignalLink & | link | ) |
Disconnect a SignalHandler.
The associated callback will not be called anymore as soon as this function returns.
This method blocks until all the already running callbacks are finished.
| bool qi::SignalBase::disconnectAll | ( | ) |
Disconnect all callbacks from signal.
This function will block until all callbacks are finished.
|
protected |
| bool qi::SignalBase::hasSubscribers | ( | ) |
| void qi::SignalBase::operator() | ( | qi::AutoAnyReference | p1 = qi::AutoAnyReference(), |
| qi::AutoAnyReference | p2 = qi::AutoAnyReference(), |
||
| qi::AutoAnyReference | p3 = qi::AutoAnyReference(), |
||
| qi::AutoAnyReference | p4 = qi::AutoAnyReference(), |
||
| qi::AutoAnyReference | p5 = qi::AutoAnyReference(), |
||
| qi::AutoAnyReference | p6 = qi::AutoAnyReference(), |
||
| qi::AutoAnyReference | p7 = qi::AutoAnyReference(), |
||
| qi::AutoAnyReference | p8 = qi::AutoAnyReference() |
||
| ) |
Trigger the signal with given arguments, and call type set by setCallType()
| void qi::SignalBase::setCallType | ( | MetaCallType | callType | ) |
Set the MetaCallType used by operator()().
|
protected |
|
protected |
|
virtual |
| std::vector<SignalSubscriber> qi::SignalBase::subscribers | ( | ) |
|
virtual |
Trigger the signal with given type-erased parameters.
| params | the signal arguments |
| callType | specify how to invoke subscribers. Used in combination with each subscriber's MetaCallType to chose between synchronous and asynchronous call. The combination rule is to honor subscriber's override, then callType, then signal's callType and default to asynchronous |
|
friend |
Definition at line 116 of file signal.hpp.
| boost::shared_ptr<SignalBasePrivate> qi::SignalBase::_p |
Definition at line 115 of file signal.hpp.
|
static |
Definition at line 103 of file signal.hpp.