JobInterfaceTemplate< IMPLEMENTATION, RESULTVALUETYPE > Class Template Reference 线程

#include <job.h>

Inheritance diagram for JobInterfaceTemplate< IMPLEMENTATION, RESULTVALUETYPE >:

详细描述

template<typename IMPLEMENTATION, typename RESULTVALUETYPE = void>
class maxon::JobInterfaceTemplate< IMPLEMENTATION, RESULTVALUETYPE >

Template for jobs which inherit from JobInterface (and are not created using a lambda).

Template Parameters
IMPLEMENTATION The job implementation type (used to build the jump table).
RESULTVALUETYPE An optional result value type to be used if the job returns more than just Result<void> .

The following snippet implements a job which returns an Int.

class MyJob : public JobInterfaceTemplate<MyJob, Int> { public : Result<void> operator ()() { return SetResult (42); } };

静态公共成员函数

template<typename... ARGS>
static ResultMemT < JobResultRef < RESULTVALUETYPE > >  创建 (ARGS &&... args)
-  Static Public Member Functions inherited from JobInterface
static Int   GetCurrentWorkerThreadIndex ()
static Int   GetCurrentThreadCount ()
static Bool   IsCurrentJobCancelled (const JobInterface *optionalJob=nullptr)
static JobStatusInterface GetCurrentJob ()

私有成员函数

  MAXON_DISALLOW_COPY_AND_ASSIGN ( JobInterfaceTemplate )

Additional Inherited Members

-  Public Member Functions inherited from JobInterface
JOBOPTIONFLAGS  GetJobOptions () const
const Char GetName () const
  JobInterface (const JobInterfaceJumpTablePOD &jmpTable)
  ~JobInterface ()
  JobInterface ( JobInterface && src )
JobInterface operator= ( 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  取消 ()
Bool   IsCancelled () const
void  CancelAndWait ( WAITMODE mode= WAITMODE::DEFAULT )
JobInterface Enqueue ( 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)
JobGroupInterface GetJobGroup () const
ObservableFinishedBase < JobInterface ObservableFinished ()
ObservableCancelledBase < JobInterface ObservableCancelled ()
String   ToString (const FormatStatement *formatStatement=nullptr) const
-  Protected Member Functions inherited from JobResultInterface< void >
ResultOk < void >  SetResult ()
template<typename FN , typename... ARGS>
Result < void >  Invoke (FN &&obj, ARGS &&... args)
maxon::JobResultInterface< void >::SetResult
ResultOk< void > SetResult()
定义: job.h:1022