#include <SafeSlot.h>

Public Member Functions | |
| template<class T, typename Method> | |
| AutoSlot (T *pObserver, Method pMethod) | |
Definition at line 276 of file SafeSlot.h.
| AutoSlot::AutoSlot | ( | T * | pObserver, | |
| Method | pMethod | |||
| ) |
Creates an auto-detaching slot.
Creates a slot. Assuming neither of the input arguments is NULL, the slot will return true from isValid() and will test equal to other slots created with the same arguments. This slot will automatically detach from the subject it is attached to when the observer is destroyed.
| pObserver | The object to call in Slot::update. It must inherit from SlotInvalidator. | |
| pMethod | The method to call on the object in Slot::update. The method should not be virtual. Virtual slot methods may cause Subject::detach to fail. If a virtual slot is needed, make the slot method non-virtual and have it call a virtual method. On notify, the slot method will be called as follows: (pT->*pMethod)(subject, signal, v); T::method(Subject &subject, const std::string &signal, const boost::any &v); |
Definition at line 306 of file SafeSlot.h.