JobResultInterface< RESULTVALUETYPE > Class Template Reference

#include <job.h>

Inheritance diagram for JobResultInterface< RESULTVALUETYPE >:

Detailed Description

template<typename RESULTVALUETYPE>
class maxon::JobResultInterface< RESULTVALUETYPE >

Template for jobs which return more than just a void result.

Public Member Functions

Result< RESULTVALUETYPE > GetResult (TimeValue timeout=TIMEVALUE_INFINITE, WAITMODE mode=WAITMODE::DEFAULT) const
 
Result< RESULTVALUETYPE > MoveResult (TimeValue timeout=TIMEVALUE_INFINITE, WAITMODE mode=WAITMODE::DEFAULT)
 
- Public Member Functions inherited from JobInterface
JOBOPTIONFLAGS GetJobOptions () const
 
const CharGetName () const
 
 JobInterface (const JobInterfaceJumpTablePOD &jmpTable)
 
 ~JobInterface ()
 
 JobInterface (JobInterface &&src)
 
JobInterfaceoperator= (JobInterface &&src)
 
Bool Wait (TimeValue timeout=TIMEVALUE_INFINITE, WAITMODE mode=WAITMODE::DEFAULT) const
 
Result< void > GetResult (TimeValue timeout=TIMEVALUE_INFINITE, WAITMODE mode=WAITMODE::DEFAULT) const
 
Result< void > MoveResult (TimeValue timeout=TIMEVALUE_INFINITE, WAITMODE mode=WAITMODE::DEFAULT)
 
void Cancel ()
 
Bool IsCancelled () const
 
void CancelAndWait (WAITMODE mode=WAITMODE::DEFAULT)
 
JobInterfaceEnqueue (JobQueueInterface *queue=JOBQUEUE_CURRENT)
 
Result< void > AddSubJob (JobInterface *subJob)
 
template<typename JOB >
Result< void > AddSubJob (ResultMemT< JOB * > subJob)
 
template<typename JOBREF >
Result< void > AddSubJob (ResultMemT< JOBREF > &&subJob)
 
template<typename GROUP >
Result< void > AddSubGroup (GROUP *subGroup)
 
template<typename GROUP >
Result< void > AddSubGroup (ResultMemT< GROUP * > subGroup)
 
template<typename GROUP >
Result< void > AddSubGroup (ResultMemT< GROUP > subGroup)
 
JobGroupInterfaceGetJobGroup () const
 
ObservableFinishedBase< JobInterfaceObservableFinished ()
 
ObservableCancelledBase< JobInterfaceObservableCancelled ()
 
Result< void > Then (JobInterface *next, JobQueueInterface *queue=JOBQUEUE_CURRENT)
 
String ToString (const FormatStatement *formatStatement=nullptr) const
 

Protected Types

using ValueType = RESULTVALUETYPE
 

Protected Member Functions

ResultOk< void > SetResult (RESULTVALUETYPE &&value)
 
RESULTVALUETYPE & GetResultValue ()
 
template<typename FN , typename... ARGS>
Result< void > Invoke (FN &&obj, ARGS &&... args)
 

Private Attributes

RESULTVALUETYPE _result
 

Friends

template<typename >
struct MoveToTuple
 
template<typename , typename , typename , typename >
class ContinuationJob
 

Additional Inherited Members

- Static Public Member Functions inherited from JobInterface
static Int GetCurrentWorkerThreadIndex ()
 
static Int GetCurrentThreadCount ()
 
static Bool IsCurrentJobCancelled (const JobInterface *optionalJob=nullptr)
 
static JobStatusInterfaceGetCurrentJob ()