vtkInitializationHelper.h
Go to the documentation of this file.
1 
2 /*=========================================================================
3 
4  Program: ParaView
5  Module: vtkInitializationHelper.h
6 
7  Copyright (c) Kitware, Inc.
8  All rights reserved.
9  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notice for more information.
14 
15 =========================================================================*/
25 #ifndef vtkInitializationHelper_h
26 #define vtkInitializationHelper_h
27 
28 #include "vtkObject.h"
29 #include "vtkRemotingApplicationModule.h" // needed for exports
30 #include <string> // needed for std::string
31 
32 class vtkCLIOptions;
33 class vtkStringList;
34 
36 {
37 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
53  static bool Initialize(int argc, char** argv, int processType, vtkCLIOptions* options = nullptr,
54  bool enableStandardArgs = true);
55 
59  static bool Initialize(vtkStringList* argv, int processType);
60 
64  static bool Initialize(const char* executable, int type);
65 
81  static bool InitializeOptions(int argc, char** argv, int processType,
82  vtkCLIOptions* options = nullptr, bool enableStandardArgs = true);
83 
93  static bool InitializeMiscellaneous(int type);
94 
99  static void Finalize();
100 
104  static int GetExitCode() { return vtkInitializationHelper::ExitCode; }
105 
107 
113  static void StandaloneInitialize();
114  static void StandaloneFinalize();
116 
118 
123  static void SetLoadSettingsFilesDuringInitialization(bool);
124  static bool GetLoadSettingsFilesDuringInitialization();
126 
128 
132  static void SetOrganizationName(const std::string& organizationName);
133  static const std::string& GetOrganizationName();
135 
137 
141  static void SetApplicationName(const std::string& appName);
142  static const std::string& GetApplicationName();
144 
149  static std::string GetUserSettingsDirectory();
150 
154  static std::string GetUserSettingsFilePath();
155 
156 protected:
157  vtkInitializationHelper() = default;
158  ~vtkInitializationHelper() override = default;
159 
163  static void LoadSettings();
164 
165 private:
167  void operator=(const vtkInitializationHelper&) = delete;
168 
169  static bool LoadSettingsFilesDuringInitialization;
170  static bool SaveUserSettingsFileDuringFinalization;
171  static std::string OrganizationName;
172  static std::string ApplicationName;
173  static int ExitCode;
174 };
175 
176 #endif
static int GetExitCode()
Returns the exit code after Initialize.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
command line options manager
Definition: vtkCLIOptions.h:58
#define VTKREMOTINGAPPLICATION_EXPORT
help class for python modules
void operator=(const vtkObjectBase &)
Manages allocation and freeing for a string list.
Definition: vtkStringList.h:30