VTK
vtkDummyController.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDummyController.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 =========================================================================*/
29 #ifndef vtkDummyController_h
30 #define vtkDummyController_h
31 
32 #include "vtkParallelCoreModule.h" // For export macro
34 
35 class VTKPARALLELCORE_EXPORT vtkDummyController : public vtkMultiProcessController
36 {
37 public:
38  static vtkDummyController *New();
40  void PrintSelf(ostream& os, vtkIndent indent);
41 
45  virtual void Initialize(int*, char***, int) {}
46  virtual void Initialize(int*, char***) {}
47  virtual void Finalize() {}
48  virtual void Finalize(int) {}
49 
53  int GetLocalProcessId() { return 0; }
54 
58  virtual void SingleMethodExecute();
59 
63  virtual void MultipleMethodExecute();
64 
68  virtual void CreateOutputWindow() {}
69 
71 
75  vtkGetObjectMacro(Communicator, vtkCommunicator);
76  vtkGetObjectMacro(RMICommunicator, vtkCommunicator);
77  virtual void SetCommunicator(vtkCommunicator *);
78  virtual void SetRMICommunicator(vtkCommunicator *);
80 
81 protected:
84 
85 private:
86  vtkDummyController(const vtkDummyController&) VTK_DELETE_FUNCTION;
87  void operator=(const vtkDummyController&) VTK_DELETE_FUNCTION;
88 };
89 
90 #endif
91 
92 
Dummy controller for single process applications.
virtual void Finalize(int)
This method is for cleaning up.
virtual void Initialize(int *, char ***, int)
This method is for setting up the processes.
virtual void MultipleMethodExecute()=0
Execute the MultipleMethods (as define by calling SetMultipleMethod for each of the required this->Nu...
virtual void Finalize()
This method is for cleaning up.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void Initialize(int *, char ***)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void CreateOutputWindow()
Does nothing.
int GetLocalProcessId()
This method always returns 0.
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 void SingleMethodExecute()=0
Execute the SingleMethod (as define by SetSingleMethod) using this->NumberOfProcesses processes...
Multiprocessing communication superclass.