AlarmCd
is a delegate container.
@@ -41,7 +95,7 @@ void NotifyAlarmSubscribers(int alarmId, const string& note)
AlarmCb(alarmId, note);
}
```
-## Subscriber Example
+### Subscriber
Typically a subscriber registers with a delegate container instance to receive callbacks, either synchronously or asynchronously.
@@ -83,8 +137,6 @@ class AlarmSub } ``` -This is a simple example. Many other usage patterns exist including asynchronous API's, blocking delegates with a timeout, and more.
- ## All Delegate Types Example A example delegate container inserting and removing all delegate types. @@ -258,13 +310,20 @@ DelegateBase DelegateMember<> DelegateMemberAsync<> DelegateMemberAsyncWait<> - DelegateMemberSp<> - DelegateMemberSpAsync<> - DelegateMemberSpAsyncWait<> DelegateFunction<> DelegateFunctionAsync<> DelegateFunctionAsyncWait<> +``` + +DelegateFree<>
binds to a free or static member function. DelegateMember<>
binds to a class instance member function. DelegateFunction<>
binds to a std::function
target. All versions offer synchronous function invocation.
DelegateFreeAsync<>
, DelegateMemberAsync<>
and DelegateFunctionAsync<>
operate in the same way as their synchronous counterparts; except these versions offer non-blocking asynchronous function execution on a specified thread of control.
DelegateFreeAsyncWait<>
, DelegateMemberAsyncWait<>
and DelegateFunctionAsyncWait<>
provides blocking asynchronous function execution on a target thread with a caller supplied maximum wait timeout. The destination thread will not invoke the target function if the timeout expires.
The three main delegate container classes are:
+```cpp // Delegate Containers SinglecastDelegate<> MulticastDelegate<> @@ -276,6 +335,12 @@ DelegateMsg DelegateThread ``` +SinglecastDelegate<>
is a delegate container accepting a single delegate. The advantage of the single cast version is that it is slightly smaller.
MulticastDelegate<>
is a delegate container accepting multiple delegates.
MultcastDelegateSafe<>
is a thread-safe container accepting multiple delegates. Always use the thread-safe version if multiple threads access the container instance.
build
directory
DelegateFree<>
binds to a free or static member function. DelegateMember<>
binds to a class instance member function. DelegateMemberSp<>
binds to a class instance member function using a std::shared_ptr
instead of a raw object pointer. All versions offer synchronous function invocation.
DelegateFree<>
binds to a free or static member function. DelegateMember<>
binds to a class instance member function. DelegateFunction<>
binds to a std::function
target. All versions offer synchronous function invocation.
DelegateFreeAsync<>
, DelegateMemberAsync<>
and DelegateMemberSpAsync<>
operate in the same way as their synchronous counterparts; except these versions offer non-blocking asynchronous function execution on a specified thread of control.
DelegateFreeAsync<>
, DelegateMemberAsync<>
and DelegateFunctionAsync<>
operate in the same way as their synchronous counterparts; except these versions offer non-blocking asynchronous function execution on a specified thread of control.
DelegateFreeAsyncWait<>
, DelegateMemberAsyncWait<>
and DelegateMemberAsyncWait<>
provides blocking asynchronous function execution on a target thread with a caller supplied maximum wait timeout. The destination thread will not invoke the target function if the timeout expires.
DelegateFreeAsyncWait<>
, DelegateMemberAsyncWait<>
and DelegateFunctionAsyncWait<>
provides blocking asynchronous function execution on a target thread with a caller supplied maximum wait timeout. The destination thread will not invoke the target function if the timeout expires.
The three main delegate container classes are:
@@ -321,7 +318,7 @@ delegateH("Hello world", 2020); ## Bind to std::shared_ptr -Binding to instance member function requires a pointer to an object. The delegate library supports binding with a raw pointer and a std::shared_ptr
smart pointer. Usage is what you'd expect; just use a std::shared_ptr
in place of the raw object pointer in the call to MakeDelegate()
. Depending on if a thread argument is passed to MakeDelegate()
or not, a DelegateMemberSp<>
or DelegateMemberSpAsync<>
instance is returned.
Binding to instance member function requires a pointer to an object. The delegate library supports binding with a raw pointer and a std::shared_ptr
smart pointer. Usage is what you'd expect; just use a std::shared_ptr
in place of the raw object pointer in the call to MakeDelegate()
.
```cpp
// Create a shared_ptr, create a delegate, then synchronously invoke delegate function
@@ -335,30 +332,30 @@ delegateMemberSp("Hello world using shared_ptr", 2020);
Certain asynchronous delegate usage patterns can cause a callback invocation to occur on a deleted object. The problem is this: an object function is bound to a delegate and invoked asynchronously, but before the invocation occurs on the target thread, the target object is deleted. In other words, it is possible for an object bound to a delegate to be deleted before the target thread message queue has had a chance to invoke the callback. The following code exposes the issue:
```cpp - // Example of a bug where the testClassHeap is deleted before the asychronous delegate - // is invoked on the workerThread1. In other words, by the time workerThread1 calls - // the bound delegate function the testClassHeap instance is deleted and no longer valid. - TestClass* testClassHeap = new TestClass(); - auto delegateMemberAsync = - MakeDelegate(testClassHeap, &TestClass::MemberFuncStdString, workerThread1); - delegateMemberAsync("Function async invoked on deleted object. Bug!", 2020); - delegateMemberAsync.Clear(); - delete testClassHeap; +// Example of a bug where the testClassHeap is deleted before the asychronous delegate +// is invoked on the workerThread1. In other words, by the time workerThread1 calls +// the bound delegate function the testClassHeap instance is deleted and no longer valid. +TestClass* testClassHeap = new TestClass(); +auto delegateMemberAsync = + MakeDelegate(testClassHeap, &TestClass::MemberFuncStdString, workerThread1); +delegateMemberAsync("Function async invoked on deleted object. Bug!", 2020); +delegateMemberAsync.Clear(); +delete testClassHeap; ```The example above is contrived, but it does clearly show that nothing prevents an object being deleted while waiting for the asynchronous invocation to occur. In many embedded system architectures, the registrations might occur on singleton objects or objects that have a lifetime that spans the entire execution. In this way, the application's usage pattern prevents callbacks into deleted objects. However, if objects pop into existence, temporarily subscribe to a delegate for callbacks, then get deleted later the possibility of a latent delegate stuck in a message queue could invoke a function on a deleted object.
-Fortunately, C++ smart pointers are just the ticket to solve these complex object lifetime issues. A DelegateMemberSpAsync<>
delegate binds using a std::shared_ptr
instead of a raw object pointer. Now that the delegate has a shared pointer, the danger of the object being prematurely deleted is eliminated. The shared pointer will only delete the object pointed to once all references are no longer in use. In the code snippet below, all references to testClassSp
are removed by the client code yet the delegate's copy placed into the queue prevents TestClass
deletion until after the asynchronous delegate callback occurs.
Fortunately, C++ smart pointers are just the ticket to solve these complex object lifetime issues. A DelegateMemberAsync<>
delegate binds using a std::shared_ptr
instead of a raw object pointer. Now that the delegate has a shared pointer, the danger of the object being prematurely deleted is eliminated. The shared pointer will only delete the object pointed to once all references are no longer in use. In the code snippet below, all references to testClassSp
are removed by the client code yet the delegate's copy placed into the queue prevents TestClass
deletion until after the asynchronous delegate callback occurs.
Actually, this technique can be used to call an object function, and then the object automatically deletes after the callback occurs. Using the above example, create a shared pointer instance, bind a delegate, and invoke the delegate. Now testClassSp
can go out of scope and TestClass::MemberFuncStdString
will still be safely called on workerThread1
. The TestClass
instance will delete by way of std::shared_ptr
once the smart pointer reference count goes to 0 after the callback completes without any extra programmer involvement.
Adding a timeout as the last argument to MakeDelegate()
causes a DelegateFreeAsyncWait<>
or DelegateMemberAsyncWait<>
instance to be returned depending on if a free or member function is being bound. A "Wait
" delegate is typically not added to a delegate container. The typical usage pattern is to create a delegate and function arguments on the stack, then invoke. The code fragment below creates a blocking delegate with the function signature int (std::string&
). The function is called on workerThread1
. The function MemberFuncStdStringRetInt()
will update the outgoing string msg
and return an integer to the caller.
Delegates can invoke lambda functions asynchronously. The example below calls LambdaFunc1
on workerThread1
.
DelegateFree<>
class synchronously invokes a free target function. More...DelegateMember<>
class synchronously invokes a class member target function using a class object pointer. More...DelegateMemberSp<>
class synchronously invokes a class member target function using a std::shared_ptr
object. More...DelegateMember<>
class synchronously invokes a class member target function using a class object pointer or shared pointer. More...DelegateFunction<>
class synchronously invokes a std::function
target function. More...std::function
. DelegateMemberAsync<>
class asynchronously invokes a class member target function. More...DelegateMemberSpAsync<>
class asynchronously invokes a std::shared_ptr target function. More...DelegateFunctionAsync<>
class asynchronously invokes a std::function
target function. More...std::function
. DelegateMemberAsyncWait<>
class asynchronously block invokes a class member target function. More...DelegateMemberSpAsyncWait<>
class asynchronously block invokes a std::shared_ptr target function. More...DelegateFunctionAsyncWait<>
class asynchronously block invokes a std::function target function. More...std::function
with a wait and timeout. DelegateFunctionAsyncWait<>
class asynchronously block invokes a std::function target function DelegateMember<>
class synchronously invokes a class member target function using a class object pointer DelegateMember<>
class synchronously invokes a class member target function using a class object pointer or shared pointer DelegateMemberAsync<>
class asynchronously invokes a class member target function DelegateMemberAsyncWait<>
class asynchronously block invokes a class member target function DelegateMemberSp<>
class synchronously invokes a class member target function using a std::shared_ptr
object DelegateMemberSpAsync<>
class asynchronously invokes a std::shared_ptr target function DelegateMemberSpAsyncWait<>
class asynchronously block invokes a std::shared_ptr target function Delegate<>
instances. When invoked, each Delegate
instance within the invocation list is called. Delegate<>
instances. When invoked, each Delegate
instance within the invocation list is called. Invoke the delegate function on the destination thread. Called by the destintation thread.
-Each source thread call to operator()
generate a call to DelegateInvoke()
on the destination thread. Unlike DelegateAsyncWait
, a lock is not required between source and destination delegateMsg
access because the source thread is not waiting for the function call to complete.
Each source thread call to operator()
generate a call to DelegateInvoke()
on the destination thread. Unlike DelegateAsyncWait
, a lock is not required between source and destination delegateMsg
access because the source thread is not waiting for the function call to complete.
[in] | msg | The delegate message created and sent within operator()(Args... args) . |
Invoke the bound delegate function asynchronously. Called by the source thread.
-Invoke delegate function asynchronously and do not wait for return value. This function is called by the source thread. Dispatches the delegate data into the destination thread message queue. DelegateInvoke()
must be called by the destination thread to invoke the target function.
Invoke delegate function asynchronously and do not wait for return value. This function is called by the source thread. Dispatches the delegate data into the destination thread message queue. DelegateInvoke()
must be called by the destination thread to invoke the target function.
The DelegateAsyncMsg
duplicates and copies the function arguments into heap memory. The source thread is not required to place function arguments into the heap. The delegate library performs all necessary heap and argument coping for the caller. Ensure complex argument data types can be safely copied by creating a copy constructor if necessary.
[in] | args | The function arguments, if any. | |||||
DelegateFunction()=default | DelegateLib::DelegateFunction< RetType(Args...)> | ||||||
DelegateFunctionAsync(FunctionType func, DelegateThread &thread) | DelegateLib::DelegateFunctionAsync< RetType(Args...)> | inline | |||||
DelegateFunctionAsync(const ClassType &rhs) | DelegateLib::DelegateFunctionAsync< RetType(Args...)> | inline | |||||
DelegateFunctionAsync()=delete | DelegateLib::DelegateFunctionAsync< RetType(Args...)> | ||||||
DelegateFunctionAsyncWait(FunctionType func, DelegateThread &thread, std::chrono::milliseconds timeout=WAIT_INFINITE) | DelegateLib::DelegateFunctionAsyncWait< RetType(Args...)> | inline | |||||
DelegateFunctionAsyncWait(const ClassType &rhs) | DelegateLib::DelegateFunctionAsyncWait< RetType(Args...)> | inline | |||||
DelegateFunctionAsync(ClassType &&rhs) noexcept | DelegateLib::DelegateFunctionAsync< RetType(Args...)> | inline | |||||
DelegateFunctionAsync()=delete | DelegateLib::DelegateFunctionAsync< RetType(Args...)> | ||||||
DelegateFunctionAsyncWait(FunctionType func, DelegateThread &thread, std::chrono::milliseconds timeout=WAIT_INFINITE) | DelegateLib::DelegateFunctionAsyncWait< RetType(Args...)> | inline | |||||
DelegateFunctionAsyncWait(const ClassType &rhs) | DelegateLib::DelegateFunctionAsyncWait< RetType(Args...)> | inline | |||||
DelegateFunctionAsyncWait(ClassType &&rhs) noexcept | DelegateLib::DelegateFunctionAsyncWait< RetType(Args...)> | inline | |||||
DelegateFunctionAsyncWait()=delete | DelegateLib::DelegateFunctionAsyncWait< RetType(Args...)> | ||||||
DelegateInvoke(std::shared_ptr< DelegateMsg > msg) override | DelegateLib::DelegateFunctionAsyncWait< RetType(Args...)> | inlinevirtual | |||||
Empty() const noexcept | DelegateLib::DelegateFunction< RetType(Args...)> | inline | |||||
Public Member Functions | |||||||
DelegateFunctionAsyncWait (FunctionType func, DelegateThread &thread, std::chrono::milliseconds timeout=WAIT_INFINITE) | |||||||
Constructor to create a class instance. | |||||||
DelegateFunctionAsyncWait (const ClassType &rhs) | |||||||
Copy constructor that creates a copy of the given instance. | |||||||
DelegateFunctionAsyncWait (ClassType &&rhs) noexcept | |||||||
Move constructor that transfers ownership of resources. | |||||||
DelegateFunctionAsyncWait ()=delete | |||||||
void | Bind (FunctionType func, DelegateThread &thread) | ||||||
Bind a std::function to a delegate. | |||||||
Bind a std::function to the delegate. | |||||||
void | Assign (const ClassType &rhs) | ||||||
Assigns the state of one object to another. | |||||||
DelegateFunctionAsync (const ClassType &rhs) | |||||||
Copy constructor that creates a copy of the given instance. | |||||||
DelegateFunctionAsync (ClassType &&rhs) noexcept | |||||||
Move constructor that transfers ownership of resources. | |||||||
DelegateFunctionAsync ()=delete | |||||||
void | Bind (FunctionType func, DelegateThread &thread) |
+
|
+ +inlinenoexcept | +
Move constructor that transfers ownership of resources.
+[in] | rhs | The object to move from. |
Reimplemented from DelegateLib::DelegateFunctionAsync< RetType(Args...)>.
diff --git a/doxygen/html/class_delegate_lib_1_1_delegate_function_async_wait_3_01_ret_type_07_args_8_8_8_08_4.js b/doxygen/html/class_delegate_lib_1_1_delegate_function_async_wait_3_01_ret_type_07_args_8_8_8_08_4.js index 338722f..d10fa4c 100644 --- a/doxygen/html/class_delegate_lib_1_1_delegate_function_async_wait_3_01_ret_type_07_args_8_8_8_08_4.js +++ b/doxygen/html/class_delegate_lib_1_1_delegate_function_async_wait_3_01_ret_type_07_args_8_8_8_08_4.js @@ -5,6 +5,7 @@ var class_delegate_lib_1_1_delegate_function_async_wait_3_01_ret_type_07_args_8_ [ "FunctionType", "class_delegate_lib_1_1_delegate_function_async_wait_3_01_ret_type_07_args_8_8_8_08_4.html#a793983b42fc5819a186a891b9cac5806", null ], [ "DelegateFunctionAsyncWait", "class_delegate_lib_1_1_delegate_function_async_wait_3_01_ret_type_07_args_8_8_8_08_4.html#a12fee611f64b1ff921f144456f735c34", null ], [ "DelegateFunctionAsyncWait", "class_delegate_lib_1_1_delegate_function_async_wait_3_01_ret_type_07_args_8_8_8_08_4.html#a49ee2d06133beb8f1f97d9435dd233d8", null ], + [ "DelegateFunctionAsyncWait", "class_delegate_lib_1_1_delegate_function_async_wait_3_01_ret_type_07_args_8_8_8_08_4.html#a61de38703ed39347662b0d523940751a", null ], [ "DelegateFunctionAsyncWait", "class_delegate_lib_1_1_delegate_function_async_wait_3_01_ret_type_07_args_8_8_8_08_4.html#afae9b073f590b47117d0ee00e100b7e2", null ], [ "Assign", "class_delegate_lib_1_1_delegate_function_async_wait_3_01_ret_type_07_args_8_8_8_08_4.html#a06a1f3a07b3b85f30d1d149a8ce7694d", null ], [ "AsyncInvoke", "class_delegate_lib_1_1_delegate_function_async_wait_3_01_ret_type_07_args_8_8_8_08_4.html#a1c4342829881ac285f0d839906c9f930", null ], diff --git a/doxygen/html/class_delegate_lib_1_1_delegate_member_3_01_t_class_00_01_ret_type_07_args_8_8_8_08_4-members.html b/doxygen/html/class_delegate_lib_1_1_delegate_member_3_01_t_class_00_01_ret_type_07_args_8_8_8_08_4-members.html index 68a9173..098c396 100644 --- a/doxygen/html/class_delegate_lib_1_1_delegate_member_3_01_t_class_00_01_ret_type_07_args_8_8_8_08_4-members.html +++ b/doxygen/html/class_delegate_lib_1_1_delegate_member_3_01_t_class_00_01_ret_type_07_args_8_8_8_08_4-members.html @@ -103,6 +103,8 @@This is the complete list of members for DelegateLib::DelegateMember< TClass, RetType(Args...)>, including all inherited members.
Assign(const ClassType &rhs) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
Bind(SharedPtr object, MemberFunc func) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
Bind(SharedPtr object, ConstMemberFunc func) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
Bind(ObjectPtr object, MemberFunc func) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
Bind(ObjectPtr object, ConstMemberFunc func) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
ClassType typedef | DelegateLib::DelegateMember< TClass, RetType(Args...)> | |
Clone() const override | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inlinevirtual |
ConstMemberFunc typedef | DelegateLib::DelegateMember< TClass, RetType(Args...)> | |
DelegateBase()=default | DelegateLib::DelegateBase | |
DelegateMember(SharedPtr object, MemberFunc func) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
DelegateMember(SharedPtr object, ConstMemberFunc func) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
DelegateMember(ObjectPtr object, MemberFunc func) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
DelegateMember(ObjectPtr object, ConstMemberFunc func) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
DelegateMember(const ClassType &rhs) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
operator=(const ClassType &rhs) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
operator=(ClassType &&rhs) noexcept | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
operator==(const DelegateBase &rhs) const override | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inlinevirtual |
~DelegateBase() noexcept=default | DelegateLib::DelegateBase | virtual |
SharedPtr typedef | DelegateLib::DelegateMember< TClass, RetType(Args...)> | |
~DelegateBase() noexcept=default | DelegateLib::DelegateBase | virtual |
DelegateMember<>
class synchronously invokes a class member target function using a class object pointer.
+
DelegateMember<>
class synchronously invokes a class member target function using a class object pointer or shared pointer.
More...
#include <Delegate.h>
Public Member Functions | |
DelegateMember (SharedPtr object, MemberFunc func) | |
Constructor to create a class instance. | |
DelegateMember (SharedPtr object, ConstMemberFunc func) | |
Constructor to create a class instance. | |
DelegateMember (ObjectPtr object, MemberFunc func) | |
Constructor to create a class instance. | |
DelegateMember ()=default | |
Default constructor creates an empty delegate. | |
void | Bind (SharedPtr object, MemberFunc func) |
Bind a member function to the delegate. | |
void | Bind (SharedPtr object, ConstMemberFunc func) |
Bind a const member function to the delegate. | |
void | Bind (ObjectPtr object, MemberFunc func) |
Bind a member function to the delegate. | |
DelegateMember<>
class synchronously invokes a class member target function using a class object pointer.
DelegateMember<>
class synchronously invokes a class member target function using a class object pointer or shared pointer.
TClass | The class type that contains the member function. |
std::shared_ptr<TClass> DelegateLib::DelegateMember< TClass, RetType(Args...)>::SharedPtr | +
+
|
+ +inline | +
Constructor to create a class instance.
+[in] | object | The target object pointer to store. |
[in] | func | The target member function to store. |
+
|
+ +inline | +
Constructor to create a class instance.
+[in] | object | The target object pointer to store. |
[in] | func | The target const member function to store. |
+
|
+ +inline | +
Bind a const member function to the delegate.
+This method associates a member function (func
) with the delegate. Once the function is bound, the delegate can be used to invoke the function.
[in] | object | The target object instance. |
[in] | func | The function to bind to the delegate. The member function to bind to the delegate. This function must match the signature of the delegate. |
+
|
+ +inline | +
Bind a member function to the delegate.
+This method associates a member function (func
) with the delegate. Once the function is bound, the delegate can be used to invoke the function.
[in] | object | The target object instance. |
[in] | func | The member function to bind to the delegate. This function must match the signature of the delegate. |
Public Member Functions | |||||||||||||
DelegateMemberAsync (SharedPtr object, MemberFunc func, DelegateThread &thread) | |||||||||||||
Constructor to create a class instance. | |||||||||||||
DelegateMemberAsync (SharedPtr object, ConstMemberFunc func, DelegateThread &thread) | |||||||||||||
Constructor to create a class instance. | |||||||||||||
DelegateMemberAsync (ObjectPtr object, MemberFunc func, DelegateThread &thread) | |||||||||||||
Constructor to create a class instance. | |||||||||||||
DelegateMemberAsync (const ClassType &rhs) | |||||||||||||
Copy constructor that creates a copy of the given instance. | |||||||||||||
DelegateMemberAsync (ClassType &&rhs) noexcept | |||||||||||||
Move constructor that transfers ownership of resources. | |||||||||||||
DelegateMemberAsync ()=delete | |||||||||||||
void | Bind (SharedPtr object, MemberFunc func, DelegateThread &thread) | ||||||||||||
Bind a const member function to the delegate. | |||||||||||||
void | Bind (SharedPtr object, ConstMemberFunc func, DelegateThread &thread) | ||||||||||||
Bind a member function to the delegate. | |||||||||||||
void | Bind (ObjectPtr object, MemberFunc func, DelegateThread &thread) | ||||||||||||
Bind a const member function to the delegate. | |||||||||||||
void | AsyncInvoke (Args... args) | ||||||||||||
Invoke delegate function asynchronously. Do not wait for return value. Called by the source thread. | |||||||||||||
virtual void | DelegateInvoke (std::shared_ptr< DelegateMsg > msg) | ||||||||||||
Invoke the delegate function on the destination thread. Called by the destintation thread. | |||||||||||||
virtual void | DelegateInvoke (std::shared_ptr< DelegateMsg > msg) override | ||||||||||||
Invoke the delegate function on the destination thread. Called by the destintation thread. | |||||||||||||
DelegateThread & | GetThread () noexcept | ||||||||||||
Get the destination thread that the target function is invoked on. | |||||||||||||
Public Member Functions inherited from DelegateLib::DelegateMember< TClass, RetType(Args...)> | |||||||||||||
DelegateMember (SharedPtr object, MemberFunc func) | |||||||||||||
Constructor to create a class instance. | |||||||||||||
DelegateMember (SharedPtr object, ConstMemberFunc func) | |||||||||||||
Constructor to create a class instance. | |||||||||||||
DelegateMember (ObjectPtr object, MemberFunc func) | |||||||||||||
Constructor to create a class instance. | |||||||||||||
DelegateMember ()=default | |||||||||||||
Default constructor creates an empty delegate. | |||||||||||||
void | Bind (SharedPtr object, MemberFunc func) | ||||||||||||
Bind a member function to the delegate. | |||||||||||||
void | Bind (SharedPtr object, ConstMemberFunc func) | ||||||||||||
Bind a const member function to the delegate. | |||||||||||||
void | Bind (ObjectPtr object, MemberFunc func) | ||||||||||||
Bind a member function to the delegate. | |||||||||||||
std::shared_ptr<TClass> DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)>::SharedPtr | +
+
|
+ +inline | +
Constructor to create a class instance.
+[in] | object | The target object pointer to store. |
[in] | func | The target member function to store. |
[in] | thread | The execution thread to invoke func . |
+
|
+ +inline | +
Constructor to create a class instance.
+[in] | object | The target object pointer to store. |
[in] | func | The target const member function to store. |
[in] | thread | The execution thread to invoke func . |
+
|
+ +inlinenoexcept | +
Move constructor that transfers ownership of resources.
+[in] | rhs | The object to move from. |
+
|
+ +inline | +
Bind a member function to the delegate.
+This method associates a member function (func
) with the delegate. Once the function is bound, the delegate can be used to invoke the function.
[in] | object | The target object instance. |
[in] | func | The member function to bind to the delegate. This function must match the signature of the delegate. |
[in] | thread | The execution thread to invoke func . |
+
|
+ +inline | +
Bind a const member function to the delegate.
+This method associates a member function (func
) with the delegate. Once the function is bound, the delegate can be used to invoke the function.
[in] | object | The target object instance. |
[in] | func | The function to bind to the delegate. This function must match the signature of the delegate. |
[in] | thread | The execution thread to invoke func . |
Invoke the delegate function on the destination thread. Called by the destintation thread.
-Each source thread call to operator()
generate a call to DelegateInvoke()
on the destination thread. Unlike DelegateAsyncWait
, a lock is not required between source and destination delegateMsg
access because the source thread is not waiting for the function call to complete.
Each source thread call to operator()
generate a call to DelegateInvoke()
on the destination thread. Unlike DelegateAsyncWait
, a lock is not required between source and destination delegateMsg
access because the source thread is not waiting for the function call to complete.
[in] | msg | The delegate message created and sent within operator()(Args... args) . |
Invoke the bound delegate function asynchronously. Called by the source thread.
-Invoke delegate function asynchronously and do not wait for return value. This function is called by the source thread. Dispatches the delegate data into the destination thread message queue. DelegateInvoke()
must be called by the destination thread to invoke the target function.
Invoke delegate function asynchronously and do not wait for return value. This function is called by the source thread. Dispatches the delegate data into the destination thread message queue. DelegateInvoke()
must be called by the destination thread to invoke the target function.
The DelegateAsyncMsg
duplicates and copies the function arguments into heap memory. The source thread is not required to place function arguments into the heap. The delegate library performs all necessary heap and argument coping for the caller. Ensure complex argument data types can be safely copied by creating a copy constructor if necessary.
[in] | args | The function arguments, if any. |
DelegateLib::DelegateMember< TClass, RetType(Args...)>::Assign(const ClassType &rhs) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
AsyncInvoke(Args... args) | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
BaseType typedef | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | |
Bind(SharedPtr object, MemberFunc func, DelegateThread &thread) | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
Bind(SharedPtr object, ConstMemberFunc func, DelegateThread &thread) | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
Bind(ObjectPtr object, MemberFunc func, DelegateThread &thread) | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
Bind(ObjectPtr object, ConstMemberFunc func, DelegateThread &thread) | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
DelegateLib::DelegateMember< TClass, RetType(Args...)>::Bind(ObjectPtr object, MemberFunc func) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
ClassType typedef | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | |
Clear() noexcept | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
Clone() const override | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inlinevirtual |
ConstMemberFunc typedef | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | |
DelegateBase()=default | DelegateLib::DelegateBase | |
DelegateInvoke(std::shared_ptr< DelegateMsg > msg) override | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inlinevirtual |
DelegateMember(ObjectPtr object, MemberFunc func) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
DelegateMember(ObjectPtr object, ConstMemberFunc func) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
DelegateMember(const ClassType &rhs) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
DelegateMember(ClassType &&rhs) noexcept | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
DelegateMember()=default | DelegateLib::DelegateMember< TClass, RetType(Args...)> | |
DelegateMemberAsync(ObjectPtr object, MemberFunc func, DelegateThread &thread) | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inline |
DelegateMemberAsync(ObjectPtr object, ConstMemberFunc func, DelegateThread &thread) | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inline |
DelegateMemberAsync(const ClassType &rhs) | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inline |
DelegateLib::DelegateMember< TClass, RetType(Args...)>::Bind(SharedPtr object, MemberFunc func) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
DelegateLib::DelegateMember< TClass, RetType(Args...)>::Bind(ObjectPtr object, MemberFunc func) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
ClassType typedef | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | |
Clear() noexcept | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
Clone() const override | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inlinevirtual |
ConstMemberFunc typedef | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | |
DelegateBase()=default | DelegateLib::DelegateBase | |
DelegateInvoke(std::shared_ptr< DelegateMsg > msg) override | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inlinevirtual |
DelegateMember(SharedPtr object, MemberFunc func) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
DelegateMember(SharedPtr object, ConstMemberFunc func) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
DelegateMember(ObjectPtr object, MemberFunc func) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
DelegateMember(ObjectPtr object, ConstMemberFunc func) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
DelegateMember(const ClassType &rhs) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
DelegateMember(ClassType &&rhs) noexcept | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
DelegateMember()=default | DelegateLib::DelegateMember< TClass, RetType(Args...)> | |
DelegateMemberAsync(SharedPtr object, MemberFunc func, DelegateThread &thread) | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inline |
DelegateMemberAsync(SharedPtr object, ConstMemberFunc func, DelegateThread &thread) | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inline |
DelegateMemberAsync(ObjectPtr object, MemberFunc func, DelegateThread &thread) | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inline |
DelegateMemberAsync(ObjectPtr object, ConstMemberFunc func, DelegateThread &thread) | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inline |
DelegateMemberAsync(const ClassType &rhs) | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inline |
DelegateMemberAsync(ClassType &&rhs) noexcept | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inline |
DelegateMemberAsync()=delete | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | |
DelegateMemberAsyncWait(SharedPtr object, MemberFunc func, DelegateThread &thread, std::chrono::milliseconds timeout=WAIT_INFINITE) | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
DelegateMemberAsyncWait(SharedPtr object, ConstMemberFunc func, DelegateThread &thread, std::chrono::milliseconds timeout) | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
DelegateMemberAsyncWait(ObjectPtr object, MemberFunc func, DelegateThread &thread, std::chrono::milliseconds timeout=WAIT_INFINITE) | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
DelegateMemberAsyncWait(ObjectPtr object, ConstMemberFunc func, DelegateThread &thread, std::chrono::milliseconds timeout) | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
DelegateMemberAsyncWait(const ClassType &rhs) | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
DelegateMemberAsyncWait()=delete | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | |
Empty() const noexcept | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
GetRetVal() noexcept | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
GetSync() | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inlineprotected |
GetThread() noexcept | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inline |
IsSuccess() noexcept | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
MemberFunc typedef | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | |
ObjectPtr typedef | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | |
operator bool() const noexcept | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inlineexplicit |
operator!=(const DelegateBase &rhs) const | DelegateLib::DelegateBase | inlinevirtual |
operator()(Args... args) override | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inlinevirtual |
operator=(const ClassType &rhs) | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
operator=(ClassType &&rhs) noexcept | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)>::operator=(const ClassType &rhs) | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inline |
DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)>::operator=(ClassType &&rhs) noexcept | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inline |
DelegateLib::DelegateMember< TClass, RetType(Args...)>::operator=(const ClassType &rhs) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
DelegateLib::DelegateMember< TClass, RetType(Args...)>::operator=(ClassType &&rhs) noexcept | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
operator==(const DelegateBase &rhs) const override | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inlinevirtual |
SetSync(bool sync) | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inlineprotected |
DelegateMemberAsyncWait(ClassType &&rhs) noexcept | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
DelegateMemberAsyncWait()=delete | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | |
Empty() const noexcept | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
GetRetVal() noexcept | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
GetSync() | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inlineprotected |
GetThread() noexcept | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inline |
IsSuccess() noexcept | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
MemberFunc typedef | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | |
ObjectPtr typedef | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | |
operator bool() const noexcept | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inlineexplicit |
operator!=(const DelegateBase &rhs) const | DelegateLib::DelegateBase | inlinevirtual |
operator()(Args... args) override | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inlinevirtual |
operator=(const ClassType &rhs) | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
operator=(ClassType &&rhs) noexcept | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inline |
DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)>::operator=(const ClassType &rhs) | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inline |
DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)>::operator=(ClassType &&rhs) noexcept | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inline |
DelegateLib::DelegateMember< TClass, RetType(Args...)>::operator=(const ClassType &rhs) | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
DelegateLib::DelegateMember< TClass, RetType(Args...)>::operator=(ClassType &&rhs) noexcept | DelegateLib::DelegateMember< TClass, RetType(Args...)> | inline |
operator==(const DelegateBase &rhs) const override | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | inlinevirtual |
SetSync(bool sync) | DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | inlineprotected |
SharedPtr typedef | DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | |
~DelegateBase() noexcept=default | DelegateLib::DelegateBase | virtual |
Public Member Functions | |||||||||||||||||
DelegateMemberAsyncWait (SharedPtr object, MemberFunc func, DelegateThread &thread, std::chrono::milliseconds timeout=WAIT_INFINITE) | |||||||||||||||||
Constructor to create a class instance. | |||||||||||||||||
DelegateMemberAsyncWait (SharedPtr object, ConstMemberFunc func, DelegateThread &thread, std::chrono::milliseconds timeout) | |||||||||||||||||
Constructor to create a class instance. | |||||||||||||||||
DelegateMemberAsyncWait (ObjectPtr object, MemberFunc func, DelegateThread &thread, std::chrono::milliseconds timeout=WAIT_INFINITE) | |||||||||||||||||
Constructor to create a class instance. | |||||||||||||||||
DelegateMemberAsyncWait (ObjectPtr object, ConstMemberFunc func, DelegateThread &thread, std::chrono::milliseconds timeout) | |||||||||||||||||
Constructor to create a class instance. | |||||||||||||||||
DelegateMemberAsyncWait (const ClassType &rhs) | |||||||||||||||||
Copy constructor that creates a copy of the given instance. | |||||||||||||||||
DelegateMemberAsyncWait (ClassType &&rhs) noexcept | |||||||||||||||||
Move constructor that transfers ownership of resources. | |||||||||||||||||
DelegateMemberAsyncWait ()=delete | |||||||||||||||||
void | Bind (SharedPtr object, MemberFunc func, DelegateThread &thread) | ||||||||||||||||
Bind a const member function to the delegate. | |||||||||||||||||
void | Bind (SharedPtr object, ConstMemberFunc func, DelegateThread &thread) | ||||||||||||||||
Bind a member function to the delegate. | |||||||||||||||||
void | Bind (ObjectPtr object, MemberFunc func, DelegateThread &thread) | ||||||||||||||||
Bind a member function to a delegate. | |||||||||||||||||
Bind a const member function to the delegate. | |||||||||||||||||
void | Bind (ObjectPtr object, ConstMemberFunc func, DelegateThread &thread) | ||||||||||||||||
Bind a const member function to a delegate. | |||||||||||||||||
Bind a member function to the delegate. | |||||||||||||||||
void | Assign (const ClassType &rhs) | ||||||||||||||||
Assigns the state of one object to another. | |||||||||||||||||
RetType | GetRetVal () noexcept | ||||||||||||||||
Public Member Functions inherited from DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | |||||||||||||||||
DelegateMemberAsync (SharedPtr object, MemberFunc func, DelegateThread &thread) | |||||||||||||||||
Constructor to create a class instance. | |||||||||||||||||
DelegateMemberAsync (SharedPtr object, ConstMemberFunc func, DelegateThread &thread) | |||||||||||||||||
Constructor to create a class instance. | |||||||||||||||||
DelegateMemberAsync (ObjectPtr object, MemberFunc func, DelegateThread &thread) | |||||||||||||||||
Constructor to create a class instance. | |||||||||||||||||
DelegateMemberAsync (const ClassType &rhs) | |||||||||||||||||
Copy constructor that creates a copy of the given instance. | |||||||||||||||||
DelegateMemberAsync (ClassType &&rhs) noexcept | |||||||||||||||||
Move constructor that transfers ownership of resources. | |||||||||||||||||
DelegateMemberAsync ()=delete | |||||||||||||||||
void | Bind (SharedPtr object, MemberFunc func, DelegateThread &thread) | ||||||||||||||||
Bind a const member function to the delegate. | |||||||||||||||||
void | Bind (SharedPtr object, ConstMemberFunc func, DelegateThread &thread) | ||||||||||||||||
Bind a member function to the delegate. | |||||||||||||||||
void | Bind (ObjectPtr object, MemberFunc func, DelegateThread &thread) | ||||||||||||||||
Bind a const member function to the delegate. | |||||||||||||||||
Get the destination thread that the target function is invoked on. | |||||||||||||||||
Public Member Functions inherited from DelegateLib::DelegateMember< TClass, RetType(Args...)> | |||||||||||||||||
DelegateMember (SharedPtr object, MemberFunc func) | |||||||||||||||||
Constructor to create a class instance. | |||||||||||||||||
DelegateMember (SharedPtr object, ConstMemberFunc func) | |||||||||||||||||
Constructor to create a class instance. | |||||||||||||||||
DelegateMember (ObjectPtr object, MemberFunc func) | |||||||||||||||||
Constructor to create a class instance. | |||||||||||||||||
DelegateMember ()=default | |||||||||||||||||
Default constructor creates an empty delegate. | |||||||||||||||||
void | Bind (SharedPtr object, MemberFunc func) | ||||||||||||||||
Bind a member function to the delegate. | |||||||||||||||||
void | Bind (SharedPtr object, ConstMemberFunc func) | ||||||||||||||||
Bind a const member function to the delegate. | |||||||||||||||||
void | Bind (ObjectPtr object, MemberFunc func) | ||||||||||||||||
Bind a member function to the delegate. | |||||||||||||||||
std::shared_ptr<TClass> DelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)>::SharedPtr | +
+
|
+ +inline | +
Constructor to create a class instance.
+[in] | object | The target object pointer to store. |
[in] | func | The target member function to store. |
[in] | thread | The execution thread to invoke func . |
[in] | timeout | The calling thread timeout for destination thread to invoke the target function. + |
+
|
+ +inline | +
Constructor to create a class instance.
+[in] | object | The target object pointer to store. |
[in] | func | The target const member function to store. |
[in] | thread | The execution thread to invoke func . |
[in] | timeout | The calling thread timeout for destination thread to invoke the target function. + |
+
|
+ +inlinenoexcept | +
Move constructor that transfers ownership of resources.
+[in] | rhs | The object to move from. |
+
|
+ +inline | +
Bind a member function to the delegate.
+This method associates a member function (func
) with the delegate. Once the function is bound, the delegate can be used to invoke the function.
[in] | object | The target object instance. |
[in] | func | The member function to bind to the delegate. This function must match the signature of the delegate. |
[in] | thread | The execution thread to invoke func . |
+
|
+ +inline | +
Bind a const member function to the delegate.
+This method associates a member function (func
) with the delegate. Once the function is bound, the delegate can be used to invoke the function.
[in] | object | The target object instance. |
[in] | func | The function to bind to the delegate. This function must match the signature of the delegate. |
[in] | thread | The execution thread to invoke func . |
Reimplemented from DelegateLib::DelegateMemberAsync< TClass, RetType(Args...)>.
▼CDelegateLib::DelegateFunction< RetType(Args...)> | DelegateFunction<> class synchronously invokes a std::function target function |
▼CDelegateLib::DelegateFunctionAsync< RetType(Args...)> | DelegateFunctionAsync<> class asynchronously invokes a std::function target function |
CDelegateLib::DelegateFunctionAsyncWait< RetType(Args...)> | DelegateFunctionAsyncWait<> class asynchronously block invokes a std::function target function |
▼CDelegateLib::DelegateMember< TClass, RetType(Args...)> | DelegateMember<> class synchronously invokes a class member target function using a class object pointer |
▼CDelegateLib::DelegateMember< TClass, RetType(Args...)> | DelegateMember<> class synchronously invokes a class member target function using a class object pointer or shared pointer |
▼CDelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | DelegateMemberAsync<> class asynchronously invokes a class member target function |
CDelegateLib::DelegateMemberAsyncWait< TClass, RetType(Args...)> | DelegateMemberAsyncWait<> class asynchronously block invokes a class member target function |
▼CDelegateLib::DelegateMemberSp< TClass, RetType(Args...)> | DelegateMemberSp<> class synchronously invokes a class member target function using a std::shared_ptr object |
▼CDelegateLib::DelegateMemberSpAsync< TClass, RetType(Args...)> | DelegateMemberSpAsync<> class asynchronously invokes a std::shared_ptr target function |
CDelegateLib::DelegateMemberSpAsyncWait< TClass, RetType(Args...)> | DelegateMemberSpAsyncWait<> class asynchronously block invokes a std::shared_ptr target function |
CDelegateLib::DelegateFree< R > | |
CDelegateLib::DelegateFreeAsync< R > | |
CDelegateLib::DelegateFreeAsyncWait< R > | |
CDelegateLib::DelegateFunction< R > | |
CDelegateLib::DelegateFunctionAsync< R > | |
CDelegateLib::DelegateFunctionAsyncWait< R > | |
CDelegateLib::DelegateMember< C, R > | |
CDelegateLib::DelegateMemberAsync< C, R > | |
CDelegateLib::DelegateMemberAsyncWait< C, R > | |
CDelegateLib::DelegateMemberSp< C, R > | |
CDelegateLib::DelegateMemberSpAsync< C, R > | |
CDelegateLib::DelegateMemberSpAsyncWait< C, R > | |
▼CDelegateLib::DelegateMsg | Base class for all delegate inter-thread messages |
CDelegateLib::DelegateAsyncMsg< Args > | Stores all function arguments suitable for non-blocking asynchronous calls. Argument data is stored in the heap |
CDelegateLib::DelegateAsyncWaitMsg< Args > | Stores all function arguments suitable for blocking asynchronous calls. Argument data is not stored in the heap |
CDelegateLib::DelegateThread | |
▼Cstd::false_type | |
CDelegateLib::is_shared_ptr< T > | |
▼CDelegateLib::heap_arg_deleter_base | Base class for all deleter's |
CDelegateLib::heap_arg_deleter< T > | Frees heap memory for reference heap argument |
CDelegateLib::heap_arg_deleter< T * > | Frees heap memory for pointer heap argument |
CDelegateLib::heap_arg_deleter< T ** > | Frees heap memory for pointer to pointer heap argument |
▼CDelegateLib::IDelegateInvoker | Abstract base class to support asynchronous delegate function invoke on destination thread of control |
CDelegateLib::DelegateFreeAsync< RetType(Args...)> | DelegateFreeAsync<> class asynchronously invokes a free target function |
CDelegateLib::DelegateFunctionAsync< RetType(Args...)> | DelegateFunctionAsync<> class asynchronously invokes a std::function target function |
CDelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | DelegateMemberAsync<> class asynchronously invokes a class member target function |
CDelegateLib::DelegateMemberSpAsync< TClass, RetType(Args...)> | DelegateMemberSpAsync<> class asynchronously invokes a std::shared_ptr target function |
CDelegateLib::MulticastDelegate< R > | |
▼CDelegateLib::MulticastDelegate< RetType(Args...)> | Not thread-safe multicast delegate container class. The class has a list of Delegate<> instances. When invoked, each Delegate instance within the invocation list is called. + |
CDelegateLib::DelegateFree< R > | |
CDelegateLib::DelegateFreeAsync< R > | |
CDelegateLib::DelegateFreeAsyncWait< R > | |
CDelegateLib::DelegateFunction< R > | |
CDelegateLib::DelegateFunctionAsync< R > | |
CDelegateLib::DelegateFunctionAsyncWait< R > | |
CDelegateLib::DelegateMember< C, R > | |
CDelegateLib::DelegateMemberAsync< C, R > | |
CDelegateLib::DelegateMemberAsyncWait< C, R > | |
▼CDelegateLib::DelegateMsg | Base class for all delegate inter-thread messages |
CDelegateLib::DelegateAsyncMsg< Args > | Stores all function arguments suitable for non-blocking asynchronous calls. Argument data is stored in the heap |
CDelegateLib::DelegateAsyncWaitMsg< Args > | Stores all function arguments suitable for blocking asynchronous calls. Argument data is not stored in the heap |
CDelegateLib::DelegateThread | |
▼Cstd::false_type | |
CDelegateLib::is_shared_ptr< T > | |
▼CDelegateLib::heap_arg_deleter_base | Base class for all deleter's |
CDelegateLib::heap_arg_deleter< T > | Frees heap memory for reference heap argument |
CDelegateLib::heap_arg_deleter< T * > | Frees heap memory for pointer heap argument |
CDelegateLib::heap_arg_deleter< T ** > | Frees heap memory for pointer to pointer heap argument |
▼CDelegateLib::IDelegateInvoker | Abstract base class to support asynchronous delegate function invoke on destination thread of control |
CDelegateLib::DelegateFreeAsync< RetType(Args...)> | DelegateFreeAsync<> class asynchronously invokes a free target function |
CDelegateLib::DelegateFunctionAsync< RetType(Args...)> | DelegateFunctionAsync<> class asynchronously invokes a std::function target function |
CDelegateLib::DelegateMemberAsync< TClass, RetType(Args...)> | DelegateMemberAsync<> class asynchronously invokes a class member target function |
CDelegateLib::MulticastDelegate< R > | |
▼CDelegateLib::MulticastDelegate< RetType(Args...)> | Not thread-safe multicast delegate container class. The class has a list of Delegate<> instances. When invoked, each Delegate instance within the invocation list is called. |
CDelegateLib::MulticastDelegateSafe< RetType(Args...)> | Thread-safe multicast delegate container class |
CDelegateLib::MulticastDelegateSafe< R > | |
CDelegateLib::Semaphore | A semaphore wrapper class |
CDelegateLib::SinglecastDelegate< R > | |
CDelegateLib::SinglecastDelegate< RetType(Args...)> | A non-thread safe delegate container storing one delegate. Void and + |
CDelegateLib::MulticastDelegateSafe< RetType(Args...)> | Thread-safe multicast delegate container class |
CDelegateLib::MulticastDelegateSafe< R > | |
CDelegateLib::Semaphore | A semaphore wrapper class |
CDelegateLib::SinglecastDelegate< R > | |
CDelegateLib::SinglecastDelegate< RetType(Args...)> | A non-thread safe delegate container storing one delegate. Void and non-void return values supported. |
▼Cstd::true_type | |
CDelegateLib::is_shared_ptr< const std::shared_ptr< T > & > | |
CDelegateLib::is_shared_ptr< const std::shared_ptr< T > * > | |
CDelegateLib::is_shared_ptr< std::shared_ptr< T > & > | |
CDelegateLib::is_shared_ptr< std::shared_ptr< T > * > | |
CDelegateLib::is_shared_ptr< std::shared_ptr< T > > | |
▼Cstd::true_type | |
CDelegateLib::is_shared_ptr< const std::shared_ptr< T > & > | |
CDelegateLib::is_shared_ptr< const std::shared_ptr< T > * > | |
CDelegateLib::is_shared_ptr< std::shared_ptr< T > & > | |
CDelegateLib::is_shared_ptr< std::shared_ptr< T > * > | |
CDelegateLib::is_shared_ptr< std::shared_ptr< T > > |
DelegateMember<>
class synchronously invokes a class member target function using a class object pointer. More...DelegateMember<>
class synchronously invokes a class member target function using a class object pointer or shared pointer. More...DelegateMemberAsyncWait<>
class asynchronously block invokes a class member target function. More...DelegateMemberSp<>
class synchronously invokes a class member target function using a std::shared_ptr
object. More...DelegateMemberSpAsync<>
class asynchronously invokes a std::shared_ptr target function. More...DelegateMemberSpAsyncWait<>
class asynchronously block invokes a std::shared_ptr target function. More...std::function
. std::function
. std::function
with a wait and timeout. DelegateMemberSp
object bound to the specified non-const member function.DelegateMember
shared pointer bound to the specified non-const member function.TClass | The class type that contains the member function. | |||
DelegateMemberSpAsync< TClass, RetVal(Args...)> DelegateLib::MakeDelegate | +DelegateMemberAsync< TClass, RetVal(Args...)> DelegateLib::MakeDelegate | ( | std::shared_ptr< TClass > | object, |
TClass | The class type that contains the member function. | |||
DelegateMemberSpAsyncWait< TClass, RetVal(Args...)> DelegateLib::MakeDelegate | +DelegateMemberAsyncWait< TClass, RetVal(Args...)> DelegateLib::MakeDelegate | ( | std::shared_ptr< TClass > | object, |
TClass | The class type that contains the member function. |