Boost logo

Boost Users :

From: David Capello (davidcapello_at_[hidden])
Date: 2006-11-15 10:45:01


2006/11/15, Memfis <memfis+news_at_[hidden]>:
> What is the best practice for using boost::signal? Should the signal be
> a public field? Should an accessor method be used? Should there be some
> special connection methods for every signal, like the following:
>
> private:
> signal<void()> x;
> public:
> void connectX(const signal<void()>::slot_type& slot);
> void disconnectX(const signal<void()>::slot_type& slot);
>
> If you use boost:signal, how do you do it?

I used public signals in my project (http://vaca.sf.net), but I
would like to known what people think about it.

Personally, I don't like the idea to have two methods
to connect and disconnect slots.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net