VTK  9.3.1
vtkDummyCommunicator.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
3 
16 #ifndef vtkDummyCommunicator_h
17 #define vtkDummyCommunicator_h
18 
19 #include "vtkCommunicator.h"
20 #include "vtkParallelCoreModule.h" // For export macro
21 
22 VTK_ABI_NAMESPACE_BEGIN
23 class VTKPARALLELCORE_EXPORT vtkDummyCommunicator : public vtkCommunicator
24 {
25 public:
27  static vtkDummyCommunicator* New();
28  void PrintSelf(ostream& os, vtkIndent indent) override;
29 
31 
35  int SendVoidArray(const void*, vtkIdType, int, int, int) override
36  {
37  vtkWarningMacro("There is no one to send to.");
38  return 0;
39  }
40  int ReceiveVoidArray(void*, vtkIdType, int, int, int) override
41  {
42  vtkWarningMacro("There is no one to receive from.");
43  return 0;
44  }
46 
47 protected:
49  ~vtkDummyCommunicator() override;
50 
51 private:
53  void operator=(const vtkDummyCommunicator&) = delete;
54 };
55 
56 VTK_ABI_NAMESPACE_END
57 #endif // vtkDummyCommunicator_h
Dummy controller for single process applications.
int SendVoidArray(const void *, vtkIdType, int, int, int) override
Since there is no one to communicate with, these methods just report an error.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int vtkIdType
Definition: vtkType.h:315
a simple class to control print indentation
Definition: vtkIndent.h:28
int ReceiveVoidArray(void *, vtkIdType, int, int, int) override
Since there is no one to communicate with, these methods just report an error.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Used to send/receive messages in a multiprocess environment.