vtkPVPythonAlgorithmPlugin.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVPythonAlgorithmPlugin.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 =========================================================================*/
25 #ifndef vtkPVPythonAlgorithmPlugin_h
26 #define vtkPVPythonAlgorithmPlugin_h
27 
28 #include "vtkPVPlugin.h"
29 
30 #include "vtkPVServerManagerPluginInterface.h" // for vtkPVServerManagerPluginInterface
31 #include "vtkRemotingServerManagerPythonModule.h" // for exports
32 
33 #include <memory> //for std::unique_ptr.
34 
36 
38  : public vtkPVPlugin,
40 {
41 public:
42  vtkPVPythonAlgorithmPlugin(const char* pythonmodule);
43  ~vtkPVPythonAlgorithmPlugin() override;
44 
46  const char* GetPluginName() override;
48  const char* GetPluginVersionString() override;
49  bool GetRequiredOnServer() override { return true; }
50  bool GetRequiredOnClient() override { return false; }
51  const char* GetRequiredPlugins() override { return ""; }
52  const char* GetDescription() override { return ""; }
53  const char* GetEULA() override { return nullptr; }
55 
57  void GetXMLs(std::vector<std::string>& xmls) override;
61  {
62  return nullptr;
63  }
65 
66 private:
68  void operator=(const vtkPVPythonAlgorithmPlugin&) = delete;
69 
70  class vtkInternals;
71  std::unique_ptr<vtkInternals> Internals;
72 
78  static bool LoadPlugin(const char* pname);
79 };
80 
81 // Schwartz counter idiom to register loader for Python plugins (based on Python
82 // algorithm).
84 {
85 public:
88 
90 
91 #endif
92 // VTK-HeaderTest-Exclude: vtkPVPythonAlgorithmPlugin.h
#define VTKREMOTINGSERVERMANAGERPYTHON_EXPORT
vtkPVServerManagerPluginInterface defines the interface needed to be implemented by a server-manager ...
virtual const char * GetPluginName()=0
Returns the name for this plugin.
bool GetRequiredOnClient() override
Implementation of the vtkPVPlugin interface.
static class VTKREMOTINGSERVERMANAGERPYTHON_EXPORT vtkPVPythonAlgorithmPluginLoaderInitializer PythonAlgorithmPluginInitializerInstance
bool GetRequiredOnServer() override
Implementation of the vtkPVPlugin interface.
defines the core interface for any ParaView plugin.
Definition: vtkPVPlugin.h:52
const char * GetEULA() override
Implementation of the vtkPVPlugin interface.
const char * GetDescription() override
Implementation of the vtkPVPlugin interface.
vtkClientServerInterpreterInitializer::InterpreterInitializationCallback GetInitializeInterpreterCallback() override
Implementation of the vtkPVServerManagerPluginInterface.
void(* InterpreterInitializationCallback)(vtkClientServerInterpreter *)
virtual const char * GetPluginVersionString()=0
Returns the version for this plugin.
packages a Python module into a ParaView plugin.
const char * GetRequiredPlugins() override
Implementation of the vtkPVPlugin interface.
virtual void GetXMLs(std::vector< std::string > &vtkNotUsed(xmls))=0
Obtain the server-manager configuration xmls, if any.