vtkPVPythonAlgorithmPlugin.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
13 #ifndef vtkPVPythonAlgorithmPlugin_h
14 #define vtkPVPythonAlgorithmPlugin_h
15 
16 #include "vtkPVPlugin.h"
17 
18 #include "vtkPVServerManagerPluginInterface.h" // for vtkPVServerManagerPluginInterface
19 #include "vtkRemotingServerManagerPythonModule.h" // for exports
20 
21 #include <memory> //for std::unique_ptr.
22 
24 
26  : public vtkPVPlugin
28 {
29 public:
30  vtkPVPythonAlgorithmPlugin(const char* pythonmodule);
31  ~vtkPVPythonAlgorithmPlugin() override;
32 
35  const char* GetPluginName() override;
36  const char* GetPluginVersionString() override;
37  bool GetRequiredOnServer() override { return true; }
38  bool GetRequiredOnClient() override { return false; }
39  const char* GetRequiredPlugins() override { return ""; }
40  const char* GetDescription() override { return ""; }
41  const char* GetEULA() override { return nullptr; }
43 
46  void GetXMLs(std::vector<std::string>& xmls) override;
49  {
50  return nullptr;
51  }
53 
54 private:
56  void operator=(const vtkPVPythonAlgorithmPlugin&) = delete;
57 
58  class vtkInternals;
59  std::unique_ptr<vtkInternals> Internals;
60 
66  static bool LoadPlugin(const char* pname);
67 };
68 
69 // Schwartz counter idiom to register loader for Python plugins (based on Python
70 // algorithm).
72 {
73 public:
76 
78 
79 #endif
80 // 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.
static class VTKREMOTINGSERVERMANAGERPYTHON_EXPORT vtkPVPythonAlgorithmPluginLoaderInitializer PythonAlgorithmPluginInitializerInstance
defines the core interface for any ParaView plugin.
Definition: vtkPVPlugin.h:38
const char * GetDescription() override
vtkClientServerInterpreterInitializer::InterpreterInitializationCallback GetInitializeInterpreterCallback() override
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
virtual void GetXMLs(std::vector< std::string > &vtkNotUsed(xmls))=0
Obtain the server-manager configuration xmls, if any.