vtkPVOptions.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVOptions.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 =========================================================================*/
25 #ifndef vtkPVOptions_h
26 #define vtkPVOptions_h
27 
28 #include "vtkCommandOptions.h"
29 #include "vtkRemotingCoreModule.h" //needed for exports
30 
31 #include <string> // used for ivar
32 #include <utility> // needed for pair
33 #include <vector> // needed for vector
34 
35 class vtkPVOptionsInternal;
36 
37 class VTKREMOTINGCORE_EXPORT vtkPVOptions : public vtkCommandOptions
38 {
39 protected:
40  friend class vtkPVOptionsXMLParser;
41 
42 public:
43  static vtkPVOptions* New();
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
48 
51  vtkGetStringMacro(HostName);
53 
54  vtkGetMacro(ConnectID, int);
55  vtkGetMacro(UseStereoRendering, int);
56  vtkGetStringMacro(StereoType);
57 
58  vtkGetMacro(ReverseConnection, int);
59  vtkGetMacro(UseRenderingGroup, int);
60  vtkGetVector2Macro(TileDimensions, int);
61  vtkGetVector2Macro(TileMullions, int);
62 
66  virtual bool GetIsInTileDisplay() const;
67 
71  virtual bool GetIsInCave() const;
72 
76  vtkGetMacro(EGLDeviceIndex, int);
77 
79 
84  vtkGetStringMacro(ParaViewDataName);
86 
88 
91  vtkGetStringMacro(ServersFileName);
93 
95 
100  vtkGetMacro(Timeout, int);
102 
104 
108  vtkSetMacro(ConnectID, int);
110 
112 
115  vtkSetStringMacro(LogFileName);
116  vtkGetStringMacro(LogFileName);
118 
124  virtual int GetMultiClientMode()
125  {
126  return (this->MultiClientMode || this->MultiClientModeWithErrorMacro) ? 1 : 0;
127  }
128  virtual int IsMultiClientModeDebug() { return this->MultiClientModeWithErrorMacro; }
129 
131 
134  vtkGetMacro(DisableFurtherConnections, int);
136 
138 
141  vtkGetMacro(MultiServerMode, int);
143 
145 
152  vtkGetMacro(SymmetricMPIMode, int);
153  vtkSetMacro(SymmetricMPIMode, int);
155 
157 
160  vtkGetMacro(TellVersion, int);
162 
164  vtkGetStringMacro(ServerURL);
165 
168  vtkGetMacro(CatalystLivePort, int);
169 
171 
174  vtkSetStringMacro(ParaViewDataName);
176 
178 
182  vtkGetMacro(EnableStreaming, int);
184 
186 
189  vtkSetMacro(SatelliteMessageIds, int);
190  vtkGetMacro(SatelliteMessageIds, int);
192 
194 
197  vtkGetMacro(PrintMonitors, int);
199 
201 
204  vtkGetStringMacro(TestPlugins);
205  vtkGetStringMacro(TestPluginPaths);
207 
209 
213  vtkGetMacro(EnableStackTrace, int);
214  vtkSetMacro(EnableStackTrace, int);
216 
218 
222  vtkGetMacro(DisableRegistry, int);
224 
226 
233  vtkGetMacro(DisableXDisplayTests, int);
235 
240  vtkGetMacro(ForceOffscreenRendering, int);
241 
245  vtkGetMacro(ForceOnscreenRendering, int);
246 
248 
251  vtkGetMacro(ForceNoMPIInitOnClient, int);
252  vtkSetMacro(ForceNoMPIInitOnClient, int);
253  vtkBooleanMacro(ForceNoMPIInitOnClient, int);
255 
257 
260  vtkGetMacro(ForceMPIInitOnClient, int);
261  vtkSetMacro(ForceMPIInitOnClient, int);
262  vtkBooleanMacro(ForceMPIInitOnClient, int);
264 
266 
270  vtkGetMacro(LogStdErrVerbosity, int);
272 
274  {
275  PARAVIEW = 0x2,
276  PVCLIENT = 0x4,
277  PVSERVER = 0x8,
278  PVRENDER_SERVER = 0x10,
279  PVDATA_SERVER = 0x20,
280  PVBATCH = 0x40,
281  ALLPROCESS = PARAVIEW | PVCLIENT | PVSERVER | PVRENDER_SERVER | PVDATA_SERVER | PVBATCH
282  };
283 
284 protected:
288  vtkPVOptions();
289 
293  ~vtkPVOptions() override;
294 
298  void Initialize() override;
299 
303  int PostProcess(int argc, const char* const* argv) override;
304 
309  int WrongArgument(const char* argument) override;
310 
315  int DeprecatedArgument(const char* argument) override;
316 
318 
322  char* ServerURL; // server URL information
332  char* TestPlugins; // to load plugins from command line for tests
335  int
336  CatalystLivePort; // currently only set through the GUI but may eventually be set in any client
338 
339  // inline setters
340  vtkSetStringMacro(ServerURL);
341  vtkSetStringMacro(ServersFileName);
342  vtkSetStringMacro(TestPlugins);
343  vtkSetStringMacro(TestPluginPaths);
344 
345 private:
346  int ConnectID;
347  int UseOffscreenRendering;
348  int EGLDeviceIndex;
349  int UseStereoRendering;
350  int ReverseConnection;
351  int TileDimensions[2];
352  int TileMullions[2];
353  int UseRenderingGroup;
354  int Timeout;
355  char* LogFileName;
356  int TellVersion;
357  char* StereoType;
358  int EnableStreaming;
359  int SatelliteMessageIds;
360  int PrintMonitors;
361  int EnableStackTrace;
362  int DisableRegistry;
363  int ForceMPIInitOnClient;
364  int ForceNoMPIInitOnClient;
365  int DummyMesaFlag;
366  int ForceOffscreenRendering;
367  int ForceOnscreenRendering;
368 
369  // inline setters
370  vtkSetStringMacro(StereoType);
371 
372 private:
373  vtkPVOptions(const vtkPVOptions&) = delete;
374  void operator=(const vtkPVOptions&) = delete;
375 
376  vtkSetStringMacro(HostName);
377  char* HostName;
378  int LogStdErrVerbosity;
379 
380  std::vector<std::pair<std::string, int> > LogFiles;
381 
382  static int VerbosityArgumentHandler(const char* argument, const char* value, void* call_data);
383  static int LogArgumentHandler(const char* argument, const char* value, void* call_data);
384 };
385 
386 #endif
char * TestPluginPaths
Subclasses may need to access these.
Definition: vtkPVOptions.h:333
virtual int IsMultiClientModeDebug()
Definition: vtkPVOptions.h:128
int MultiClientModeWithErrorMacro
Subclasses may need to access these.
Definition: vtkPVOptions.h:328
char * ServerURL
Subclasses may need to access these.
Definition: vtkPVOptions.h:322
virtual void Initialize()
Initialize arguments.
char * TestPlugins
Subclasses may need to access these.
Definition: vtkPVOptions.h:332
int DisableFurtherConnections
Subclasses may need to access these.
Definition: vtkPVOptions.h:327
virtual int WrongArgument(const char *argument)
This method is called when wrong argument is found.
void PrintSelf(ostream &os, vtkIndent indent) override
int ClientMode
Subclasses may need to access these.
Definition: vtkPVOptions.h:324
ParaView options storage.
virtual int DeprecatedArgument(const char *argument)
This method is called when a deprecated argument is found.
int CatalystLivePort
Subclasses may need to access these.
Definition: vtkPVOptions.h:336
int SymmetricMPIMode
Subclasses may need to access these.
Definition: vtkPVOptions.h:330
int MultiServerMode
Subclasses may need to access these.
Definition: vtkPVOptions.h:329
char * ParaViewDataName
Subclasses may need to access these.
Definition: vtkPVOptions.h:321
virtual int GetMultiClientMode()
Is this server was started for collaboration meaning that it allow several clients to connect to the ...
Definition: vtkPVOptions.h:124
int DisableXDisplayTests
Subclasses may need to access these.
Definition: vtkPVOptions.h:334
int MultiClientMode
Subclasses may need to access these.
Definition: vtkPVOptions.h:326
int ServerMode
Subclasses may need to access these.
Definition: vtkPVOptions.h:323
ParaView options storage.
ParaView options storage.
Definition: vtkPVOptions.h:37
static vtkCommandOptions * New()
char * ServersFileName
Subclasses may need to access these.
Definition: vtkPVOptions.h:331
int RenderServerMode
Subclasses may need to access these.
Definition: vtkPVOptions.h:325
virtual int PostProcess(int argc, const char *const *argv)
After parsing, process extra option dependencies.