29 #include <osg/ArgumentParser> 30 #include <osg/ref_ptr> 53 BENIGN = osg::ArgumentParser::ErrorSeverity::BENIGN,
54 CRITICAL = osg::ArgumentParser::ErrorSeverity::CRITICAL
153 bool Valid(
const char* str)
const;
164 bool Assign(
const char* str);
173 operator osg::ArgumentParser::Parameter()
const;
182 operator osg::ArgumentParser::Parameter& ();
191 operator const osg::ArgumentParser::Parameter& ()
const;
200 operator osg::ArgumentParser::Parameter* ();
232 osg::ArgumentParser& GetOSGArgumentParser();
241 const osg::ArgumentParser& GetOSGArgumentParser()
const;
253 bool IsOption(
const char* str)
const;
265 bool IsString(
const char* str)
const;
276 bool IsNumber(
const char* str)
const;
287 bool IsBool(
const char* str)
const;
341 std::string GetApplicationName()
const;
353 int Find(
const std::string& str)
const;
365 bool IsOption(
int pos)
const;
376 bool IsString(
int pos)
const;
387 bool IsNumber(
int pos)
const;
396 bool ContainsOptions()
const;
407 void Remove(
int pos,
int num = 1);
419 bool Match(
int pos,
const std::string& str)
const;
431 bool Read(
const std::string& str);
444 bool Read(
const std::string& str,
Parameter value1);
577 bool Read(
int pos,
const std::string& str);
592 bool Read(
int pos,
const std::string& str,
Parameter value1);
736 bool Errors(
ErrorSeverity severity = ErrorSeverity::BENIGN)
const;
746 void ReportError(
const std::string& message,
ErrorSeverity severity = ErrorSeverity::CRITICAL);
755 void ReportRemainingOptionsAsUnrecognized(
ErrorSeverity severity = ErrorSeverity::BENIGN);
765 void WriteErrorMessages(std::ostream& output,
ErrorSeverity severity = ErrorSeverity::BENIGN);
786 void SetApplicationName(
const std::string& name);
796 void SetDescription(
const std::string& desc);
805 const std::string& GetDescription()
const;
816 void AddUsageExplanation(
ApplicationUsage::Type type,
const std::string& option,
const std::string& explanation);
825 void SetCommandLineUsage(
const std::string& explanation);
834 const std::string& GetCommandLineUsage()
const;
845 void AddCommandLineOption(
const std::string& option,
const std::string& explanation,
const std::string &defaultValue =
"");
892 void AddEnvironmentalVariable(
const std::string& option,
const std::string& explanation,
const std::string& defaultValue =
"");
939 void AddKeyboardMouseBinding(
const std::string& prefix,
int key,
const std::string& explanation);
949 void AddKeyboardMouseBinding(
int key,
const std::string& explanation);
959 void AddKeyboardMouseBinding(
const std::string& option,
const std::string& explanation);
1024 void WriteEnvironmentSettings(std::ostream& output);
bool TR_UTIL_EXPORT Match(const char *wildCards, const char *str)
Matches.
osg::ArgumentParser::Parameter * mParam
A a command line argument parser class that helps to create, manage, and pass commands to other syste...
std::map< std::string, ErrorSeverity > ErrorMessageMap
std::unique_ptr< ApplicationUsage > mAppUsage
An application usage class for the argument parser.
N Remove(N number, B bits)
Remove the "bits" from "number".
A class that represents date time utility.
std::map< std::string, std::string > UsageMap
The message to command usage map.
Namespace that holds various utility classes for the engine.
std::unique_ptr< osg::ArgumentParser > mArgParser
The argument parser.