VTK  9.0.1
vtkDummyCommunicator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDummyCommunicator.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
28 #ifndef vtkDummyCommunicator_h
29 #define vtkDummyCommunicator_h
30 
31 #include "vtkCommunicator.h"
32 #include "vtkParallelCoreModule.h" // For export macro
33 
34 class VTKPARALLELCORE_EXPORT vtkDummyCommunicator : public vtkCommunicator
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
46  int SendVoidArray(const void*, vtkIdType, int, int, int) override
47  {
48  vtkWarningMacro("There is no one to send to.");
49  return 0;
50  }
51  int ReceiveVoidArray(void*, vtkIdType, int, int, int) override
52  {
53  vtkWarningMacro("There is no one to receive from.");
54  return 0;
55  }
57 
58 protected:
61 
62 private:
64  void operator=(const vtkDummyCommunicator&) = delete;
65 };
66 
67 #endif // vtkDummyCommunicator_h
Used to send/receive messages in a multiprocess environment.
Dummy controller for single process applications.
static vtkDummyCommunicator * New()
~vtkDummyCommunicator() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int SendVoidArray(const void *, vtkIdType, int, int, int) override
Since there is no one to communicate with, these methods just report an error.
int ReceiveVoidArray(void *, vtkIdType, int, int, int) override
Subclasses have to supply this method to receive various arrays of data.
a simple class to control print indentation
Definition: vtkIndent.h:34
int vtkIdType
Definition: vtkType.h:338