vtkPVPythonModule.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
3 // SPDX-FileCopyrightText: Copyright 2009 Sandia Corporation
4 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
5 
18 #ifndef vtkPVPythonModule_h
19 #define vtkPVPythonModule_h
20 
21 #include "vtkObject.h"
22 #include "vtkRemotingCoreModule.h" //needed for exports
23 
25 {
26 public:
27  vtkTypeMacro(vtkPVPythonModule, vtkObject);
28  static vtkPVPythonModule* New();
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
32 
35  vtkGetStringMacro(Source);
36  vtkSetStringMacro(Source);
38 
40 
43  vtkGetStringMacro(FullName);
44  vtkSetStringMacro(FullName);
46 
48 
52  vtkGetMacro(IsPackage, int);
53  vtkSetMacro(IsPackage, int);
54  vtkBooleanMacro(IsPackage, int);
56 
62  static void RegisterModule(vtkPVPythonModule* module);
63 
68  static vtkPVPythonModule* GetModule(const char* fullname);
69 
74  static int HasModule(const char* fullname)
75  {
76  return (vtkPVPythonModule::GetModule(fullname) != nullptr);
77  }
78 
79 protected:
81  ~vtkPVPythonModule() override;
82 
83  char* Source;
84  char* FullName;
85  int IsPackage;
86 
87 private:
88  vtkPVPythonModule(const vtkPVPythonModule&) = delete;
89  void operator=(const vtkPVPythonModule&) = delete;
90 };
91 
92 #endif // vtkPVPythonModule_h
static int HasModule(const char *fullname)
Returns 1 if a Python module with the given full name has been registered, 0 otherwise.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Stores code and option for python modules.
static vtkPVPythonModule * GetModule(const char *fullname)
Return the registered Python module with the given full module name.
#define VTKREMOTINGCORE_EXPORT
static vtkObject * New()
void operator=(const vtkObjectBase &)