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
34class VTKPARALLELCORE_EXPORT vtkDummyCommunicator : public vtkCommunicator
35{
36public:
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
56protected:
59
60private:
61 vtkDummyCommunicator(const vtkDummyCommunicator &) VTK_DELETE_FUNCTION;
62 void operator=(const vtkDummyCommunicator &) VTK_DELETE_FUNCTION;
63};
64
65#endif //vtkDummyCommunicator_h
Used to send/receive messages in a multiprocess environment.
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.
virtual ~vtkDummyCommunicator()
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
static vtkDummyCommunicator * New()
virtual int ReceiveVoidArray(void *, vtkIdType, int, int, int)
Subclasses have to supply this method to receive various arrays of data.
a simple class to control print indentation
Definition: vtkIndent.h:40
int vtkIdType
Definition: vtkType.h:287