Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkDataTransfer.h
Go to the documentation of this file.
1 #ifndef __vtkDataTransfer_h
2 #define __vtkDataTransfer_h
3 
4 // MRML includes
5 #include "vtkMRML.h"
6 class vtkURIHandler;
7 
8 // VTK includes
9 #include <vtkObject.h>
10 
11 class VTK_MRML_EXPORT vtkDataTransfer : public vtkObject
12 {
13  public:
14 
16  static vtkDataTransfer *New();
17  vtkTypeMacro(vtkDataTransfer, vtkObject);
18  void PrintSelf(ostream& os, vtkIndent indent) override;
19  vtkGetStringMacro ( SourceURI );
20  vtkSetStringMacro ( SourceURI );
21  vtkGetStringMacro ( DestinationURI );
22  vtkSetStringMacro ( DestinationURI );
23  vtkGetObjectMacro ( Handler, vtkURIHandler );
24  virtual void SetHandler(vtkURIHandler* uriHandler);
25  vtkGetMacro ( TransferType, int );
26  vtkSetMacro ( TransferType, int );
27  vtkGetMacro ( TransferID, int );
28  vtkSetMacro ( TransferID, int );
29  vtkGetMacro ( SizeOnDisk, int );
30  vtkSetMacro ( SizeOnDisk, int );
31  vtkGetStringMacro ( TransferNodeID);
32  vtkSetStringMacro ( TransferNodeID);
33  vtkGetMacro ( Progress, int );
34  vtkSetMacro ( Progress, int );
35  vtkGetMacro ( TransferStatus, int );
36  vtkSetMacro ( TransferStatus, int );
37 
38  vtkGetMacro ( CancelRequested, int );
39  vtkSetMacro ( CancelRequested, int );
40 
41  vtkGetMacro (TransferCached, int );
42  vtkSetMacro (TransferCached, int );
43 
44  void SetTransferStatusNoModify ( int val)
45  {
46  this->TransferStatus = val;
47  }
48 
49  const char* GetTransferStatusString( ) {
50  switch (this->TransferStatus)
51  {
52  case vtkDataTransfer::Idle: return "Idle";
53  case vtkDataTransfer::CancelPending: return "CancelPending";
54  case vtkDataTransfer::Pending: return "Pending";
55  case vtkDataTransfer::Running: return "Running";
56  case vtkDataTransfer::Completed: return "Completed";
57  case vtkDataTransfer::CompletedWithErrors: return "CompletedWithErrors";
58  case vtkDataTransfer::TimedOut: return "TimedOut";
59  case vtkDataTransfer::Cancelled: return "Cancelled";
60  case vtkDataTransfer::Deleted: return "Deleted";
61  case vtkDataTransfer::Ready: return "Ready";
62  }
63  return "Unknown";
64  }
65 
66  const char* GetTransferTypeString( ) {
67  switch (this->TransferType)
68  {
69  case vtkDataTransfer::RemoteDownload: return "RemoteDownload";
70  case vtkDataTransfer::RemoteUpload: return "RemoteUpload";
71  case vtkDataTransfer::LocalLoad: return "LocalUpload";
72  case vtkDataTransfer::LocalSave: return "LocalSave";
73  case vtkDataTransfer::Unspecified: return "Unspecified";
74  }
75  return "Unknown";
76  }
77 
80  enum
81  {
82  Idle=0,
91  TimedOut
92  };
94  enum
95  {
96  RemoteDownload=0,
100  Unspecified
101  };
102 
103  private:
104 
105  protected:
106  vtkDataTransfer();
107  ~vtkDataTransfer() override;
109  void operator=(const vtkDataTransfer&);
110 
112  char *SourceURI;
121  int Progress;
123 
124 };
125 
126 #endif
127 
const char * GetTransferTypeString()
vtkURIHandler * Handler
void SetTransferStatusNoModify(int val)
const char * GetTransferStatusString()