Boost.Signals: Class trackable
Header
#include <boost/signals/trackable.hpp>
Synopsis
The trackable
class is responsible for managing the automatic disconnection of signals and slots when an object that is bound as part of a slot is destroyed. The trackable
class may only be used as a base class for some other class; when used as such, that class may be bound to function objects used as part of slots. The manner in which a the trackable
object tracks the set of signal-slot connections it is a part of is implementation-defined.
namespace boost {
namespace signals {
class trackable {
protected:
trackable();
trackable(const trackable&);
~trackable();
trackable& operator=(const trackable&);
};
}
}
Members
Constructors
trackable();
- Effects: sets the list of connected slots to empty.
- Throws: will not throw.
trackable(const trackable&);
- Effects: sets the list of connected slots to empty.
- Throws: will not throw.
- Rational: signal-slot connections can only be created via calls to an explicit connect method, and therefore cannot be created here when trackable objects are copied.
Destructor
~trackable();
- Effects: disconnects all connected slots.
Assignment
trackable& operator=(const trackable& other);
- Effects: disconnects all connected slots.
- Returns:
*this
- Rational: signal-slot connections can only be created via calls to an explicit connect method, and therefore cannot be created here when trackable objects are copied.
Doug Gregor
Last modified: Fri Oct 11 05:43:22 EDT 2002