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 =========================================================================*/
26 #ifndef vtkDummyController_h
27 #define vtkDummyController_h
28 
29 #include "vtkParallelCoreModule.h" // For export macro
31 
32 class VTKPARALLELCORE_EXPORT vtkDummyController : public vtkMultiProcessController
33 {
34 public:
35  static vtkDummyController *New();
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
42  void Initialize(int*, char***, int) override {}
43  void Initialize(int*, char***) override {}
44  void Finalize() override {}
45  void Finalize(int) override {}
46 
50  int GetLocalProcessId() { return 0; }
51 
55  void SingleMethodExecute() override;
56 
60  void MultipleMethodExecute() override;
61 
65  void CreateOutputWindow() override {}
66 
68 
72  vtkGetObjectMacro(RMICommunicator, vtkCommunicator);
73  virtual void SetCommunicator(vtkCommunicator *);
74  virtual void SetRMICommunicator(vtkCommunicator *);
76 
77 protected:
79  ~vtkDummyController() override;
80 
81 private:
82  vtkDummyController(const vtkDummyController&) = delete;
83  void operator=(const vtkDummyController&) = delete;
84 };
85 
86 #endif
87 
88 
void Finalize(int) override
This method is for cleaning up.
void Initialize(int *, char ***, int) override
This method is for setting up the processes.
void Initialize(int *, char ***) override
Dummy controller for single process applications.
virtual void MultipleMethodExecute()=0
Execute the MultipleMethods (as define by calling SetMultipleMethod for each of the required this->Nu...
a simple class to control print indentation
Definition: vtkIndent.h:33
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void CreateOutputWindow() override
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...
void Finalize() override
This method is for cleaning up.
Multiprocessing communication superclass.