29 #ifndef vtkCLIOptions_h 30 #define vtkCLIOptions_h 38 #include <vtk_cli11_forward.h> 51 void PrintSelf(ostream& os,
vtkIndent indent)
override;
58 static vtkCLIOptions* New(
const std::shared_ptr<CLI::App>& app);
64 CLI::App* GetCLI11App()
const;
69 const char* GetHelp()
const;
76 void SetName(
const char* name);
77 const char* GetName()
const;
84 void SetDescription(
const char* desc);
85 const char* GetDescription()
const;
97 void SetAllowExtras(
bool val);
98 bool GetAllowExtras()
const;
110 void SetStopOnUnrecognizedArgument(
bool val);
111 bool GetStopOnUnrecognizedArgument()
const;
121 vtkSetMacro(GenerateWarnings,
bool);
122 vtkGetMacro(GenerateWarnings,
bool);
123 vtkBooleanMacro(GenerateWarnings,
bool);
141 vtkSetMacro(HandleLegacyArgumentFormats,
bool);
142 vtkGetMacro(HandleLegacyArgumentFormats,
bool);
143 vtkBooleanMacro(HandleLegacyArgumentFormats,
bool);
156 bool Parse(
int& argc,
char**& argv);
174 vtkGetMacro(HelpRequested,
bool);
179 std::string GetUsage()
const;
190 std::unique_ptr<vtkInternals> Internals;
191 bool HandleLegacyArgumentFormats =
true;
192 bool GenerateWarnings =
true;
193 std::vector<std::string> ExtraArguments;
194 std::string LastErrorMessage;
195 bool HelpRequested =
false;
196 mutable std::string Help;
197 mutable std::string Description;
#define VTKPVVTKEXTENSIONSCORE_EXPORT
command line options manager
const std::vector< std::string > & GetExtraArguments() const
Returns unparsed / extra arguments left over from the most reset Parse call.
const std::string & GetLastErrorMessage() const
Returns error message from the most recent call to Parse, if any.