OpenWalnut  1.5.0dev
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
WDeferredCallResultEvent< void > Class Reference

Derived WDeferredCallEvent allowing result values in calls. More...

#include <WDeferredCallEvent.h>

+ Inheritance diagram for WDeferredCallResultEvent< void >:
+ Collaboration diagram for WDeferredCallResultEvent< void >:

Public Member Functions

 WDeferredCallResultEvent (boost::function< void(void) > function, WCondition::SPtr notify=WCondition::SPtr())
 Constructor. More...
 
virtual ~WDeferredCallResultEvent ()
 Destructor. More...
 
- Public Member Functions inherited from WDeferredCallEventBase
 WDeferredCallEventBase (WCondition::SPtr notify=WCondition::SPtr())
 Constructor. More...
 
virtual ~WDeferredCallEventBase ()
 Destructor. More...
 
void call ()
 Call the function. More...
 
WConditionOneShot::SPtr getDoneCondition () const
 Get the condition that notifies about the finished execution of the specified function. More...
 

Protected Member Functions

virtual void callImpl ()
 Call the function. More...
 

Private Attributes

boost::function< void(void) > m_function
 the title of the widget to create More...
 

Additional Inherited Members

- Static Public Attributes inherited from WDeferredCallEventBase
static const QEvent::Type CUSTOM_TYPE = static_cast< QEvent::Type >( WQT_DEFERREDCALL )
 Constant which saves the number used to distinguish this event from other custom events. More...
 
- Protected Attributes inherited from WDeferredCallEventBase
WCondition::SPtr m_callCondition
 Fired whenever the function was called. More...
 

Detailed Description

Derived WDeferredCallEvent allowing result values in calls.

Specialization for VOID

Definition at line 168 of file WDeferredCallEvent.h.

Constructor & Destructor Documentation

◆ WDeferredCallResultEvent()

WDeferredCallResultEvent< void >::WDeferredCallResultEvent ( boost::function< void(void) >  function,
WCondition::SPtr  notify = WCondition::SPtr() 
)
inline

Constructor.

Parameters
functionthe function to call
notifyspecify your own condition to wait for. This is needed since the QApplication doc tells us that ownership of an event is handed over to QT and that it is not save to use the event after posting it. This means we cannot utilize an internal condition in the event as it might be deleted already when calling wait() on it. Do not specify this variable to get a fire-and-forget call.

Definition at line 179 of file WDeferredCallEvent.h.

◆ ~WDeferredCallResultEvent()

virtual WDeferredCallResultEvent< void >::~WDeferredCallResultEvent ( )
inlinevirtual

Destructor.

Definition at line 188 of file WDeferredCallEvent.h.

Member Function Documentation

◆ callImpl()

virtual void WDeferredCallResultEvent< void >::callImpl ( )
inlineprotectedvirtual

Call the function.

Implements WDeferredCallEventBase.

Definition at line 197 of file WDeferredCallEvent.h.

References WDeferredCallResultEvent< Result >::m_function.

Member Data Documentation

◆ m_function

boost::function< void( void ) > WDeferredCallResultEvent< void >::m_function
private

the title of the widget to create

Definition at line 205 of file WDeferredCallEvent.h.


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