On Wed, May 20, 2015 at 10:40 AM, Emil Dotchevski
On Tue, May 19, 2015 at 11:35 PM, Gavin Lambert
wrote: TBH though in the presented examples I would doubt that signal/event handling is the only concern (in a real application), so you might end up creating those Window objects anyway, in which case the appeal lessens. So I can't personally think of any cases where I would use this instead of Signals2 or libsigc++ or similar.
An example when the non-intrusiveness is important is when you load up an entire hierarchy of UI objects from a file and you want to add custom signals to it. Other solutions to this problem are less elegant.
Another useful non-intrusive feature is the meta signals system. It lets you manage connections to 3rd party objects automatically. For example it can be used to add support for C++ functional objects to any C-style callback API.
I figured my second point above would be difficult to understand without an
example, so I've added it here:
http://revergestudios.com/boost-synapse/using_Boost_Synapse_meta_signals_to_...
.
Emil
On Wed, May 20, 2015 at 10:40 AM, Emil Dotchevski
On Tue, May 19, 2015 at 11:35 PM, Gavin Lambert
wrote: TBH though in the presented examples I would doubt that signal/event handling is the only concern (in a real application), so you might end up creating those Window objects anyway, in which case the appeal lessens. So I can't personally think of any cases where I would use this instead of Signals2 or libsigc++ or similar.
An example when the non-intrusiveness is important is when you load up an entire hierarchy of UI objects from a file and you want to add custom signals to it. Other solutions to this problem are less elegant.
Another useful non-intrusive feature is the meta signals system. It lets you manage connections to 3rd party objects automatically. For example it can be used to add support for C++ functional objects to any C-style callback API.
Emil
-- Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode