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 
20 class VTKREMOTINGCORE_EXPORT vtkPVPythonInformation : public vtkPVInformation
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
DeepCopy
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
vtkPVPythonInformation::GetPythonPath
const std::string & GetPythonPath()
If GetPythonSupport() is true, returns the path to the python libraries detected on the server.
Definition: vtkPVPythonInformation.h:84
vtkPVInformation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
vtkPVPythonInformation::NumpyPath
std::string NumpyPath
Definition: vtkPVPythonInformation.h:177
vtkPVPythonInformation::SetMatplotlibVersion
void SetMatplotlibVersion(const std::string &arg)
If GetMatplotlibSupport() is true, returns the version of matplotlib detected on the server.
Definition: vtkPVPythonInformation.h:141
vtkPVPythonInformation::NumpySupport
bool NumpySupport
Definition: vtkPVPythonInformation.h:175
vtkPVPythonInformation
Gets python features.
Definition: vtkPVPythonInformation.h:20
vtkObject::New
static vtkObject * New()
vtkClientServerStream
Store messages for the interpreter.
Definition: vtkClientServerStream.h:23
vtkPVInformation.h
vtkObject::Modified
virtual void Modified()
vtkObject
vtkPVPythonInformation::GetMatplotlibVersion
const std::string & GetMatplotlibVersion()
If GetMatplotlibSupport() is true, returns the version of matplotlib detected on the server.
Definition: vtkPVPythonInformation.h:149
vtkPVPythonInformation::MatplotlibVersion
std::string MatplotlibVersion
Definition: vtkPVPythonInformation.h:179
vtkPVPythonInformation::PythonPath
std::string PythonPath
Definition: vtkPVPythonInformation.h:173
vtkPVPythonInformation::SetNumpyPath
void SetNumpyPath(const std::string &arg)
If GetNumpySupport() is true, returns the path to numpy detected on the server.
Definition: vtkPVPythonInformation.h:116
vtkPVPythonInformation::MatplotlibPath
std::string MatplotlibPath
Definition: vtkPVPythonInformation.h:180
vtkPVPythonInformation::GetNumpyVersion
const std::string & GetNumpyVersion()
If GetNumpySupport() is true, returns the version of numpy detected on the server.
Definition: vtkPVPythonInformation.h:108
vtkPVInformation::operator=
void operator=(const vtkPVInformation &)=delete
vtkPVPythonInformation::NumpyVersion
std::string NumpyVersion
Definition: vtkPVPythonInformation.h:176
vtkPVPythonInformation::SetPythonPath
void SetPythonPath(const std::string &arg)
If GetPythonSupport() is true, returns the path to the python libraries detected on the server.
Definition: vtkPVPythonInformation.h:76
vtkPVPythonInformation::GetNumpyPath
const std::string & GetNumpyPath()
If GetNumpySupport() is true, returns the path to numpy detected on the server.
Definition: vtkPVPythonInformation.h:124
vtkPVInformation::AddInformation
virtual void AddInformation(vtkPVInformation *)
Merge another information object.
vtkPVPythonInformation::PythonVersion
std::string PythonVersion
Definition: vtkPVPythonInformation.h:174
vtkPVPythonInformation::SetMatplotlibPath
void SetMatplotlibPath(const std::string &arg)
If GetMatplotlibSupport() is true, returns the path to matplotlib detected on the server.
Definition: vtkPVPythonInformation.h:157
vtkIndent
vtkPVInformation::CopyFromObject
virtual void CopyFromObject(vtkObject *)
Transfer information about a single object into this object.
vtkPVPythonInformation::SetNumpyVersion
void SetNumpyVersion(const std::string &arg)
If GetNumpySupport() is true, returns the version of numpy detected on the server.
Definition: vtkPVPythonInformation.h:100
vtkPVInformation
Superclass for information objects.
Definition: vtkPVInformation.h:19
vtkPVPythonInformation::PythonSupport
bool PythonSupport
Definition: vtkPVPythonInformation.h:172
vtkPVPythonInformation::GetMatplotlibPath
const std::string & GetMatplotlibPath()
If GetMatplotlibSupport() is true, returns the path to matplotlib detected on the server.
Definition: vtkPVPythonInformation.h:165
vtkPVInformation::CopyToStream
virtual void CopyToStream(vtkClientServerStream *)=0
Manage a serialized version of the information.
vtkPVInformation::CopyFromStream
virtual void CopyFromStream(const vtkClientServerStream *)
Manage a serialized version of the information.
vtkPVPythonInformation::SetPythonVersion
void SetPythonVersion(const std::string &arg)
If GetPythonSupport() is true, returns the version of python detected on the server.
Definition: vtkPVPythonInformation.h:60
vtkPVPythonInformation::MatplotlibSupport
bool MatplotlibSupport
Definition: vtkPVPythonInformation.h:178
vtkPVPythonInformation::GetPythonVersion
const std::string & GetPythonVersion()
If GetPythonSupport() is true, returns the version of python detected on the server.
Definition: vtkPVPythonInformation.h:68