46 using QObject::QObject;
52 virtual void run () = 0;
99 template<
typename FireDestrPolicy>
101 ,
public FireDestrPolicy
104 using FunType_t = std::function<typename FireDestrPolicy::Signature_t>;
166 const std::initializer_list<const char*>& signalsList,
171 for (
const auto signal : signalsList)
193 void Invoke (
const std::function<Signature_t>& f)
235 void Invoke (
const std::function<Signature_t>& f)
virtual ~ChoiceDeletePolicy()
Deletes a SlotClosure object after its signal has fired.
SlotClosure(const FunType_t &func, QObject *parent)
Constructs a SlotClosure running a given func with the given parent as a QObject. ...
void Invoke(const std::function< Signature_t > &f)
SlotClosure(const FunType_t &func, QObject *sender, const std::initializer_list< const char * > &signalsList, QObject *parent)
Constructs a SlotClosure running a given func with the given parent as a QObject on the given signals...
virtual ~BasicDeletePolicy()=default
Executes a given functor upon a signal (or a list of signals).
Base class for SlotClosure.
SlotClosure(const FunType_t &func, QObject *sender, const char *signal, QObject *parent)
Constructs a SlotClosure running a given func with the given parent as a QObject on the given signal...
void run() override
Triggers the function and invokes the destroy policy.
std::function< typename FireDestrPolicy::Signature_t > FunType_t
auto Invoke(F &&f, Args &&...args) -> decltype(std::forward< F >(f)(std::forward< Args >(args)...))
void Invoke(const std::function< Signature_t > &f)
Does not delete a SlotClosure object.