12template<
typename Result,
typename... Args>
63 template<
typename ClassType,
typename MethodType,
typename... BoundArgs>
96 explicit operator bool()
const;
104 Result
call(Args... args)
const;
116#include <misc/gen/TClosure.hpp>
Encapsulates the std::function() template.
Definition TClosure.h:14
std::function< Result(Args...)> func_type
Function type of the lambda or function.
Definition TClosure.h:19
Result call(Args... args) const
Makes the call to the member function.
TClosure & operator=(const func_type &f)
Closure assignment operator.
TClosure(const TClosure &c)
Copy constructor.
TClosure(const func_type &fn)
Function assignment constructor.
bool isAssigned() const
Checks if the closure is valid for calling.
TClosure & operator=(const TClosure &c)
Closure assignment operator.
Result operator()(Args... args) const
Make the call to the member function.
TClosure & assign(const func_type &fn)
Function assignment method for static function.
TClosure()=default
Default constructor.
TClosure & unassign()
Releases the bind function.
TClosure & assign(ClassType *cls, MethodType mtd, BoundArgs... args)
Binds a non-static class member function to this instance.
Definition Application.h:10