vtkPVPythonInformation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
10 #ifndef vtkPVPythonInformation_h
11 #define vtkPVPythonInformation_h
12 
13 #include "vtkPVInformation.h"
14 #include "vtkRemotingCoreModule.h" //needed for exports
15 
16 #include <string> // for string type
17 
19 
21 {
22 public:
23  static vtkPVPythonInformation* New();
25  void PrintSelf(ostream& os, vtkIndent indent) override;
26 
27  void DeepCopy(vtkPVPythonInformation* info);
28 
32  void CopyFromObject(vtkObject*) override;
33 
37  void AddInformation(vtkPVInformation*) override;
38 
40 
43  void CopyToStream(vtkClientServerStream*) override;
44  void CopyFromStream(const vtkClientServerStream*) override;
46 
48 
51  vtkSetMacro(PythonSupport, bool) vtkGetMacro(PythonSupport, bool);
52  vtkBooleanMacro(PythonSupport, bool);
54 
56 
60  void SetPythonVersion(const std::string& arg)
61  {
62  if (arg != this->PythonVersion)
63  {
64  this->PythonVersion = arg;
65  this->Modified();
66  }
67  }
68  const std::string& GetPythonVersion() { return this->PythonVersion; }
70 
72 
76  void SetPythonPath(const std::string& arg)
77  {
78  if (arg != this->PythonPath)
79  {
80  this->PythonPath = arg;
81  this->Modified();
82  }
83  }
84  const std::string& GetPythonPath() { return this->PythonPath; }
86 
88 
91  vtkSetMacro(NumpySupport, bool) vtkGetMacro(NumpySupport, bool);
92  vtkBooleanMacro(NumpySupport, bool);
94 
96 
100  void SetNumpyVersion(const std::string& arg)
101  {
102  if (arg != this->NumpyVersion)
103  {
104  this->NumpyVersion = arg;
105  this->Modified();
106  }
107  }
108  const std::string& GetNumpyVersion() { return this->NumpyVersion; }
110 
112 
116  void SetNumpyPath(const std::string& arg)
117  {
118  if (arg != this->NumpyPath)
119  {
120  this->NumpyPath = arg;
121  this->Modified();
122  }
123  }
124  const std::string& GetNumpyPath() { return this->NumpyPath; }
126 
128 
131  vtkSetMacro(MatplotlibSupport, bool);
132  vtkGetMacro(MatplotlibSupport, bool);
133  vtkBooleanMacro(MatplotlibSupport, bool);
135 
137 
141  void SetMatplotlibVersion(const std::string& arg)
142  {
143  if (arg != this->MatplotlibVersion)
144  {
145  this->MatplotlibVersion = arg;
146  this->Modified();
147  }
148  }
149  const std::string& GetMatplotlibVersion() { return this->MatplotlibVersion; }
151 
153 
157  void SetMatplotlibPath(const std::string& arg)
158  {
159  if (arg != this->MatplotlibPath)
160  {
161  this->MatplotlibPath = arg;
162  this->Modified();
163  }
164  }
165  const std::string& GetMatplotlibPath() { return this->MatplotlibPath; }
167 
168 protected:
170  ~vtkPVPythonInformation() override;
171 
173  std::string PythonPath;
174  std::string PythonVersion;
176  std::string NumpyVersion;
177  std::string NumpyPath;
179  std::string MatplotlibVersion;
180  std::string MatplotlibPath;
181 
182 private:
184  void operator=(const vtkPVPythonInformation&) = delete;
185 };
186 
187 #endif
Gets python features.
const std::string & GetMatplotlibPath()
If GetMatplotlibSupport() is true, returns the path to matplotlib detected on the server...
const std::string & GetPythonPath()
If GetPythonSupport() is true, returns the path to the python libraries detected on the server...
const std::string & GetPythonVersion()
If GetPythonSupport() is true, returns the version of python detected on the server.
virtual void CopyFromStream(const vtkClientServerStream *)
Manage a serialized version of the information.
void SetPythonVersion(const std::string &arg)
If GetPythonSupport() is true, returns the version of python detected on the server.
void SetPythonPath(const std::string &arg)
If GetPythonSupport() is true, returns the path to the python libraries detected on the server...
void SetMatplotlibPath(const std::string &arg)
If GetMatplotlibSupport() is true, returns the path to matplotlib detected on the server...
void PrintSelf(ostream &os, vtkIndent indent) override
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
const std::string & GetMatplotlibVersion()
If GetMatplotlibSupport() is true, returns the version of matplotlib detected on the server...
void SetNumpyVersion(const std::string &arg)
If GetNumpySupport() is true, returns the version of numpy detected on the server.
Store messages for the interpreter.
void SetNumpyPath(const std::string &arg)
If GetNumpySupport() is true, returns the path to numpy detected on the server.
virtual void Modified()
void operator=(const vtkPVInformation &)=delete
#define VTKREMOTINGCORE_EXPORT
virtual void AddInformation(vtkPVInformation *)
Merge another information object.
virtual void CopyToStream(vtkClientServerStream *)=0
Manage a serialized version of the information.
const std::string & GetNumpyVersion()
If GetNumpySupport() is true, returns the version of numpy detected on the server.
virtual void CopyFromObject(vtkObject *)
Transfer information about a single object into this object.
static vtkObject * New()
const std::string & GetNumpyPath()
If GetNumpySupport() is true, returns the path to numpy detected on the server.
Superclass for information objects.
void SetMatplotlibVersion(const std::string &arg)
If GetMatplotlibSupport() is true, returns the version of matplotlib detected on the server...