Game of Ur 0.3.3
This is a computer adaptation of Game of Ur, written in C++ mainly using SDL and OpenGL.
|
A class containing most of the implementation of this engine's Signal concept. More...
#include <signals.hpp>
Public Member Functions | |
void | emit (TArgs... args) |
Method via which the owner of the signal can send data to the signal's obervers. | |
void | registerObserver (std::weak_ptr< ISignalObserver > observer) override |
Causes an eligible observer to be subscribed to this signal. | |
Private Member Functions | |
Signal_ ()=default | |
Constructs a new Signal_ object. | |
Private Attributes | |
std::set< std::weak_ptr< SignalObserver_< TArgs... > >, std::owner_less< std::weak_ptr< SignalObserver_< TArgs... > > > > | mObservers {} |
Weak references to all the observers that have registered themselves with this Signal. | |
Friends | |
class | SignalTracker |
class | Signal< TArgs... > |
A class containing most of the implementation of this engine's Signal concept.
TArgs | The types of data that are sent when this signal is emitted. |
|
privatedefault |
Constructs a new Signal_ object.
This constructor is private, and meant to be accessed only by SignalTracker.
void ToyMaker::Signal_< TArgs >::emit | ( | TArgs... | args | ) |
Method via which the owner of the signal can send data to the signal's obervers.
args | A list of values relating to the signal, to be used by its handlers. |
|
inlineoverridevirtual |
Causes an eligible observer to be subscribed to this signal.
observer | An observer interested in this signal. |
Implements ToyMaker::ISignal.