9#include "system/multicast_delegate.h"
19 template <
typename Reordered,
typename ...FuncArgs>
struct FuncArgsReorderer;
26 template <
typename ...ReorderedArgs,
typename FirstArg,
typename ...OtherArgs>
27 struct FuncArgsReorderer<void(ReorderedArgs...), FirstArg, OtherArgs...>
28 : FuncArgsReorderer<void(ReorderedArgs..., FirstArg), OtherArgs...>
35 template <
typename ...ReorderedArgs,
typename ReturnType>
36 struct FuncArgsReorderer<void(ReorderedArgs...), ReturnType>
39 using type = ReturnType(ReorderedArgs...);
80template<
typename... Args>
81class Func :
public MulticastDelegate<typename ::System::Detail::FuncArgsReorderer<void(), Args...>::type>
88 : MulticastDelegate<typename ::
System::Detail::FuncArgsReorderer<void(), Args...>::type>()
95 : MulticastDelegate<typename ::
System::Detail::FuncArgsReorderer<void(), Args...>::type>(arg)
100 : MulticastDelegate<typename ::
System::Detail::FuncArgsReorderer<void(), Args...>::type>(func)
105 : MulticastDelegate<typename ::System::Detail::FuncArgsReorderer<void(), Args...>::type>(std::move(func))
116 MulticastDelegate<typename ::System::Detail::FuncArgsReorderer<void(), Args...>::type>::operator = (other);
124 MulticastDelegate<typename ::System::Detail::FuncArgsReorderer<void(), Args...>::type>::operator = (std::move(other));
Function delegate. This type should be allocated on stack and passed to functions by value or by refe...
Definition: func.h:82
~Func()
Destructor.
Definition: func.h:108
Func(const Func &func)
Copy constructor.
Definition: func.h:99
Func(Func &&func) noexcept
Move constructor.
Definition: func.h:104
Func(T &&arg)
Constructor that constructs Func object and assigns value (either actual callback or nullptr) to it.
Definition: func.h:94
Func & operator=(const Func &other)
Copy assignment.
Definition: func.h:114
Func()
Default constructor that creates null-Func.
Definition: func.h:87
Definition: db_command.h:9