Hi Brian,
On Wed, Nov 7, 2012 at 4:04 PM, Brian Budge
Hi all -
I have a case where I have a largeish inheritance hierarchy. I will be calling an initialization function on all objects before using them in some fashion.
Basically what I need to happen is when I call init() on a Foo the following would occur:
void Foo::init() { super::init(); // now with the knowledge that anything I inherited is set up, I can set myself up... }
When I'm dealing with a situation like you describe (not using constructors), I find that Boost.Signals (or Signals2) do what I'm looking for.
I generally do something like the following:
class B
{
typedef boost::signal