vtkPVPythonModule.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPVPythonModule.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 /*-------------------------------------------------------------------------
16  Copyright 2009 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
20 
33 #ifndef vtkPVPythonModule_h
34 #define vtkPVPythonModule_h
35 
36 #include "vtkObject.h"
37 #include "vtkRemotingCoreModule.h" //needed for exports
38 
40 {
41 public:
42  vtkTypeMacro(vtkPVPythonModule, vtkObject);
43  static vtkPVPythonModule* New();
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
47 
50  vtkGetStringMacro(Source);
51  vtkSetStringMacro(Source);
53 
55 
58  vtkGetStringMacro(FullName);
59  vtkSetStringMacro(FullName);
61 
63 
67  vtkGetMacro(IsPackage, int);
68  vtkSetMacro(IsPackage, int);
69  vtkBooleanMacro(IsPackage, int);
71 
77  static void RegisterModule(vtkPVPythonModule* module);
78 
83  static vtkPVPythonModule* GetModule(const char* fullname);
84 
89  static int HasModule(const char* fullname)
90  {
91  return (vtkPVPythonModule::GetModule(fullname) != NULL);
92  }
93 
94 protected:
96  ~vtkPVPythonModule() override;
97 
98  char* Source;
99  char* FullName;
101 
102 private:
103  vtkPVPythonModule(const vtkPVPythonModule&) = delete;
104  void operator=(const vtkPVPythonModule&) = delete;
105 };
106 
107 #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 &)