vtkPVSession.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
12 #ifndef vtkPVSession_h
13 #define vtkPVSession_h
14 
15 #include "vtkRemotingCoreModule.h" //needed for exports
16 #include "vtkSession.h"
17 
22 
24 {
25 public:
26  vtkTypeMacro(vtkPVSession, vtkSession);
27  void PrintSelf(ostream& os, vtkIndent indent) override;
28 
30  {
31  NONE = 0,
32  DATA_SERVER = 0x01,
33  DATA_SERVER_ROOT = 0x02,
34  RENDER_SERVER = 0x04,
35  RENDER_SERVER_ROOT = 0x08,
36  SERVERS = DATA_SERVER | RENDER_SERVER,
37  CLIENT = 0x10,
38  CLIENT_AND_SERVERS = DATA_SERVER | CLIENT | RENDER_SERVER
39  };
40 
46  virtual ServerFlags GetProcessRoles();
47 
52  bool HasProcessRole(vtkTypeUInt32 flag)
53  {
54  return ((flag & static_cast<vtkTypeUInt32>(this->GetProcessRoles())) == flag);
55  }
56 
62  virtual vtkMultiProcessController* GetController(ServerFlags processType);
63 
69 
79  virtual vtkPVServerInformation* GetServerInformation() = 0;
80 
85  virtual bool IsMultiClients();
86 
88 
91  vtkGetObjectMacro(ProgressHandler, vtkPVProgressHandler);
93 
95 
98  void PrepareProgress();
99  void CleanupPendingProgress();
101 
106  bool GetPendingProgress();
107 
108 protected:
109  vtkPVSession();
110  ~vtkPVSession() override;
111 
112  enum
113  {
114  EXCEPTION_EVENT_TAG = 31416
115  };
116 
121  virtual bool OnWrongTagEvent(vtkObject* caller, unsigned long eventid, void* calldata);
122 
124 
127  virtual void PrepareProgressInternal();
128  virtual void CleanupPendingProgressInternal();
130 
132 
133 private:
134  vtkPVSession(const vtkPVSession&) = delete;
135  void operator=(const vtkPVSession&) = delete;
136 
137  int ProgressCount;
138  // This flags ensures that while we are waiting for an previous progress-pair
139  // to finish, we don't start new progress-pairs.
140  bool InCleanupPendingProgress;
141 };
142 
143 #endif
bool HasProcessRole(vtkTypeUInt32 flag)
Convenience method that returns true if the current session is serving the indicated role on this pro...
Definition: vtkPVSession.h:52
virtual vtkMPIMToNSocketConnection * GetMPIMToNSocketConnection()
This is socket connection, if any to communicate between the data-server and render-server nodes...
Definition: vtkPVSession.h:68
Gets features of the server.
extends vtkSession to add API for ParaView sessions.
Definition: vtkPVSession.h:23
class to create socket connections between two servers
const int NONE
vtkPVProgressHandler * ProgressHandler
Definition: vtkPVSession.h:131
#define VTKREMOTINGCORE_EXPORT
vtkSession defines a session i.e.
Definition: vtkSession.h:17
void PrintSelf(ostream &os, vtkIndent indent) override
progress handler.