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 
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  vtkSetMacro(EnableStreaming, int);
183  vtkGetMacro(EnableStreaming, int);
185 
187 
190  vtkSetMacro(SatelliteMessageIds, int);
191  vtkGetMacro(SatelliteMessageIds, int);
193 
195 
198  vtkGetMacro(PrintMonitors, int);
200 
202 
205  vtkGetStringMacro(TestPlugins);
206  vtkGetStringMacro(TestPluginPaths);
208 
210 
214  vtkGetMacro(EnableStackTrace, int);
215  vtkSetMacro(EnableStackTrace, int);
217 
219 
223  vtkGetMacro(DisableRegistry, int);
225 
227 
234  vtkGetMacro(DisableXDisplayTests, int);
236 
241  vtkGetMacro(ForceOffscreenRendering, int);
242 
246  vtkGetMacro(ForceOnscreenRendering, int);
247 
249 
252  vtkGetMacro(ForceNoMPIInitOnClient, int);
253  vtkSetMacro(ForceNoMPIInitOnClient, int);
254  vtkBooleanMacro(ForceNoMPIInitOnClient, int);
256 
258 
261  vtkGetMacro(ForceMPIInitOnClient, int);
262  vtkSetMacro(ForceMPIInitOnClient, int);
263  vtkBooleanMacro(ForceMPIInitOnClient, int);
265 
267 
271  vtkGetMacro(LogStdErrVerbosity, int);
273 
275 
280  const std::string& GetDisplay(int myrank = 0, int num_ranks = 1);
282 
284  {
285  PARAVIEW = 0x2,
286  PVCLIENT = 0x4,
287  PVSERVER = 0x8,
288  PVRENDER_SERVER = 0x10,
289  PVDATA_SERVER = 0x20,
290  PVBATCH = 0x40,
291  ALLPROCESS = PARAVIEW | PVCLIENT | PVSERVER | PVRENDER_SERVER | PVDATA_SERVER | PVBATCH
292  };
293 
294 protected:
298  vtkPVOptions();
299 
303  ~vtkPVOptions() override;
304 
308  void Initialize() override;
309 
313  int PostProcess(int argc, const char* const* argv) override;
314 
319  int WrongArgument(const char* argument) override;
320 
325  int DeprecatedArgument(const char* argument) override;
326 
328 
332  char* ServerURL; // server URL information
342  char* TestPlugins; // to load plugins from command line for tests
345  int
346  CatalystLivePort; // currently only set through the GUI but may eventually be set in any client
348 
349  // inline setters
350  vtkSetStringMacro(ServerURL);
351  vtkSetStringMacro(ServersFileName);
352  vtkSetStringMacro(TestPlugins);
353  vtkSetStringMacro(TestPluginPaths);
354 
355 private:
356  int ConnectID;
357  int UseOffscreenRendering;
358  int EGLDeviceIndex;
359  int UseStereoRendering;
360  int ReverseConnection;
361  int TileDimensions[2];
362  int TileMullions[2];
363  int UseRenderingGroup;
364  int Timeout;
365  char* LogFileName;
366  int TellVersion;
367  char* StereoType;
368  int EnableStreaming;
369  int SatelliteMessageIds;
370  int PrintMonitors;
371  int EnableStackTrace;
372  int DisableRegistry;
373  int ForceMPIInitOnClient;
374  int ForceNoMPIInitOnClient;
375  int DummyMesaFlag;
376  int ForceOffscreenRendering;
377  int ForceOnscreenRendering;
378 
379  // inline setters
380  vtkSetStringMacro(StereoType);
381 
382 private:
383  vtkPVOptions(const vtkPVOptions&) = delete;
384  void operator=(const vtkPVOptions&) = delete;
385 
386  vtkSetStringMacro(HostName);
387  char* HostName;
388  int LogStdErrVerbosity;
389 
390  std::vector<std::pair<std::string, int> > LogFiles;
391  std::vector<std::string> Displays;
392  int DisplaysAssignmentMode;
393 
394  enum DisplaysAssignmentModeEnum
395  {
396  CONTIGUOUS,
397  ROUNDROBIN
398  };
399 
400  static int VerbosityArgumentHandler(const char* argument, const char* value, void* call_data);
401  static int LogArgumentHandler(const char* argument, const char* value, void* call_data);
402  static int DisplaysArgumentHandler(const char* argument, const char* value, void* call_data);
403  static int DisplaysAssignmentModeArgumentHandler(
404  const char* argument, const char* value, void* call_data);
405 };
406 
407 #endif
char * TestPluginPaths
Subclasses may need to access these.
Definition: vtkPVOptions.h:343
virtual int IsMultiClientModeDebug()
Definition: vtkPVOptions.h:128
int MultiClientModeWithErrorMacro
Subclasses may need to access these.
Definition: vtkPVOptions.h:338
char * ServerURL
Subclasses may need to access these.
Definition: vtkPVOptions.h:332
virtual void Initialize()
Initialize arguments.
char * TestPlugins
Subclasses may need to access these.
Definition: vtkPVOptions.h:342
int DisableFurtherConnections
Subclasses may need to access these.
Definition: vtkPVOptions.h:337
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:334
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:346
int SymmetricMPIMode
Subclasses may need to access these.
Definition: vtkPVOptions.h:340
int MultiServerMode
Subclasses may need to access these.
Definition: vtkPVOptions.h:339
char * ParaViewDataName
Subclasses may need to access these.
Definition: vtkPVOptions.h:331
virtual int GetMultiClientMode()
Is this server was started for collaboration meaning that it allow several clients to connect to the ...
Definition: vtkPVOptions.h:124
#define VTKREMOTINGCORE_EXPORT
int DisableXDisplayTests
Subclasses may need to access these.
Definition: vtkPVOptions.h:344
int MultiClientMode
Subclasses may need to access these.
Definition: vtkPVOptions.h:336
int ServerMode
Subclasses may need to access these.
Definition: vtkPVOptions.h:333
ParaView options storage.
ParaView options storage.
Definition: vtkPVOptions.h:37
static vtkCommandOptions * New()
char * ServersFileName
Subclasses may need to access these.
Definition: vtkPVOptions.h:341
int RenderServerMode
Subclasses may need to access these.
Definition: vtkPVOptions.h:335
virtual int PostProcess(int argc, const char *const *argv)
After parsing, process extra option dependencies.