Boost logo

Boost Users :

Subject: Re: [Boost-users] [signals] Chaining signals
From: Nat Goodspeed (nat_at_[hidden])
Date: 2009-03-13 13:33:10

Remko Tronçon wrote:

> Is it possible to 'chain' boost signals? I.e., connect signal a to
> signal b, such that whenever signal a fires, all slots of signal b are
> called.

#include <boost/signals.hpp>
#include <boost/bind.hpp>
#include <iostream>

void gotit()
     std::cout << "Received the signal\n";

int main(int argc, char *argv[])
     typedef boost::signal<void()> signal_type;
     signal_type first;
     signal_type second;
     return 0;

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at