mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-16 18:56:52 +02:00
Poco::BasicEvent improvements and preparations for future support of lambdas/std::function
This commit is contained in:
@@ -174,78 +174,75 @@ private:
|
||||
|
||||
|
||||
template <class TObj, class TArgs>
|
||||
static Delegate<TObj, TArgs, true> delegate(TObj* pObj, void (TObj::*NotifyMethod)(const void*, TArgs&))
|
||||
inline Delegate<TObj, TArgs, true> delegate(TObj* pObj, void (TObj::*NotifyMethod)(const void*, TArgs&))
|
||||
{
|
||||
return Delegate<TObj, TArgs, true>(pObj, NotifyMethod);
|
||||
}
|
||||
|
||||
|
||||
template <class TObj, class TArgs>
|
||||
static Delegate<TObj, TArgs, false> delegate(TObj* pObj, void (TObj::*NotifyMethod)(TArgs&))
|
||||
inline Delegate<TObj, TArgs, false> delegate(TObj* pObj, void (TObj::*NotifyMethod)(TArgs&))
|
||||
{
|
||||
return Delegate<TObj, TArgs, false>(pObj, NotifyMethod);
|
||||
}
|
||||
|
||||
|
||||
template <class TObj, class TArgs>
|
||||
static Expire<TArgs> delegate(TObj* pObj, void (TObj::*NotifyMethod)(const void*, TArgs&), Timestamp::TimeDiff expireMillisecs)
|
||||
inline Expire<TArgs> delegate(TObj* pObj, void (TObj::*NotifyMethod)(const void*, TArgs&), Timestamp::TimeDiff expireMillisecs)
|
||||
{
|
||||
return Expire<TArgs>(Delegate<TObj, TArgs, true>(pObj, NotifyMethod), expireMillisecs);
|
||||
}
|
||||
|
||||
|
||||
template <class TObj, class TArgs>
|
||||
static Expire<TArgs> delegate(TObj* pObj, void (TObj::*NotifyMethod)(TArgs&), Timestamp::TimeDiff expireMillisecs)
|
||||
inline Expire<TArgs> delegate(TObj* pObj, void (TObj::*NotifyMethod)(TArgs&), Timestamp::TimeDiff expireMillisecs)
|
||||
{
|
||||
return Expire<TArgs>(Delegate<TObj, TArgs, false>(pObj, NotifyMethod), expireMillisecs);
|
||||
}
|
||||
|
||||
|
||||
template <class TArgs>
|
||||
static Expire<TArgs> delegate(void (*NotifyMethod)(const void*, TArgs&), Timestamp::TimeDiff expireMillisecs)
|
||||
inline Expire<TArgs> delegate(void (*NotifyMethod)(const void*, TArgs&), Timestamp::TimeDiff expireMillisecs)
|
||||
{
|
||||
return Expire<TArgs>(FunctionDelegate<TArgs, true, true>(NotifyMethod), expireMillisecs);
|
||||
}
|
||||
|
||||
|
||||
template <class TArgs>
|
||||
static Expire<TArgs> delegate(void (*NotifyMethod)(void*, TArgs&), Timestamp::TimeDiff expireMillisecs)
|
||||
inline Expire<TArgs> delegate(void (*NotifyMethod)(void*, TArgs&), Timestamp::TimeDiff expireMillisecs)
|
||||
{
|
||||
return Expire<TArgs>(FunctionDelegate<TArgs, true, false>(NotifyMethod), expireMillisecs);
|
||||
}
|
||||
|
||||
|
||||
template <class TArgs>
|
||||
static Expire<TArgs> delegate(void (*NotifyMethod)(TArgs&), Timestamp::TimeDiff expireMillisecs)
|
||||
inline Expire<TArgs> delegate(void (*NotifyMethod)(TArgs&), Timestamp::TimeDiff expireMillisecs)
|
||||
{
|
||||
return Expire<TArgs>(FunctionDelegate<TArgs, false>(NotifyMethod), expireMillisecs);
|
||||
}
|
||||
|
||||
|
||||
template <class TArgs>
|
||||
static FunctionDelegate<TArgs, true, true> delegate(void (*NotifyMethod)(const void*, TArgs&))
|
||||
inline FunctionDelegate<TArgs, true, true> delegate(void (*NotifyMethod)(const void*, TArgs&))
|
||||
{
|
||||
return FunctionDelegate<TArgs, true, true>(NotifyMethod);
|
||||
}
|
||||
|
||||
|
||||
template <class TArgs>
|
||||
static FunctionDelegate<TArgs, true, false> delegate(void (*NotifyMethod)(void*, TArgs&))
|
||||
inline FunctionDelegate<TArgs, true, false> delegate(void (*NotifyMethod)(void*, TArgs&))
|
||||
{
|
||||
return FunctionDelegate<TArgs, true, false>(NotifyMethod);
|
||||
}
|
||||
|
||||
|
||||
template <class TArgs>
|
||||
static FunctionDelegate<TArgs, false> delegate(void (*NotifyMethod)(TArgs&))
|
||||
inline FunctionDelegate<TArgs, false> delegate(void (*NotifyMethod)(TArgs&))
|
||||
{
|
||||
return FunctionDelegate<TArgs, false>(NotifyMethod);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <class TObj>
|
||||
class Delegate<TObj,void,true>: public AbstractDelegate<void>
|
||||
{
|
||||
@@ -390,28 +387,28 @@ private:
|
||||
|
||||
|
||||
template <class TObj>
|
||||
static Delegate<TObj, void, true> delegate(TObj* pObj, void (TObj::*NotifyMethod)(const void*))
|
||||
inline Delegate<TObj, void, true> delegate(TObj* pObj, void (TObj::*NotifyMethod)(const void*))
|
||||
{
|
||||
return Delegate<TObj, void, true>(pObj, NotifyMethod);
|
||||
}
|
||||
|
||||
|
||||
template <class TObj>
|
||||
static Delegate<TObj, void, false> delegate(TObj* pObj, void (TObj::*NotifyMethod)())
|
||||
inline Delegate<TObj, void, false> delegate(TObj* pObj, void (TObj::*NotifyMethod)())
|
||||
{
|
||||
return Delegate<TObj, void, false>(pObj, NotifyMethod);
|
||||
}
|
||||
|
||||
|
||||
template <class TObj>
|
||||
static Expire<void> delegate(TObj* pObj, void (TObj::*NotifyMethod)(const void*), Timestamp::TimeDiff expireMillisecs)
|
||||
inline Expire<void> delegate(TObj* pObj, void (TObj::*NotifyMethod)(const void*), Timestamp::TimeDiff expireMillisecs)
|
||||
{
|
||||
return Expire<void>(Delegate<TObj, void, true>(pObj, NotifyMethod), expireMillisecs);
|
||||
}
|
||||
|
||||
|
||||
template <class TObj>
|
||||
static Expire<void> delegate(TObj* pObj, void (TObj::*NotifyMethod)(), Timestamp::TimeDiff expireMillisecs)
|
||||
inline Expire<void> delegate(TObj* pObj, void (TObj::*NotifyMethod)(), Timestamp::TimeDiff expireMillisecs)
|
||||
{
|
||||
return Expire<void>(Delegate<TObj, void, false>(pObj, NotifyMethod), expireMillisecs);
|
||||
}
|
||||
@@ -452,6 +449,7 @@ inline FunctionDelegate<void, false> delegate(void (*NotifyMethod)())
|
||||
return FunctionDelegate<void, false>(NotifyMethod);
|
||||
}
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user