Ref T730, added deleteResourceFromNetwork and modified CSlot (directly accept object witb std::function)

This commit is contained in:
Klaus Basan
2019-10-03 18:51:18 +02:00
committed by Mat Sutcliffe
parent 6e9fa0b2ad
commit ff6b7f8deb
3 changed files with 35 additions and 12 deletions

View File

@@ -86,6 +86,13 @@ namespace BlackMisc
m_function(function)
{}
//! Construct a slot from the given object passing a function and a object
template <typename T>
CSlot(T *object, std::function<R(Args...)> function) :
m_object(object),
m_function(function)
{}
//! Call the slot. The behaviour is undefined if the slot is empty.
R operator()(Args... args) const
{