VTK
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 "vtkParallelCoreModule.h" // For export macro
32 #include "vtkCommunicator.h"
33 
34 class VTKPARALLELCORE_EXPORT vtkDummyCommunicator : public vtkCommunicator
35 {
36 public:
38  static vtkDummyCommunicator *New();
39  void PrintSelf(ostream &os, vtkIndent indent) override;
40 
42 
46  int SendVoidArray(const void *, vtkIdType, int, int, int) override {
47  vtkWarningMacro("There is no one to send to.");
48  return 0;
49  }
50  int ReceiveVoidArray(void *, vtkIdType, int, int, int) override {
51  vtkWarningMacro("There is no one to receive from.");
52  return 0;
53  }
55 
56 protected:
58  ~vtkDummyCommunicator() override;
59 
60 private:
62  void operator=(const vtkDummyCommunicator &) = delete;
63 };
64 
65 #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:347
a simple class to control print indentation
Definition: vtkIndent.h:39
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.