class EE::UI::UIDataBind::CallbackSlot

Overview

Assignment-compatible callback storage retained without copying its callable target. More…

#include <uidatabind.hpp>

class CallbackSlot {
public:
    // construction

    CallbackSlot();
    CallbackSlot(const CallbackSlot&);
    CallbackSlot(CallbackSlot&&);

    // methods

    CallbackSlot& operator=(const CallbackSlot&);
    CallbackSlot& operator=(CallbackSlot&&);
    CallbackSlot& operator=(Callback callback);
    operator bool() const;
    void operator()(const T& value) const;
    std::shared_ptr<Callback> retain() const;
};

Detailed Documentation

Assignment-compatible callback storage retained without copying its callable target.

Allocation, when required, happens when the callback is assigned. Notification only copies the shared handle, keeping self-destruction safe without allocating in the delivery path.