VTK  9.3.20240327
vtkPainterCommunicator.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
13 #ifndef vtkPainterCommunicator_h
14 #define vtkPainterCommunicator_h
15 
16 #include "vtkRenderingLICOpenGL2Module.h" // for export macro
17 
18 VTK_ABI_NAMESPACE_BEGIN
19 class VTKRENDERINGLICOPENGL2_EXPORT vtkPainterCommunicator
20 {
21 public:
23  virtual ~vtkPainterCommunicator() = default;
24 
29  vtkPainterCommunicator(const vtkPainterCommunicator& other) { this->Copy(&other, false); }
30 
32  {
33  this->Copy(&other, false);
34  return *this;
35  }
36 
42  virtual void Copy(const vtkPainterCommunicator*, bool) {}
43 
47  virtual void Duplicate(const vtkPainterCommunicator*) {}
48 
52  virtual int GetRank() { return 0; }
53  virtual int GetSize() { return 1; }
54  virtual bool GetIsNull() { return false; }
55 
59  virtual int GetWorldRank() { return 0; }
60  virtual int GetWorldSize() { return 1; }
61 
65  virtual bool GetMPIInitialized() { return false; }
66  virtual bool GetMPIFinalized() { return true; }
67 };
68 
69 VTK_ABI_NAMESPACE_END
70 #endif
71 // VTK-HeaderTest-Exclude: vtkPainterCommunicator.h
A communicator that can safely be used inside a painter.
virtual void Duplicate(const vtkPainterCommunicator *)
Duplicate the communicator.
vtkPainterCommunicator()=default
vtkPainterCommunicator & operator=(const vtkPainterCommunicator &other)
virtual bool GetMPIInitialized()
Query MPI about its state.
vtkPainterCommunicator(const vtkPainterCommunicator &other)
Copy and assignment operators.
virtual void Copy(const vtkPainterCommunicator *, bool)
Copy the communicator, the flag indicates if ownership should be assumed.
virtual ~vtkPainterCommunicator()=default
virtual int GetRank()
Query MPI about the communicator.
virtual int GetWorldRank()
Query MPI about the world communicator.