#include <JobWait.h>

Inheritance diagram for JobWait< Job >:
Collaboration diagram for JobWait< Job >:

Public Types

typedef CbcPointer< Job > JobPointer
 

Public Member Functions

void start (const JobPointer &aJob, const AsyncCall::Pointer &aCallback)
 starts waiting for the given job to call the given callback More...
 
JobPointer job () const
 
 operator bool () const
 
bool waiting () const
 
void finish ()
 
void cancel (const char *reason)
 
void print (std::ostream &) const
 summarizes what we are waiting for (for debugging) More...
 

Protected Member Functions

void start_ (AsyncJob::Pointer, AsyncCall::Pointer)
 starts waiting for the given job to call the given callback More...
 

Private Member Functions

void clear ()
 the common part of finish() and cancel() More...
 

Private Attributes

JobPointer typedJob_
 nearly duplicates JobWaitBase::job_ but exposes the actual job type More...
 
AsyncJob::Pointer job_
 the job that we are waiting to call us back (or nil) More...
 
AsyncCall::Pointer callback_
 the call we are waiting for the job_ to make (or nil) More...
 

Detailed Description

template<class Job>
class JobWait< Job >

Manages waiting for an AsyncJob callback. Completes JobWaitBase by providing Job type-specific members.

Definition at line 63 of file JobWait.h.

Member Typedef Documentation

◆ JobPointer

template<class Job >
typedef CbcPointer<Job> JobWait< Job >::JobPointer

Definition at line 66 of file JobWait.h.

Member Function Documentation

◆ cancel()

void JobWaitBase::cancel ( const char *  reason)
inherited

aborts wait (if any) before receiving the call back does nothing if we are not waiting

Definition at line 54 of file JobWait.cc.

References JobWaitBase::callback_, CallJobHere, AsyncCall::cancel(), JobWaitBase::clear(), AsyncCall::debugLevel, AsyncCall::debugSection, and JobWaitBase::job_.

Referenced by JobWaitBase::~JobWaitBase(), FwdState::cancelStep(), and TunnelStateData::cancelStep().

◆ clear()

void JobWaitBase::clear ( )
inlineprivateinherited

◆ finish()

◆ job()

template<class Job >
JobPointer JobWait< Job >::job ( ) const
inline
Returns
a cbdata pointer to the job we are waiting for (or nil) the returned pointer may be falsy, even if we are still waiting()

Definition at line 76 of file JobWait.h.

References JobWait< Job >::typedJob_, and JobWaitBase::waiting().

Referenced by FwdState::notifyConnOpener(), and TunnelStateData::notifyConnOpener().

◆ operator bool()

JobWaitBase::operator bool ( ) const
inlineexplicitinherited

Definition at line 28 of file JobWait.h.

References JobWaitBase::waiting().

◆ print()

void JobWaitBase::print ( std::ostream &  os) const
inherited

Definition at line 71 of file JobWait.cc.

References JobWaitBase::callback_, CbcPointer< Cbc >::get(), AsyncCall::id, and JobWaitBase::job_.

Referenced by operator<<().

◆ start()

◆ start_()

void JobWaitBase::start_ ( AsyncJob::Pointer  aJob,
AsyncCall::Pointer  aCall 
)
protectedinherited

◆ waiting()

bool JobWaitBase::waiting ( ) const
inlineinherited

whether we are currently waiting for the job to call us back the job itself may be gone even if this returns true

Definition at line 32 of file JobWait.h.

References JobWaitBase::callback_.

Referenced by JobWaitBase::finish(), JobWait< Job >::job(), JobWaitBase::operator bool(), and JobWaitBase::start_().

Member Data Documentation

◆ callback_

AsyncCall::Pointer JobWaitBase::callback_
privateinherited

◆ job_

AsyncJob::Pointer JobWaitBase::job_
privateinherited

◆ typedJob_

template<class Job >
JobPointer JobWait< Job >::typedJob_
private

Definition at line 80 of file JobWait.h.

Referenced by JobWait< Job >::job(), and JobWait< Job >::start().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors