Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkSlicerTask.h
Go to the documentation of this file.
1 #ifndef __vtkSlicerTask_h
2 #define __vtkSlicerTask_h
3 
4 #include "vtkObject.h"
5 #include "vtkSmartPointer.h"
6 #include "vtkMRMLAbstractLogic.h"
7 #include "vtkSlicerBaseLogic.h"
8 
9 class VTK_SLICER_BASE_LOGIC_EXPORT vtkSlicerTask : public vtkObject
10 {
11 public:
12  static vtkSlicerTask *New();
13  vtkTypeMacro(vtkSlicerTask,vtkObject);
14  void PrintSelf(ostream& os, vtkIndent indent) override;
15 
17 
20  void SetTaskFunction(vtkMRMLAbstractLogic*, TaskFunctionPointer, void *clientdata);
21 
24  virtual void Execute();
25 
29  enum
30  {
31  Undefined = 0,
33  Networking
34  };
35 
36  vtkSetClampMacro (Type, int, vtkSlicerTask::Undefined, vtkSlicerTask::Networking);
37  vtkGetMacro (Type, int);
40 
41  const char* GetTypeAsString( ) {
42  switch (this->Type)
43  {
44  case vtkSlicerTask::Undefined: return "Undefined";
45  case vtkSlicerTask::Processing: return "Processing";
46  case vtkSlicerTask::Networking: return "Networking";
47  }
48  return "Unknown";
49  }
50 
51 protected:
52  vtkSlicerTask();
53  ~vtkSlicerTask() override;
55  void operator=(const vtkSlicerTask&);
56 
57 private:
58  vtkSmartPointer<vtkMRMLAbstractLogic> TaskObject;
60  void *TaskClientData;
61 
62  int Type;
63 
64 };
65 #endif
66 
67 
Superclass for MRML logic classes.
void SetTypeToNetworking()
Definition: vtkSlicerTask.h:39
vtkMRMLAbstractLogic::TaskFunctionPointer TaskFunctionPointer
Definition: vtkSlicerTask.h:16
const char * GetTypeAsString()
Definition: vtkSlicerTask.h:41
void(vtkMRMLAbstractLogic::* TaskFunctionPointer)(void *clientdata)
void SetTypeToProcessing()
Definition: vtkSlicerTask.h:38