vtkPVProgressHandler.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
31 #ifndef vtkPVProgressHandler_h
32 #define vtkPVProgressHandler_h
33 
34 #include "vtkObject.h"
35 #include "vtkRemotingCoreModule.h" //needed for exports
36 
38 class vtkPVSession;
39 
41 {
42 public:
43  static vtkPVProgressHandler* New();
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
48 
51  void SetSession(vtkPVSession* conn);
52  vtkGetObjectMacro(Session, vtkPVSession);
54 
58  void RegisterProgressEvent(vtkObject* object, int id);
59 
64  void PrepareProgress();
65 
70  void AddHandlers();
71 
76  bool GetEnableProgress();
77 
82  void CleanupPendingProgress();
83 
87  void LocalCleanupPendingProgress();
88 
90 
95  vtkSetClampMacro(ProgressInterval, double, 0.01, 30.0);
96  vtkGetMacro(ProgressInterval, double);
98 
100 
103  vtkGetStringMacro(LastProgressText);
104  vtkGetMacro(LastProgress, int);
106 
107 protected:
109  ~vtkPVProgressHandler() override;
110 
111  enum TAGS
112  {
113  CLEANUP_TAG = 188969,
114  PROGRESS_EVENT_TAG = 188970,
115  MESSAGE_EVENT_TAG = 188971
116  };
117 
118  enum RMI_TAGS
119  {
120  CLEANUP_TAG_RMI = 188972,
121  MESSAGE_EVENT_TAG_RMI = 188973
122  };
123 
127  void RefreshProgress(const char* progress_text, double progress);
128 
131 
132 private:
134  void operator=(const vtkPVProgressHandler&) = delete;
135 
139  void OnProgressEvent(vtkObject* caller, unsigned long eventid, void* calldata);
140 
146  void OnMessageEvent(vtkObject* caller, unsigned long eventid, void* calldata);
147 
151  bool OnWrongTagEvent(vtkObject* caller, unsigned long eventid, void* calldata);
152 
156  void RefreshMessage(const char* message_text, int eventid, bool is_local);
157 
158  bool AddedHandlers;
159  class vtkInternals;
160  vtkInternals* Internals;
161 
162  vtkSetStringMacro(LastProgressText);
163  int LastProgress;
164  char* LastProgressText;
165 
166  class RMICallback;
167  friend class RMICallback;
168  ;
169 };
170 
171 #endif
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
extends vtkSession to add API for ParaView sessions.
Definition: vtkPVSession.h:23
#define VTKREMOTINGCORE_EXPORT
static vtkObject * New()
void operator=(const vtkObjectBase &)
progress handler.