vtkPVPythonInformation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVPythonInformation.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
22 #ifndef vtkPVPythonInformation_h
23 #define vtkPVPythonInformation_h
24 
25 #include "vtkPVInformation.h"
26 #include "vtkRemotingCoreModule.h" //needed for exports
27 
28 #include <string> // for string type
29 
31 
33 {
34 public:
35  static vtkPVPythonInformation* New();
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
39  void DeepCopy(vtkPVPythonInformation* info);
40 
44  void CopyFromObject(vtkObject*) override;
45 
49  void AddInformation(vtkPVInformation*) override;
50 
52 
55  void CopyToStream(vtkClientServerStream*) override;
56  void CopyFromStream(const vtkClientServerStream*) override;
58 
60 
63  vtkSetMacro(PythonSupport, bool) vtkGetMacro(PythonSupport, bool);
64  vtkBooleanMacro(PythonSupport, bool);
66 
68 
72  void SetPythonVersion(const std::string& arg)
73  {
74  if (arg != this->PythonVersion)
75  {
76  this->PythonVersion = arg;
77  this->Modified();
78  }
79  }
80  const std::string& GetPythonVersion() { return this->PythonVersion; }
82 
84 
88  void SetPythonPath(const std::string& arg)
89  {
90  if (arg != this->PythonPath)
91  {
92  this->PythonPath = arg;
93  this->Modified();
94  }
95  }
96  const std::string& GetPythonPath() { return this->PythonPath; }
98 
100 
103  vtkSetMacro(NumpySupport, bool) vtkGetMacro(NumpySupport, bool);
104  vtkBooleanMacro(NumpySupport, bool);
106 
108 
112  void SetNumpyVersion(const std::string& arg)
113  {
114  if (arg != this->NumpyVersion)
115  {
116  this->NumpyVersion = arg;
117  this->Modified();
118  }
119  }
120  const std::string& GetNumpyVersion() { return this->NumpyVersion; }
122 
124 
128  void SetNumpyPath(const std::string& arg)
129  {
130  if (arg != this->NumpyPath)
131  {
132  this->NumpyPath = arg;
133  this->Modified();
134  }
135  }
136  const std::string& GetNumpyPath() { return this->NumpyPath; }
138 
140 
143  vtkSetMacro(MatplotlibSupport, bool);
144  vtkGetMacro(MatplotlibSupport, bool);
145  vtkBooleanMacro(MatplotlibSupport, bool);
147 
149 
153  void SetMatplotlibVersion(const std::string& arg)
154  {
155  if (arg != this->MatplotlibVersion)
156  {
157  this->MatplotlibVersion = arg;
158  this->Modified();
159  }
160  }
161  const std::string& GetMatplotlibVersion() { return this->MatplotlibVersion; }
163 
165 
169  void SetMatplotlibPath(const std::string& arg)
170  {
171  if (arg != this->MatplotlibPath)
172  {
173  this->MatplotlibPath = arg;
174  this->Modified();
175  }
176  }
177  const std::string& GetMatplotlibPath() { return this->MatplotlibPath; }
179 
180 protected:
182  ~vtkPVPythonInformation() override;
183 
185  std::string PythonPath;
186  std::string PythonVersion;
188  std::string NumpyVersion;
189  std::string NumpyPath;
191  std::string MatplotlibVersion;
192  std::string MatplotlibPath;
193 
194 private:
196  void operator=(const vtkPVPythonInformation&) = delete;
197 };
198 
199 #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...