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) override;
41 
45  void Initialize(int*, char***, int) override {}
46  void Initialize(int*, char***) override {}
47  void Finalize() override {}
48  void Finalize(int) override {}
49 
53  int GetLocalProcessId() { return 0; }
54 
58  void SingleMethodExecute() override;
59 
63  void MultipleMethodExecute() override;
64 
68  void CreateOutputWindow() override {}
69 
71 
75  vtkGetObjectMacro(RMICommunicator, vtkCommunicator);
76  virtual void SetCommunicator(vtkCommunicator *);
77  virtual void SetRMICommunicator(vtkCommunicator *);
79 
80 protected:
82  ~vtkDummyController() override;
83 
84 private:
85  vtkDummyController(const vtkDummyController&) = delete;
86  void operator=(const vtkDummyController&) = delete;
87 };
88 
89 #endif
90 
91 
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:39
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.