DelegateMQ
Loading...
Searching...
No Matches
dmq::DelegateAsyncWaitMsg< Args > Class Template Reference

Stores all function arguments suitable for blocking asynchronous calls. Argument data is not stored in the heap. More...

#include <DelegateAsyncWait.h>

Inheritance diagram for dmq::DelegateAsyncWaitMsg< Args >:
dmq::DelegateMsg

Public Member Functions

 DelegateAsyncWaitMsg (std::shared_ptr< IThreadInvoker > invoker, Args... args)
 
 DelegateAsyncWaitMsg ()=delete
 Delete the default constructor.
 
 DelegateAsyncWaitMsg (const DelegateAsyncWaitMsg &)=delete
 Delete the copy constructor.
 
DelegateAsyncWaitMsgoperator= (const DelegateAsyncWaitMsg &)=delete
 Delete the copy assignment operator.
 
 DelegateAsyncWaitMsg (DelegateAsyncWaitMsg &&)=delete
 Delete the move constructor and move assignment.
 
DelegateAsyncWaitMsgoperator= (DelegateAsyncWaitMsg &&)=delete
 
virtual ~DelegateAsyncWaitMsg ()=default
 
std::tuple< Args... > & GetArgs ()
 
SemaphoreGetSema ()
 
std::mutex & GetLock ()
 
bool GetInvokerWaiting ()
 
void SetInvokerWaiting (bool invokerWaiting)
 
- Public Member Functions inherited from dmq::DelegateMsg
 DelegateMsg (std::shared_ptr< IThreadInvoker > invoker)
 
virtual ~DelegateMsg ()=default
 
std::shared_ptr< IThreadInvokerGetInvoker () const
 

Detailed Description

template<class... Args>
class dmq::DelegateAsyncWaitMsg< Args >

Stores all function arguments suitable for blocking asynchronous calls. Argument data is not stored in the heap.

Template Parameters
ArgsThe target function arguments.

Constructor & Destructor Documentation

◆ DelegateAsyncWaitMsg() [1/4]

template<class... Args>
dmq::DelegateAsyncWaitMsg< Args >::DelegateAsyncWaitMsg ( std::shared_ptr< IThreadInvoker > invoker,
Args... args )
inline

Constructor

Parameters
[in]invoker- the invoker instance
[in]args- a parameter pack of all target function arguments

◆ DelegateAsyncWaitMsg() [2/4]

template<class... Args>
dmq::DelegateAsyncWaitMsg< Args >::DelegateAsyncWaitMsg ( )
delete

Delete the default constructor.

◆ DelegateAsyncWaitMsg() [3/4]

template<class... Args>
dmq::DelegateAsyncWaitMsg< Args >::DelegateAsyncWaitMsg ( const DelegateAsyncWaitMsg< Args > & )
delete

Delete the copy constructor.

◆ DelegateAsyncWaitMsg() [4/4]

template<class... Args>
dmq::DelegateAsyncWaitMsg< Args >::DelegateAsyncWaitMsg ( DelegateAsyncWaitMsg< Args > && )
delete

Delete the move constructor and move assignment.

◆ ~DelegateAsyncWaitMsg()

template<class... Args>
virtual dmq::DelegateAsyncWaitMsg< Args >::~DelegateAsyncWaitMsg ( )
virtualdefault

Member Function Documentation

◆ GetArgs()

template<class... Args>
std::tuple< Args... > & dmq::DelegateAsyncWaitMsg< Args >::GetArgs ( )
inline

Get all function arguments

Returns
A tuple of all function arguments

◆ GetInvokerWaiting()

template<class... Args>
bool dmq::DelegateAsyncWaitMsg< Args >::GetInvokerWaiting ( )
inline

True if the sending thread is waiting for the receiver thread to call the function. False if the sending thread delegate timeout occurred and is not waiting.

Returns
true if the sending thread is waiting for the receiving thread to complete the target function invoke.

◆ GetLock()

template<class... Args>
std::mutex & dmq::DelegateAsyncWaitMsg< Args >::GetLock ( )
inline

Get a mutex shared between sender and receiver threads.

Returns
The lock reference.

◆ GetSema()

template<class... Args>
Semaphore & dmq::DelegateAsyncWaitMsg< Args >::GetSema ( )
inline

Get the semaphore used to signal the sending thread that the receiving thread has invoked the target function.

Returns
The semaphore reference.

◆ operator=() [1/2]

template<class... Args>
DelegateAsyncWaitMsg & dmq::DelegateAsyncWaitMsg< Args >::operator= ( const DelegateAsyncWaitMsg< Args > & )
delete

Delete the copy assignment operator.

◆ operator=() [2/2]

template<class... Args>
DelegateAsyncWaitMsg & dmq::DelegateAsyncWaitMsg< Args >::operator= ( DelegateAsyncWaitMsg< Args > && )
delete

◆ SetInvokerWaiting()

template<class... Args>
void dmq::DelegateAsyncWaitMsg< Args >::SetInvokerWaiting ( bool invokerWaiting)
inline

Set to true when source thread is waiting for destination thread to complete the function call.

Parameters
[in]invokerWaitingThe status of the invoker waiting flag.

The documentation for this class was generated from the following file: