ParaView
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 "vtkPVClientServerCoreCoreModule.h" //needed for exports
26 #include "vtkPVInformation.h"
27 
28 #include <string> // for string type
29 
31 
32 class VTKPVCLIENTSERVERCORECORE_EXPORT vtkPVPythonInformation : public vtkPVInformation
33 {
34 public:
35  static vtkPVPythonInformation* New();
37  void PrintSelf(ostream& os, vtkIndent indent);
38 
39  void DeepCopy(vtkPVPythonInformation* info);
40 
44  virtual void CopyFromObject(vtkObject*);
45 
49  virtual void AddInformation(vtkPVInformation*);
50 
52 
55  virtual void CopyToStream(vtkClientServerStream*);
56  virtual void CopyFromStream(const vtkClientServerStream*);
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) vtkGetMacro(MatplotlibSupport, bool)
144  vtkBooleanMacro(MatplotlibSupport, bool)
146 
148 
152  void SetMatplotlibVersion(const std::string& arg)
153  {
154  if (arg != this->MatplotlibVersion)
155  {
156  this->MatplotlibVersion = arg;
157  this->Modified();
158  }
159  }
160  const std::string& GetMatplotlibVersion() { return this->MatplotlibVersion; }
162 
164 
168  void SetMatplotlibPath(const std::string& arg)
169  {
170  if (arg != this->MatplotlibPath)
171  {
172  this->MatplotlibPath = arg;
173  this->Modified();
174  }
175  }
176  const std::string& GetMatplotlibPath() { return this->MatplotlibPath; }
178 
179 protected:
182 
184  std::string PythonPath;
185  std::string PythonVersion;
187  std::string NumpyVersion;
188  std::string NumpyPath;
190  std::string MatplotlibVersion;
191  std::string MatplotlibPath;
192 
193 private:
194  vtkPVPythonInformation(const vtkPVPythonInformation&) VTK_DELETE_FUNCTION;
195  void operator=(const vtkPVPythonInformation&) VTK_DELETE_FUNCTION;
196 };
197 
198 #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 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...
const std::string & GetMatplotlibVersion()
If GetMatplotlibSupport() is true, returns the version of matplotlib 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.
void PrintSelf(ostream &os, vtkIndent indent)
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.
const std::string & GetNumpyPath()
If GetNumpySupport() is true, returns the path to numpy detected on the server.
Superclass for information objects.