13 #include <vlutil/vlPrint.h>
14 #include <vlutil/vlExceptions.h>
22 #include <boost/function.hpp>
35 bool operator()()
const;
48 #ifdef DtObjectDebugger_Enable
60 virtual void execute();
63 virtual void onExecute() = 0;
66 virtual void onException() = 0;
73 virtual std::shared_ptr<DtAsyncJobMapEntry> getEntry()
const = 0;
76 virtual void setEntry(std::shared_ptr<DtAsyncJobMapEntry>) = 0;
79 virtual bool cancel()
const override;
92 virtual std::shared_ptr<DtAsyncJobMapEntry>
getEntry()
const override;
93 virtual void setEntry(std::shared_ptr<DtAsyncJobMapEntry>)
override;
96 std::weak_ptr<DtAsyncJobMapEntry>
myEntry;
106 virtual std::shared_ptr<DtAsyncJobMapEntry>
getEntry()
const override;
107 virtual void setEntry(std::shared_ptr<DtAsyncJobMapEntry>)
override;
109 virtual void execute()
override;
Concrete job class which manages a weak pointer to it's job map entry. Using this job will require th...
Definition: asyncJob.h:89
An asynchronous job that can be added to and executed by a job server. Since this class derives from ...
Definition: asyncJob.h:46
virtual void setEntry(std::shared_ptr< DtAsyncJobMapEntry >)=0
Set the job entry.
#define DT_DEFINE_OBJECT_DEBUGGER_NAME(type)
Definition: objectCounter.h:31
Default on in debug, off in release.
Definition: objectCounter.h:27
Concrete job class which manages a shared pointer to it's job map entry. Using this job does not requ...
Definition: asyncJob.h:103
virtual bool cancel() const
Returns true if no longer needed.
DtAsyncJobServer * myServer
Definition: asyncJob.h:82
virtual void execute()
Do not override. Calls onExecute, then onException if there is an exception thrown.
std::weak_ptr< DtAsyncJobMapEntry > myEntry
Definition: asyncJob.h:96
virtual std::shared_ptr< DtAsyncJobMapEntry > getEntry() const =0
Returns the entry associated with this task. If it is null the task is no longer needed.
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34
Manages async job objects.
Definition: asyncJobServer.h:61
Exception for termination of a task during execution.
Definition: asyncJob.h:27
General interface which can be passed into an algorithm to control its behavior.
Definition: algorithmManager.h:24
std::shared_ptr< DtAsyncJobMapEntry > myEntry
Definition: asyncJob.h:112
const DtAsyncJob & job
Definition: asyncJob.h:38
For passing to algorithms which may take long enough that they need to check if they can been cancell...
Definition: asyncJob.h:31