vtkSIPythonSourceProxy.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSIPythonSourceProxy.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
15 #ifndef vtkSIPythonSourceProxy_h
16 #define vtkSIPythonSourceProxy_h
17 
18 #include "vtkNew.h" // needed for vtkNew.
19 #include "vtkRemotingServerManagerPythonModule.h" // for exports
20 #include "vtkSISourceProxy.h"
21 
22 #include <memory> // for unique_ptr
23 
24 class vtkPythonInterpreter;
25 
36 {
37 public:
38  static vtkSIPythonSourceProxy* New();
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
42  void Push(vtkSMMessage*) override;
43  void Pull(vtkSMMessage*) override;
44  void RecreateVTKObjects() override;
45  void Initialize(vtkPVSessionCore* session) override;
46 
47 protected:
49  ~vtkSIPythonSourceProxy() override;
50 
54  vtkObjectBase* NewVTKObject(const char* className) override;
55 
59  void DeleteVTKObjects() override;
60 
61 private:
63  void operator=(const vtkSIPythonSourceProxy&) = delete;
64 
65  class vtkInternals;
66  std::unique_ptr<vtkInternals> Internals;
67  bool ReimportModules;
68 
69  // to get notification of ExitEvent.
71  void OnPyFinalize();
72 };
73 
74 #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.