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  virtual void PrintSelf(ostream &os, vtkIndent indent);
40 
42 
46  virtual int SendVoidArray(const void *, vtkIdType, int, int, int) {
47  vtkWarningMacro("There is no one to send to.");
48  return 0;
49  }
50  virtual int ReceiveVoidArray(void *, vtkIdType, int, int, int) {
51  vtkWarningMacro("There is no one to receive from.");
52  return 0;
53  }
55 
56 protected:
58  virtual ~vtkDummyCommunicator();
59 
60 private:
61  vtkDummyCommunicator(const vtkDummyCommunicator &) VTK_DELETE_FUNCTION;
62  void operator=(const vtkDummyCommunicator &) VTK_DELETE_FUNCTION;
63 };
64 
65 #endif //vtkDummyCommunicator_h
Dummy controller for single process applications.
virtual int SendVoidArray(const void *, vtkIdType, int, int, int)
Since there is no one to communicate with, these methods just report an error.
int vtkIdType
Definition: vtkType.h:287
a simple class to control print indentation
Definition: vtkIndent.h:39
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
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.
virtual int ReceiveVoidArray(void *, vtkIdType, int, int, int)
Since there is no one to communicate with, these methods just report an error.