-
Committer:
Tarmac
-
Author(s):
Christopher James Halse Rogers
-
Date:
2016-10-31 04:44:12 UTC
-
mfrom:
(3745.4.20 observer-multiplexer)
-
Revision ID:
tarmac-20161031044412-bywv9t1xufjir3a1
Add ObserverRegistrar interface and an ObserverMultiplexer helper implementation.
An ObserverRegistrar manages registering and unregistering Observers of some Mir state.
The ObserverMultiplexer is an implementation of ObserverRegistrar which itself is an Observer, so can be handed out to internal Mir components as a singular Observer and to shells using Mir as an ObserverRegistrar.
At the moment ObserverMultiplexer requires code to implement Observer be provided manually. In The Glorious Future, C++ will provide compile-time reflection which will make it possible to automatically implement.
Approved by mir-ci-bot, Andreas Pokorny, Cemil Azizoglu.