vtkSIPythonSourceProxy.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
3 #ifndef vtkSIPythonSourceProxy_h
4 #define vtkSIPythonSourceProxy_h
5 
6 #include "vtkNew.h" // needed for vtkNew.
7 #include "vtkRemotingServerManagerPythonModule.h" // for exports
8 #include "vtkSISourceProxy.h"
9 
10 #include <memory> // for unique_ptr
11 
12 class vtkPythonInterpreter;
13 
24 {
25 public:
26  static vtkSIPythonSourceProxy* New();
28  void PrintSelf(ostream& os, vtkIndent indent) override;
29 
30  void Push(vtkSMMessage*) override;
31  void Pull(vtkSMMessage*) override;
32  void RecreateVTKObjects() override;
33  void Initialize(vtkPVSessionCore* session) override;
34 
35 protected:
37  ~vtkSIPythonSourceProxy() override;
38 
42  vtkObjectBase* NewVTKObject(const char* className) override;
43 
47  void DeleteVTKObjects() override;
48 
49 private:
51  void operator=(const vtkSIPythonSourceProxy&) = delete;
52 
53  class vtkInternals;
54  std::unique_ptr<vtkInternals> Internals;
55  bool ReimportModules;
56 
57  // to get notification of ExitEvent.
59  void OnPyFinalize();
60 };
61 
62 #endif
virtual void Initialize(vtkPVSessionCore *session)
Initializes the instance.
#define VTKREMOTINGSERVERMANAGERPYTHON_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) override
vtkSISourceProxy is the server-side helper for a vtkSMSourceProxy.
void Pull(vtkSMMessage *msg) override
Pull the current state of the underneath implementation.
virtual vtkObjectBase * NewVTKObject(const char *className)
Create an instance of the class specified.
void RecreateVTKObjects() override
Overridden to update the output ports.
vtkPVSessionCore is used by vtkSMSession.
vtkSISourceProxy for all VTKPythonAlgorithmBase-based algorithms.
Header class that setup every thing in order to use Protobuf messages in a transparent manner...
static vtkSISourceProxy * New()
void Push(vtkSMMessage *msg) override
Push a new state to the underneath implementation.
virtual void DeleteVTKObjects()
Called to delete VTK objects.