DelegateMQ
Loading...
Searching...
No Matches
dmq Namespace Reference

The delegate library namespace. More...

Namespaces

namespace  trait
 

Classes

struct  Delegate
 
class  Delegate< RetType(Args...)>
 Template base class for all delegates. More...
 
class  DelegateAsyncMsg
 Stores all function arguments suitable for non-blocking asynchronous calls. Argument data is stored in the heap. More...
 
class  DelegateAsyncWaitMsg
 Stores all function arguments suitable for blocking asynchronous calls. Argument data is not stored in the heap. More...
 
class  DelegateBase
 Non-template base class for all delegates. More...
 
struct  DelegateFree
 
class  DelegateFree< RetType(Args...)>
 DelegateFree<> class synchronously invokes a free target function. More...
 
struct  DelegateFreeAsync
 
class  DelegateFreeAsync< RetType(Args...)>
 DelegateFreeAsync<> class asynchronously invokes a free target function. More...
 
struct  DelegateFreeAsyncWait
 
class  DelegateFreeAsyncWait< RetType(Args...)>
 DelegateFreeAsyncWait<> class asynchronously block invokes a free target function. More...
 
struct  DelegateFreeRemote
 
class  DelegateFreeRemote< RetType(Args...)>
 DelegateFreeRemote<> class asynchronously invokes a free target function. More...
 
class  DelegateFunction
 
class  DelegateFunction< RetType(Args...)>
 DelegateFunction<> class synchronously invokes a std::function target function. More...
 
struct  DelegateFunctionAsync
 
class  DelegateFunctionAsync< RetType(Args...)>
 DelegateFunctionAsync<> class asynchronously invokes a std::function target function. More...
 
struct  DelegateFunctionAsyncWait
 
class  DelegateFunctionAsyncWait< RetType(Args...)>
 DelegateFunctionAsyncWait<> class asynchronously block invokes a std::function target function. More...
 
struct  DelegateFunctionRemote
 
class  DelegateFunctionRemote< RetType(Args...)>
 DelegateFunctionRemote<> class asynchronously invokes a std::function target function. More...
 
struct  DelegateMember
 
class  DelegateMember< TClass, RetType(Args...)>
 DelegateMember<> class synchronously invokes a class member target function using a class object pointer or shared pointer. More...
 
struct  DelegateMemberAsync
 
class  DelegateMemberAsync< TClass, RetType(Args...)>
 DelegateMemberAsync<> class asynchronously invokes a class member target function. More...
 
struct  DelegateMemberAsyncWait
 
class  DelegateMemberAsyncWait< TClass, RetType(Args...)>
 DelegateMemberAsyncWait<> class asynchronously block invokes a class member target function. More...
 
struct  DelegateMemberRemote
 
class  DelegateMemberRemote< TClass, RetType(Args...)>
 DelegateMemberRemote<> class asynchronously invokes a class member target function. More...
 
class  DelegateMsg
 Base class for all delegate inter-thread messages. More...
 
class  heap_arg_deleter
 Frees heap memory for reference heap argument. More...
 
class  heap_arg_deleter< T * >
 Frees heap memory for pointer heap argument. More...
 
class  heap_arg_deleter< T ** >
 Frees heap memory for pointer to pointer heap argument. More...
 
class  heap_arg_deleter_base
 Base class for all deleter's. More...
 
class  IDispatcher
 Delegate interface class to dispatch serialized function argument data to a remote destination. Implemented by the application if using remote delegates. More...
 
class  IRemoteInvoker
 Abstract base class to support remote delegate function invoke to a remote system. Used internally by the delegate library, not user application code. More...
 
struct  is_shared_ptr
 
struct  is_shared_ptr< const std::shared_ptr< T > & >
 
struct  is_shared_ptr< const std::shared_ptr< T > * >
 
struct  is_shared_ptr< std::shared_ptr< T > & >
 
struct  is_shared_ptr< std::shared_ptr< T > * >
 
struct  is_shared_ptr< std::shared_ptr< T > >
 
struct  is_unique_ptr
 
struct  is_unique_ptr< std::unique_ptr< T > >
 
struct  ISerializer
 
class  ISerializer< RetType(Args...)>
 Delegate serializer interface for serializing and deserializing remote delegate arguments. Implemented by application code if remote delegates are used. More...
 
class  IThread
 
class  IThreadInvoker
 Abstract base class to support asynchronous delegate function invoke on destination thread of control. Used internally by the delegate library, not user application code.
More...
 
struct  MulticastDelegate
 
class  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.
More...
 
struct  MulticastDelegateSafe
 
class  MulticastDelegateSafe< RetType(Args...)>
 Thread-safe multicast delegate container class. More...
 
class  RemoteArg
 
class  RemoteArg< Arg & >
 
class  RemoteArg< Arg * >
 
class  RemoteArg< Arg ** >
 
class  Semaphore
 A semaphore wrapper class. More...
 
struct  UnicastDelegate
 
class  UnicastDelegate< RetType(Args...)>
 A non-thread-safe delegate container storing one delegate. Void and
non-void return values supported.
More...
 
struct  UnicastDelegateSafe
 
class  UnicastDelegateSafe< RetType(Args...)>
 A thread-safe delegate container storing one delegate. Void and
non-void return values supported.
More...
 

Typedefs

using Duration = std::chrono::duration<uint32_t, std::milli>
 
typedef int DelegateErrorAux
 
template<size_t N, class... Args>
using ArgTypeOf
 
typedef uint16_t DelegateRemoteId
 

Enumerations

enum class  DelegateError {
  SUCCESS = 0 , ERR_STREAM_NOT_GOOD = 1 , ERR_NO_SERIALIZER = 2 , ERR_SERIALIZE = 3 ,
  ERR_DESERIALIZE = 4 , ERR_DESERIALIZE_EXCEPTION = 5 , ERR_NO_DISPATCHER = 6 , ERR_DISPATCH = 7
}
 

Functions

template<class RetType , class... Args>
auto MakeDelegate (RetType(*func)(Args... args))
 Creates a delegate that binds to a free function.
 
template<class TClass , class RetType , class... Args>
auto MakeDelegate (TClass *object, RetType(TClass::*func)(Args... args))
 Creates a delegate that binds to a non-const member function.
 
template<class TClass , class RetType , class... Args>
auto MakeDelegate (const TClass *object, RetType(TClass::*func)(Args... args) const)
 Creates a delegate that binds to a const member function.
 
template<class TClass , class RetType , class... Args>
auto MakeDelegate (std::shared_ptr< TClass > object, RetType(TClass::*func)(Args... args))
 Creates a delegate that binds to a non-const member function with a shared pointer to the object.
 
template<class RetType , class... Args>
auto MakeDelegate (std::function< RetType(Args...)> func)
 Creates a delegate that binds to a std::function.
 
template<class RetType , class... Args>
auto MakeDelegate (RetType(*func)(Args... args), IThread &thread)
 Creates an asynchronous delegate that binds to a free function.
 
template<class TClass , class RetType , class... Args>
auto MakeDelegate (TClass *object, RetType(TClass::*func)(Args... args), IThread &thread)
 Creates an asynchronous delegate that binds to a non-const member function.
 
template<class TClass , class RetType , class... Args>
auto MakeDelegate (const TClass *object, RetType(TClass::*func)(Args... args) const, IThread &thread)
 Creates a delegate that binds to a const member function.
 
template<class TClass , class RetVal , class... Args>
auto MakeDelegate (std::shared_ptr< TClass > object, RetVal(TClass::*func)(Args... args), IThread &thread)
 Creates an asynchronous delegate that binds to a non-const member function using a shared pointer.
 
template<class RetType , class... Args>
auto MakeDelegate (std::function< RetType(Args...)> func, IThread &thread)
 Creates an asynchronous delegate that binds to a std::function.
 
template<class RetType , class... Args>
auto MakeDelegate (RetType(*func)(Args... args), IThread &thread, Duration timeout)
 Creates an asynchronous delegate that binds to a free function with a wait and timeout.
 
template<class TClass , class RetType , class... Args>
auto MakeDelegate (TClass *object, RetType(TClass::*func)(Args... args), IThread &thread, Duration timeout)
 Creates an asynchronous delegate that binds to a non-const member function with a wait and timeout.
 
template<class TClass , class RetType , class... Args>
auto MakeDelegate (const TClass *object, RetType(TClass::*func)(Args... args) const, IThread &thread, Duration timeout)
 Creates a delegate that binds to a const member function.
 
template<class TClass , class RetVal , class... Args>
auto MakeDelegate (std::shared_ptr< TClass > object, RetVal(TClass::*func)(Args... args), IThread &thread, Duration timeout)
 Creates an asynchronous delegate that binds to a non-const member function using a shared pointer, with a wait and timeout.
 
template<class RetType , class... Args>
auto MakeDelegate (std::function< RetType(Args...)> func, IThread &thread, Duration timeout)
 Creates an asynchronous delegate that binds to a std::function with a wait and timeout.
 
template<size_t N, class... Args>
decltype(auto) ArgValueOf (Args &&... ts)
 
template<class RetType , class... Args>
auto MakeDelegate (RetType(*func)(Args... args), DelegateRemoteId id)
 Creates an asynchronous delegate that binds to a free function.
 
template<class TClass , class RetType , class... Args>
auto MakeDelegate (TClass *object, RetType(TClass::*func)(Args... args), DelegateRemoteId id)
 Creates an asynchronous delegate that binds to a non-const member function.
 
template<class TClass , class RetType , class... Args>
auto MakeDelegate (const TClass *object, RetType(TClass::*func)(Args... args) const, DelegateRemoteId id)
 Creates a delegate that binds to a const member function.
 
template<class TClass , class RetVal , class... Args>
auto MakeDelegate (std::shared_ptr< TClass > object, RetVal(TClass::*func)(Args... args), DelegateRemoteId id)
 Creates an asynchronous delegate that binds to a non-const member function using a shared pointer.
 
template<class RetType , class... Args>
auto MakeDelegate (std::function< RetType(Args...)> func, DelegateRemoteId id)
 Creates an asynchronous delegate that binds to a std::function.
 
template<typename Arg , typename... TupleElem>
auto tuple_append (xlist< std::shared_ptr< heap_arg_deleter_base > > &heapArgs, const std::tuple< TupleElem... > &tup, Arg **arg)
 Append a pointer to pointer argument to the tuple.
 
template<typename Arg , typename... TupleElem>
auto tuple_append (xlist< std::shared_ptr< heap_arg_deleter_base > > &heapArgs, const std::tuple< TupleElem... > &tup, Arg *arg)
 Append a pointer argument to the tuple.
 
template<typename Arg , typename... TupleElem>
auto tuple_append (xlist< std::shared_ptr< heap_arg_deleter_base > > &heapArgs, const std::tuple< TupleElem... > &tup, Arg &arg)
 Append a reference argument to the tuple.
 
template<typename... Ts>
auto make_tuple_heap (xlist< std::shared_ptr< heap_arg_deleter_base > > &heapArgs, std::tuple< Ts... > tup)
 Terminate the template metaprogramming argument loop. This function is called when there are no more arguments to process.
 
template<typename Arg1 , typename... Args, typename... Ts>
auto make_tuple_heap (xlist< std::shared_ptr< heap_arg_deleter_base > > &heapArgs, std::tuple< Ts... > tup, Arg1 arg1, Args... args)
 Creates a tuple with all tuple elements created on the heap using operator new().
 

Variables

constexpr auto WAIT_INFINITE = Duration::max()
 
const uint16_t INVALID_REMOTE_ID = -1
 
const uint16_t ACK_REMOTE_ID = 0
 

Detailed Description

The delegate library namespace.

Typedef Documentation

◆ ArgTypeOf

template<size_t N, class... Args>
using dmq::ArgTypeOf
Initial value:
typename std::tuple_element<N, std::tuple<Args...>>::type

◆ DelegateErrorAux

typedef int dmq::DelegateErrorAux

◆ DelegateRemoteId

typedef uint16_t dmq::DelegateRemoteId

◆ Duration

using dmq::Duration = std::chrono::duration<uint32_t, std::milli>

Enumeration Type Documentation

◆ DelegateError

enum class dmq::DelegateError
strong
Enumerator
SUCCESS 
ERR_STREAM_NOT_GOOD 
ERR_NO_SERIALIZER 
ERR_SERIALIZE 
ERR_DESERIALIZE 
ERR_DESERIALIZE_EXCEPTION 
ERR_NO_DISPATCHER 
ERR_DISPATCH 

Function Documentation

◆ ArgValueOf()

template<size_t N, class... Args>
decltype(auto) dmq::ArgValueOf ( Args &&... ts)

◆ make_tuple_heap() [1/2]

template<typename... Ts>
auto dmq::make_tuple_heap ( xlist< std::shared_ptr< heap_arg_deleter_base > > & heapArgs,
std::tuple< Ts... > tup )

Terminate the template metaprogramming argument loop. This function is called when there are no more arguments to process.

Template Parameters
TsThe types of the remaining arguments.
Parameters
heapArgsThe list of deleters for heap - allocated arguments.
tupThe current tuple of arguments.
Returns
The final tuple.

◆ make_tuple_heap() [2/2]

template<typename Arg1 , typename... Args, typename... Ts>
auto dmq::make_tuple_heap ( xlist< std::shared_ptr< heap_arg_deleter_base > > & heapArgs,
std::tuple< Ts... > tup,
Arg1 arg1,
Args... args )

Creates a tuple with all tuple elements created on the heap using operator new().

Call with an empty list and empty tuple. The empty tuple is concatenated with each heap element. The list contains heap_arg_deleter_base objects for each argument heap memory block that will be automatically deleted after the bound function is invoked on the target thread.

Template Parameters
Arg1The type of the first argument.
ArgsThe types of the remaining arguments.
TsThe types of the existing tuple elements.
Parameters
heapArgsThe list of deleters for heap - allocated arguments.
tupThe existing tuple of arguments. Typically call with an empty tuple.
arg1The first argument to append to the tuple.
argsThe remaining arguments to append to the tuple.
Returns
A new tuple with all arguments appended.
Exceptions
std::bad_allocIf dynamic allocation of arguments created on the heap for appending to the tuple fails and DMQ_ASSERTS not defined.

◆ MakeDelegate() [1/20]

template<class TClass , class RetType , class... Args>
auto dmq::MakeDelegate ( const TClass * object,
RetType(TClass::* func )(Args... args) const )

Creates a delegate that binds to a const member function.

Template Parameters
TClassThe const class type that contains the const member function.
RetTypeThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the non-const member function of TClass to bind to the delegate.
Returns
A DelegateMember object bound to the specified non-const member function.

◆ MakeDelegate() [2/20]

template<class TClass , class RetType , class... Args>
auto dmq::MakeDelegate ( const TClass * object,
RetType(TClass::* func )(Args... args) const,
DelegateRemoteId id )

Creates a delegate that binds to a const member function.

Template Parameters
TClassThe const class type that contains the const member function.
RetTypeThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the non-const member function of TClass to bind to the delegate.
[in]idThe delegate remote identifier.
Returns
A DelegateMemberRemote object bound to the specified non-const member function.

◆ MakeDelegate() [3/20]

template<class TClass , class RetType , class... Args>
auto dmq::MakeDelegate ( const TClass * object,
RetType(TClass::* func )(Args... args) const,
IThread & thread )

Creates a delegate that binds to a const member function.

Template Parameters
TClassThe const class type that contains the const member function.
RetTypeThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the non-const member function of TClass to bind to the delegate.
[in]threadThe IThread on which the function will be invoked asynchronously.
Returns
A DelegateMemberAsync object bound to the specified non-const member function.

◆ MakeDelegate() [4/20]

template<class TClass , class RetType , class... Args>
auto dmq::MakeDelegate ( const TClass * object,
RetType(TClass::* func )(Args... args) const,
IThread & thread,
Duration timeout )

Creates a delegate that binds to a const member function.

Template Parameters
TClassThe const class type that contains the const member function.
RetTypeThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the non-const member function of TClass to bind to the delegate.
[in]threadThe IThread on which the function will be invoked asynchronously.
[in]timeoutThe duration to wait for the function to complete before returning.
Returns
A DelegateMemberAsyncWait object bound to the specified non-const member function.

◆ MakeDelegate() [5/20]

template<class RetType , class... Args>
auto dmq::MakeDelegate ( RetType(* func )(Args... args))

Creates a delegate that binds to a free function.

Template Parameters
RetTypeThe return type of the free function.
ArgsThe types of the function arguments.
Parameters
[in]funcA pointer to the free function to bind to the delegate.
Returns
A DelegateFree object bound to the specified free function.

◆ MakeDelegate() [6/20]

template<class RetType , class... Args>
auto dmq::MakeDelegate ( RetType(* func )(Args... args),
DelegateRemoteId id )

Creates an asynchronous delegate that binds to a free function.

Template Parameters
RetTypeThe return type of the free function.
ArgsThe types of the function arguments.
Parameters
[in]funcA pointer to the free function to bind to the delegate.
[in]idThe delegate remote identifier.
Returns
A DelegateFreeRemote object bound to the specified free function and id.

◆ MakeDelegate() [7/20]

template<class RetType , class... Args>
auto dmq::MakeDelegate ( RetType(* func )(Args... args),
IThread & thread )

Creates an asynchronous delegate that binds to a free function.

Template Parameters
RetTypeThe return type of the free function.
ArgsThe types of the function arguments.
Parameters
[in]funcA pointer to the free function to bind to the delegate.
[in]threadThe IThread on which the function will be invoked asynchronously.
Returns
A DelegateFreeAsync object bound to the specified free function and thread.

◆ MakeDelegate() [8/20]

template<class RetType , class... Args>
auto dmq::MakeDelegate ( RetType(* func )(Args... args),
IThread & thread,
Duration timeout )

Creates an asynchronous delegate that binds to a free function with a wait and timeout.

Template Parameters
RetTypeThe return type of the free function.
ArgsThe types of the function arguments.
Parameters
[in]funcA pointer to the free function to bind to the delegate.
[in]threadThe IThread on which the function will be invoked asynchronously.
[in]timeoutThe duration to wait for the function to complete before returning.
Returns
A DelegateFreeAsyncWait object bound to the specified free function, thread, and timeout.

◆ MakeDelegate() [9/20]

template<class RetType , class... Args>
auto dmq::MakeDelegate ( std::function< RetType(Args...)> func)

Creates a delegate that binds to a std::function.

Template Parameters
RetTypeThe return type of the std::function.
ArgsThe types of the function arguments.
Parameters
[in]funcThe std::function to bind to the delegate.
Returns
A DelegateFunction object bound to the specified std::function.

◆ MakeDelegate() [10/20]

template<class RetType , class... Args>
auto dmq::MakeDelegate ( std::function< RetType(Args...)> func,
DelegateRemoteId id )

Creates an asynchronous delegate that binds to a std::function.

Template Parameters
RetTypeThe return type of the std::function.
ArgsThe types of the function arguments.
Parameters
[in]funcThe std::function to bind to the delegate.
[in]idThe delegate remote identifier.
Returns
A DelegateFunctionRemote object bound to the specified std::function and id.

◆ MakeDelegate() [11/20]

template<class RetType , class... Args>
auto dmq::MakeDelegate ( std::function< RetType(Args...)> func,
IThread & thread )

Creates an asynchronous delegate that binds to a std::function.

Template Parameters
RetTypeThe return type of the std::function.
ArgsThe types of the function arguments.
Parameters
[in]funcThe std::function to bind to the delegate.
[in]threadThe IThread on which the function will be invoked asynchronously.
Returns
A DelegateFunctionAsync object bound to the specified std::function and thread.

◆ MakeDelegate() [12/20]

template<class RetType , class... Args>
auto dmq::MakeDelegate ( std::function< RetType(Args...)> func,
IThread & thread,
Duration timeout )

Creates an asynchronous delegate that binds to a std::function with a wait and timeout.

Template Parameters
RetTypeThe return type of the std::function.
ArgsThe types of the function arguments.
Parameters
[in]funcThe std::function to bind to the delegate.
[in]threadThe IThread on which the function will be invoked asynchronously.
[in]timeoutThe duration to wait for the function to complete before returning.
Returns
A DelegateFunctionAsyncWait object bound to the specified std::function, thread, and timeout.

◆ MakeDelegate() [13/20]

template<class TClass , class RetType , class... Args>
auto dmq::MakeDelegate ( std::shared_ptr< TClass > object,
RetType(TClass::* func )(Args... args) )

Creates a delegate that binds to a non-const member function with a shared pointer to the object.

Creates a delegate that binds to a const member function with a shared pointer to the object.

Template Parameters
TClassThe class type that contains the member function.
RetTypeThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA shared pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the non-const member function of TClass to bind to the delegate.
Returns
A DelegateMember shared pointer bound to the specified non-const member function.
Template Parameters
TClassThe class type that contains the member function.
RetTypeThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA shared pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the const member function of TClass to bind to the delegate.
Returns
A DelegateMember shared pointer bound to the specified const member function.

◆ MakeDelegate() [14/20]

template<class TClass , class RetVal , class... Args>
auto dmq::MakeDelegate ( std::shared_ptr< TClass > object,
RetVal(TClass::* func )(Args... args),
DelegateRemoteId id )

Creates an asynchronous delegate that binds to a non-const member function using a shared pointer.

Creates an asynchronous delegate that binds to a const member function using a shared pointer.

Template Parameters
TClassThe class type that contains the member function.
RetTypeThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA shared pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the non-const member function of TClass to bind to the delegate.
[in]idThe delegate remote identifier.
Returns
A DelegateMemberRemote shared pointer bound to the specified non-const member function and id.
Template Parameters
TClassThe class type that contains the member function.
RetValThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA shared pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the const member function of TClass to bind to the delegate.
[in]idThe delegate remote identifier.
Returns
A DelegateMemberRemote shared pointer bound to the specified const member function and id.

◆ MakeDelegate() [15/20]

template<class TClass , class RetVal , class... Args>
auto dmq::MakeDelegate ( std::shared_ptr< TClass > object,
RetVal(TClass::* func )(Args... args),
IThread & thread )

Creates an asynchronous delegate that binds to a non-const member function using a shared pointer.

Creates an asynchronous delegate that binds to a const member function using a shared pointer.

Template Parameters
TClassThe class type that contains the member function.
RetTypeThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA shared pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the non-const member function of TClass to bind to the delegate.
[in]threadThe IThread on which the function will be invoked asynchronously.
Returns
A DelegateMemberAsync shared pointer bound to the specified non-const member function and thread.
Template Parameters
TClassThe class type that contains the member function.
RetValThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA shared pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the const member function of TClass to bind to the delegate.
[in]threadThe IThread on which the function will be invoked asynchronously.
Returns
A DelegateMemberAsync shared pointer bound to the specified const member function and thread.

◆ MakeDelegate() [16/20]

template<class TClass , class RetVal , class... Args>
auto dmq::MakeDelegate ( std::shared_ptr< TClass > object,
RetVal(TClass::* func )(Args... args),
IThread & thread,
Duration timeout )

Creates an asynchronous delegate that binds to a non-const member function using a shared pointer, with a wait and timeout.

Creates an asynchronous delegate that binds to a const member function using a shared pointer, with a wait and timeout.

Template Parameters
TClassThe class type that contains the member function.
RetValThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA shared pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the non-const member function of TClass to bind to the delegate.
[in]threadThe IThread on which the function will be invoked asynchronously.
[in]timeoutThe duration to wait for the function to complete before returning.
Returns
A DelegateMemberAsyncWait shared pointer bound to the specified non-const member function, thread, and timeout.
Template Parameters
TClassThe class type that contains the member function.
RetValThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA shared pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the const member function of TClass to bind to the delegate.
[in]threadThe IThread on which the function will be invoked asynchronously.
[in]timeoutThe duration to wait for the function to complete before returning.
Returns
A DelegateMemberAsyncWait shared pointer bound to the specified const member function, thread, and timeout.

◆ MakeDelegate() [17/20]

template<class TClass , class RetType , class... Args>
auto dmq::MakeDelegate ( TClass * object,
RetType(TClass::* func )(Args... args) )

Creates a delegate that binds to a non-const member function.

Creates a delegate that binds to a const member function.

Template Parameters
TClassThe class type that contains the member function.
RetTypeThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the non-const member function of TClass to bind to the delegate.
Returns
A DelegateMember object bound to the specified non-const member function.
Template Parameters
TClassThe class type that contains the const member function.
RetTypeThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the const member function of TClass to bind to the delegate.
Returns
A DelegateMember object bound to the specified const member function.

◆ MakeDelegate() [18/20]

template<class TClass , class RetType , class... Args>
auto dmq::MakeDelegate ( TClass * object,
RetType(TClass::* func )(Args... args),
DelegateRemoteId id )

Creates an asynchronous delegate that binds to a non-const member function.

Creates an asynchronous delegate that binds to a const member function.

Template Parameters
TClassThe class type that contains the member function.
RetTypeThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the non-const member function of TClass to bind to the delegate.
[in]idThe delegate remote identifier.
Returns
A DelegateMemberRemote object bound to the specified non-const member function and id.
Template Parameters
TClassThe class type that contains the const member function.
RetTypeThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the const member function of TClass to bind to the delegate.
[in]idThe delegate remote identifier.
Returns
A DelegateMemberRemote object bound to the specified const member function and id.

◆ MakeDelegate() [19/20]

template<class TClass , class RetType , class... Args>
auto dmq::MakeDelegate ( TClass * object,
RetType(TClass::* func )(Args... args),
IThread & thread )

Creates an asynchronous delegate that binds to a non-const member function.

Creates an asynchronous delegate that binds to a const member function.

Template Parameters
TClassThe class type that contains the member function.
RetTypeThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the non-const member function of TClass to bind to the delegate.
[in]threadThe IThread on which the function will be invoked asynchronously.
Returns
A DelegateMemberAsync object bound to the specified non-const member function and thread.
Template Parameters
TClassThe class type that contains the const member function.
RetTypeThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the const member function of TClass to bind to the delegate.
[in]threadThe IThread on which the function will be invoked asynchronously.
Returns
A DelegateMemberAsync object bound to the specified const member function and thread.

◆ MakeDelegate() [20/20]

template<class TClass , class RetType , class... Args>
auto dmq::MakeDelegate ( TClass * object,
RetType(TClass::* func )(Args... args),
IThread & thread,
Duration timeout )

Creates an asynchronous delegate that binds to a non-const member function with a wait and timeout.

Creates an asynchronous delegate that binds to a const member function with a wait and timeout.

Template Parameters
TClassThe class type that contains the member function.
RetTypeThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the non-const member function of TClass to bind to the delegate.
[in]threadThe IThread on which the function will be invoked asynchronously.
[in]timeoutThe duration to wait for the function to complete before returning.
Returns
A DelegateMemberAsyncWait object bound to the specified non-const member function, thread, and timeout.
Template Parameters
TClassThe class type that contains the const member function.
RetTypeThe return type of the member function.
ArgsThe types of the function arguments.
Parameters
[in]objectA pointer to the instance of TClass that will be used for the delegate.
[in]funcA pointer to the const member function of TClass to bind to the delegate.
[in]threadThe IThread on which the function will be invoked asynchronously.
[in]timeoutThe duration to wait for the function to complete before returning.
Returns
A DelegateMemberAsyncWait object bound to the specified const member function, thread, and timeout.

◆ tuple_append() [1/3]

template<typename Arg , typename... TupleElem>
auto dmq::tuple_append ( xlist< std::shared_ptr< heap_arg_deleter_base > > & heapArgs,
const std::tuple< TupleElem... > & tup,
Arg & arg )

Append a reference argument to the tuple.

◆ tuple_append() [2/3]

template<typename Arg , typename... TupleElem>
auto dmq::tuple_append ( xlist< std::shared_ptr< heap_arg_deleter_base > > & heapArgs,
const std::tuple< TupleElem... > & tup,
Arg ** arg )

Append a pointer to pointer argument to the tuple.

◆ tuple_append() [3/3]

template<typename Arg , typename... TupleElem>
auto dmq::tuple_append ( xlist< std::shared_ptr< heap_arg_deleter_base > > & heapArgs,
const std::tuple< TupleElem... > & tup,
Arg * arg )

Append a pointer argument to the tuple.

Variable Documentation

◆ ACK_REMOTE_ID

const uint16_t dmq::ACK_REMOTE_ID = 0

◆ INVALID_REMOTE_ID

const uint16_t dmq::INVALID_REMOTE_ID = -1

◆ WAIT_INFINITE

auto dmq::WAIT_INFINITE = Duration::max()
constexpr