Lumiera  0.pre.03
»edit your freedom«
bus-term.hpp File Reference

Go to the source code of this file.

Description

Attachment point to the UI-Bus.

Every stage::model::Tangible holds a BusTerm, which is linked to the Tangible's identity, and serves to relay interface actions towards the Steam-Layer, to remember state changes and to broadcast notifications. Moreover, the BusTerm is the service point to receive structural change messages.

Lifecycle and identity
An BusTerm is always created starting from another BusTerm, to which it will be wired. Moreover, each BusTerm bears a distinct identity, which is used as implicit subject for emanating messages, or as explicit destination for routing. The whole UI-Bus is built to perform within the UI event thread and thus is not threadsafe. For that reason, the automatic detachment built into each BusTerm's dtor is sufficient to ensure sane connectivity.
Note
BusTerm disconnects itself automatically on destruction. However, it is not attached automatically. It does require a reference to the bus on construction, which by default places the BusTerm instance into a semi connected state: the BusTerm is able to send messages to the bus, but the Nexus (hub) does not know the BusTerm by ID and thus is not able to direct messages towards this BusTerm. Contrast this to a Tangible, which is constructed in a way to ensure it is always has a bidirectional communication link to the Nexus.
See also
[BusTerm_test]
Tangible

Definition in file bus-term.hpp.

#include "lib/error.hpp"
#include "lib/nocopy.hpp"
#include "lib/idi/entry-id.hpp"
#include "lib/diff/gen-node.hpp"
#include <utility>
#include <string>

Classes

class  BusTerm
 connection point at the UI-Bus. More...
 

Namespaces

 lib
 Implementation namespace for support and library code.
 
 stage
 Lumiera GTK UI implementation root.
 
 stage::ctrl
 Backbone of the Lumiera GTK UI.
 
 stage::model
 The Lumiera GTK-GUI uses a thin proxy layer data model on top of the actual "high-level-model", which lives in the Steam-Layer below.