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 
23 class VTKREMOTINGSERVERMANAGERPYTHON_EXPORT vtkSIPythonSourceProxy : public vtkSISourceProxy
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
vtkSIProxy::DeleteVTKObjects
virtual void DeleteVTKObjects()
Called to delete VTK objects.
vtkSISourceProxy::RecreateVTKObjects
void RecreateVTKObjects() override
Overridden to update the output ports.
vtkSIProxy::Push
void Push(vtkSMMessage *msg) override
Push a new state to the underneath implementation.
vtkSIPythonSourceProxy
vtkSISourceProxy for all VTKPythonAlgorithmBase-based algorithms.
Definition: vtkSIPythonSourceProxy.h:23
vtkSISourceProxy::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
vtkSISourceProxy::New
static vtkSISourceProxy * New()
vtkSIProxy::NewVTKObject
virtual vtkObjectBase * NewVTKObject(const char *className)
Create an instance of the class specified.
vtkObjectBase
vtkIndent
vtkSMMessage
vtkNew< vtkPythonInterpreter >
vtkSISourceProxy.h
vtkPVSessionCore
Definition: vtkPVSessionCore.h:30
vtkNew.h
vtkSIProxy::Pull
void Pull(vtkSMMessage *msg) override
Pull the current state of the underneath implementation.
vtkSIObject::Initialize
virtual void Initialize(vtkPVSessionCore *session)
Initializes the instance.
vtkSISourceProxy
Definition: vtkSISourceProxy.h:23