c++ - Signal-slot architecture best practice -


I am using libsigc ++ to wire an application, and the easy way to go about it The form is uncertain.

There is a predecessor object hierarchy to manage the data layer, and the top-level object exposes all the functions. all is well.

To do this, I am adding a GUI object hierarchy, and in the application object, I am hooking them together with a signal connection. In order to make connections, I need pointers for both the indicator and the receiver.

Now, do I hook directly into the hairstyle, down to the bottom of the tree, directly, thus the indicator needs to cross the tree down and down?

Or, do I undergo intensive procedures of hooking in signals and slots at every step in the chain?

On one side, the slot model buys you; On the other hand, to make a connection at every step does not seem to be rhythmic with the supposed "event telephot" which is supposed to provide a sig-slot.

What will this experience with this model, attitude? Personally, I do not see any problems with the 'Skipping' layers with signals / slots.

Tantra. I like to see it like this: A component is sending signals in the wild, and anyone who is interested in these signals can listen to them.

Some tips: Those who are normal, and do not trust the execution order of slots (if many signs are said for the given signal).


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -