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;
114 void SetStopOnUnrecognizedArgument(
bool val);
115 bool GetStopOnUnrecognizedArgument()
const;
125 vtkSetMacro(GenerateWarnings,
bool);
126 vtkGetMacro(GenerateWarnings,
bool);
127 vtkBooleanMacro(GenerateWarnings,
bool);
145 vtkSetMacro(HandleLegacyArgumentFormats,
bool);
146 vtkGetMacro(HandleLegacyArgumentFormats,
bool);
147 vtkBooleanMacro(HandleLegacyArgumentFormats,
bool);
160 bool Parse(
int& argc,
char**& argv);
178 vtkGetMacro(HelpRequested,
bool);
183 std::string GetUsage()
const;
194 std::unique_ptr<vtkInternals> Internals;
195 bool HandleLegacyArgumentFormats =
true;
196 bool GenerateWarnings =
true;
197 std::vector<std::string> ExtraArguments;
198 std::string LastErrorMessage;
199 bool HelpRequested =
false;
200 mutable std::string Help;
201 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.