|
| | Signal (SignalTracker &owningTracker, const std::string &name) |
| | Constructs a Signal object and associates it with its SignalTracker.
|
|
| Signal (const Signal &other)=delete |
|
| Signal (Signal &&other)=delete |
|
Signal & | operator= (const Signal &other)=delete |
|
Signal & | operator= (Signal &&other)=delete |
| void | emit (TArgs...args) |
| | A method on the signal which causes the signal to be sent to all of its subscribers (aka SignalObservers).
|
| void | resetSignal (SignalTracker &owningTracker, const std::string &name) |
| | Reinitializes the tracker with a new owning SignalTracker.
|
template<typename ... TArgs>
class ToyMaker::Signal< TArgs >
A Signal object, designed to emit signals matching some data signature to be received by all the SignalObservers subscribed to it.
It is essentially a wrapper over Signal_<T>
Usage
public:
};
A signal tracker, the main interface between an object and the signal system.
Definition signals.hpp:161
A Signal object, designed to emit signals matching some data signature to be received by all the Sign...
Definition signals.hpp:323
Here we see two signals declared, one that sends no data, and one that sends GameScoreData, named "ViewUpdateStarted" and "ScoreUpdated" respectively.
When a SignalObserver (with the correct signature) wishes to connect to these signals, a function call resembling the one below should be made:
signalTo.connect(
"ViewUpdateStarted",
"ObserveViewUpdateStarted",
signalFrom
);
Where:
- Template Parameters
-
| TArgs | A list of data types this Signal is expected to send when a signal is emitted. |
- See also
- SignalTracker
-
SignalObserver