2003-04-18 00:22:51 +08:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
< HTML >
< HEAD >
< TITLE > class SG_EXPORT osg::ArgumentParser< / TITLE >
2004-08-06 14:53:36 +08:00
< META NAME = "GENERATOR" CONTENT = "DOC++ 3.4.6" >
2003-04-18 00:22:51 +08:00
< / HEAD >
< BODY BGCOLOR = "#ffffff" >
< H2 > class SG_EXPORT < A HREF = "#DOC.DOCU" > osg::ArgumentParser< / A > < / H2 > < / H2 > < HR >
< DL >
2004-08-06 14:53:36 +08:00
< P > < DL >
< DT > < H3 > Public Classes< / H3 > < DD > < DT >
class < B > < A HREF = "Parameter.html" > Parameter< / A > < / B >
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > enum < B > < A HREF = "#DOC.2.6.31" > ErrorSeverity< / A > < / B >
< / DL > < / P >
2003-04-18 00:22:51 +08:00
< P > < DL >
< DT > < H3 > Public Methods< / H3 > < DD > < DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > static bool < B > < A HREF = "#DOC.2.6.2" > isOption< / A > < / B > (const char* str)
< DD > < I > return return true if specified string is an option in the form of -option or --option < / I >
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > static bool < B > < A HREF = "#DOC.2.6.3" > isString< / A > < / B > (const char* str)
< DD > < I > return return true if string is any other string apart from an option< / I >
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > static bool < B > < A HREF = "#DOC.2.6.4" > isNumber< / A > < / B > (const char* str)
< DD > < I > return return true if specified parameter is an number< / I >
2003-04-18 00:22:51 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > < B > < A HREF = "#DOC.2.6.5" > ArgumentParser< / A > < / B > (int* <!1> < A HREF = "ArgumentParser.html#DOC.2.6.9" > argc< / A > , char** <!1> < A HREF = "ArgumentParser.html#DOC.2.6.10" > argv< / A > )
2003-04-18 00:22:51 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > void < B > < A HREF = "#DOC.2.6.6" > setApplicationUsage< / A > < / B > (<!1> < A HREF = "ApplicationUsage.html" > ApplicationUsage< / A > * usage)
2003-04-18 00:22:51 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > <!1> < A HREF = "ApplicationUsage.html" > ApplicationUsage< / A > * < B > < A HREF = "#DOC.2.6.7" > getApplicationUsage< / A > < / B > ()
2003-04-18 00:22:51 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > const <!1> < A HREF = "ApplicationUsage.html" > ApplicationUsage< / A > * < B > < A HREF = "#DOC.2.6.8" > getApplicationUsage< / A > < / B > () const
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > int& < B > < A HREF = "#DOC.2.6.9" > argc< / A > < / B > ()
2003-04-18 00:22:51 +08:00
< DD > < I > return the argument count< / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > char** < B > < A HREF = "#DOC.2.6.10" > argv< / A > < / B > ()
2003-04-18 00:22:51 +08:00
< DD > < I > return the argument array< / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > char* < B > < A HREF = "#DOC.2.6.11" > operator [] < / A > < / B > (int pos)
2003-04-18 00:22:51 +08:00
< DD > < I > return char* argument at specificed position< / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > const char* < B > < A HREF = "#DOC.2.6.12" > operator [] < / A > < / B > (int pos) const
2003-04-18 00:22:51 +08:00
< DD > < I > return const char* argument at specificed position< / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > std::string < B > < A HREF = "#DOC.2.6.13" > getApplicationName< / A > < / B > () const
2003-04-18 00:22:51 +08:00
< DD > < I > return the application name, as specified by argv[0] < / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > int < B > < A HREF = "#DOC.2.6.14" > find< / A > < / B > (const std::string& str) const
2003-04-18 00:22:51 +08:00
< DD > < I > return the position of an occurance of a string in the argument list.< / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > bool < B > < A HREF = "#DOC.2.6.15" > isOption< / A > < / B > (int pos) const
2003-04-18 00:22:51 +08:00
< DD > < I > return return true if specified parameter is an option in the form of -option or --option < / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > bool < B > < A HREF = "#DOC.2.6.16" > isString< / A > < / B > (int pos) const
2003-04-18 00:22:51 +08:00
< DD > < I > return return true if specified parameter is an string, which can be any other string apart from an option< / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > bool < B > < A HREF = "#DOC.2.6.17" > isNumber< / A > < / B > (int pos) const
2003-04-18 00:22:51 +08:00
< DD > < I > return return true if specified parameter is an number< / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > bool < B > < A HREF = "#DOC.2.6.18" > containsOptions< / A > < / B > () const
2003-04-18 00:22:51 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > void < B > < A HREF = "#DOC.2.6.19" > remove< / A > < / B > (int pos, int num=1)
2003-04-18 00:22:51 +08:00
< DD > < I > remove one or more arguments from the argv argument list, and decrement the argc respectively< / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > bool < B > < A HREF = "#DOC.2.6.20" > match< / A > < / B > (int pos, const std::string& str) const
< DD > < I > return true if specified argument matches string< / I >
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > bool < B > < A HREF = "#DOC.2.6.21" > read< / A > < / B > (const std::string& str)
2003-04-18 00:22:51 +08:00
< DD > < I > search for an occurance of a string in the argument list, on sucess remove that occurance from the list and return true, otherwise return false< / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > bool < B > < A HREF = "#DOC.2.6.22" > read< / A > < / B > (const std::string& str, <!1> < A HREF = "Parameter.html" > Parameter< / A > value1)
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > bool < B > < A HREF = "#DOC.2.6.23" > read< / A > < / B > (const std::string& str, <!1> < A HREF = "Parameter.html" > Parameter< / A > value1, <!1> < A HREF = "Parameter.html" > Parameter< / A > value2)
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > bool < B > < A HREF = "#DOC.2.6.24" > read< / A > < / B > (const std::string& str, <!1> < A HREF = "Parameter.html" > Parameter< / A > value1, <!1> < A HREF = "Parameter.html" > Parameter< / A > value2, <!1> < A HREF = "Parameter.html" > Parameter< / A > value3)
2003-04-18 00:22:51 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > bool < B > < A HREF = "#DOC.2.6.25" > read< / A > < / B > (const std::string& str, <!1> < A HREF = "Parameter.html" > Parameter< / A > value1, <!1> < A HREF = "Parameter.html" > Parameter< / A > value2, <!1> < A HREF = "Parameter.html" > Parameter< / A > value3, <!1> < A HREF = "Parameter.html" > Parameter< / A > value4)
2003-04-18 00:22:51 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > bool < B > < A HREF = "#DOC.2.6.26" > read< / A > < / B > (int pos, const std::string& str)
< DD > < I > if the argument value at the position pos matches specified string, and subsequent paramters are also matched then set the paramter values and remove the from the list of arguments< / I >
2003-04-18 00:22:51 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > bool < B > < A HREF = "#DOC.2.6.27" > read< / A > < / B > (int pos, const std::string& str, <!1> < A HREF = "Parameter.html" > Parameter< / A > value1)
2003-04-18 00:22:51 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > bool < B > < A HREF = "#DOC.2.6.28" > read< / A > < / B > (int pos, const std::string& str, <!1> < A HREF = "Parameter.html" > Parameter< / A > value1, <!1> < A HREF = "Parameter.html" > Parameter< / A > value2)
2003-04-18 00:22:51 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > bool < B > < A HREF = "#DOC.2.6.29" > read< / A > < / B > (int pos, const std::string& str, <!1> < A HREF = "Parameter.html" > Parameter< / A > value1, <!1> < A HREF = "Parameter.html" > Parameter< / A > value2, <!1> < A HREF = "Parameter.html" > Parameter< / A > value3)
2003-04-18 00:22:51 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > bool < B > < A HREF = "#DOC.2.6.30" > read< / A > < / B > (int pos, const std::string& str, <!1> < A HREF = "Parameter.html" > Parameter< / A > value1, <!1> < A HREF = "Parameter.html" > Parameter< / A > value2, <!1> < A HREF = "Parameter.html" > Parameter< / A > value3, <!1> < A HREF = "Parameter.html" > Parameter< / A > value4)
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > bool < B > < A HREF = "#DOC.2.6.33" > errors< / A > < / B > (<!1> < A HREF = "ArgumentParser.html#DOC.2.6.31" > ErrorSeverity< / A > severity=<!1> < A HREF = "ArgumentParser.html#DOC.2.6.31.1" > BENIGN< / A > ) const
2003-04-18 00:22:51 +08:00
< DD > < I > return the error flag, true if an error has occured when reading arguments< / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > void < B > < A HREF = "#DOC.2.6.34" > reportError< / A > < / B > (const std::string& message, <!1> < A HREF = "ArgumentParser.html#DOC.2.6.31" > ErrorSeverity< / A > severity=<!1> < A HREF = "ArgumentParser.html#DOC.2.6.31.2" > CRITICAL< / A > )
2003-04-18 00:22:51 +08:00
< DD > < I > report an error message by adding to the ErrorMessageMap< / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > void < B > < A HREF = "#DOC.2.6.35" > reportRemainingOptionsAsUnrecognized< / A > < / B > (<!1> < A HREF = "ArgumentParser.html#DOC.2.6.31" > ErrorSeverity< / A > severity=<!1> < A HREF = "ArgumentParser.html#DOC.2.6.31.1" > BENIGN< / A > )
2003-04-18 00:22:51 +08:00
< DD > < I > for each remaining option report it as an unrecongnized< / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > <!1> < A HREF = "ArgumentParser.html#DOC.2.6.32" > ErrorMessageMap< / A > & < B > < A HREF = "#DOC.2.6.36" > getErrorMessageMap< / A > < / B > ()
2003-04-18 00:22:51 +08:00
< DD > < I > return the error message, if any has occured< / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > const <!1> < A HREF = "ArgumentParser.html#DOC.2.6.32" > ErrorMessageMap< / A > & < B > < A HREF = "#DOC.2.6.37" > getErrorMessageMap< / A > < / B > () const
2003-04-18 00:22:51 +08:00
< DD > < I > return the error message, if any has occured< / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > void < B > < A HREF = "#DOC.2.6.38" > writeErrorMessages< / A > < / B > (std::ostream& output, <!1> < A HREF = "ArgumentParser.html#DOC.2.6.31" > ErrorSeverity< / A > sevrity=<!1> < A HREF = "ArgumentParser.html#DOC.2.6.31.1" > BENIGN< / A > )
2003-04-18 00:22:51 +08:00
< DD > < I > write out error messages at an above specified < / I >
< / DL > < / P >
< P > < DL >
2004-08-06 14:53:36 +08:00
< DT > < H3 > Public< / H3 > < DD > < DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > typedef std::map< std::string,<!1> < A HREF = "ArgumentParser.html#DOC.2.6.31" > ErrorSeverity< / A > > < B > < A HREF = "#DOC.2.6.32" > ErrorMessageMap< / A > < / B >
2003-04-18 00:22:51 +08:00
< / DL > < / P >
< P > < DL >
< DT > < H3 > Protected Fields< / H3 > < DD > < DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > int* < B > < A HREF = "#DOC.2.6.39" > _argc< / A > < / B >
2003-04-18 00:22:51 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > char** < B > < A HREF = "#DOC.2.6.40" > _argv< / A > < / B >
2003-04-18 00:22:51 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > <!1> < A HREF = "ArgumentParser.html#DOC.2.6.32" > ErrorMessageMap< / A > < B > < A HREF = "#DOC.2.6.41" > _errorMessageMap< / A > < / B >
2003-04-18 00:22:51 +08:00
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > <!1> < A HREF = "ApplicationUsage.html" > ApplicationUsage< / A > * < B > < A HREF = "#DOC.2.6.42" > _usage< / A > < / B >
2003-04-18 00:22:51 +08:00
< / DL > < / P >
< / DL >
< A NAME = "DOC.DOCU" > < / A >
< HR >
< H2 > Documentation< / H2 >
< DL >
2004-08-06 14:53:36 +08:00
< A NAME = "isOption" > < / A >
< A NAME = "DOC.2.6.2" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > static bool isOption(const char* str)< / B > < / TT >
< DD > return return true if specified string is an option in the form of -option or --option
< DL > < DT > < DD > < / DL > < P >
< A NAME = "isString" > < / A >
< A NAME = "DOC.2.6.3" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > static bool isString(const char* str)< / B > < / TT >
< DD > return return true if string is any other string apart from an option
< DL > < DT > < DD > < / DL > < P >
< A NAME = "isNumber" > < / A >
< A NAME = "DOC.2.6.4" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > static bool isNumber(const char* str)< / B > < / TT >
< DD > return return true if specified parameter is an number
< DL > < DT > < DD > < / DL > < P >
2003-04-18 00:22:51 +08:00
< A NAME = "ArgumentParser" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.5" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > ArgumentParser(int* <!1> < A HREF = "ArgumentParser.html#DOC.2.6.9" > argc< / A > , char** <!1> < A HREF = "ArgumentParser.html#DOC.2.6.10" > argv< / A > )< / B > < / TT >
2003-04-18 00:22:51 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "setApplicationUsage" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.6" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > void setApplicationUsage(<!1> < A HREF = "ApplicationUsage.html" > ApplicationUsage< / A > * usage)< / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "getApplicationUsage" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.7" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > <!1> < A HREF = "ApplicationUsage.html" > ApplicationUsage< / A > * getApplicationUsage()< / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "getApplicationUsage" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.8" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > const <!1> < A HREF = "ApplicationUsage.html" > ApplicationUsage< / A > * getApplicationUsage() const < / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "argc" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.9" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > int& argc()< / B > < / TT >
< DD > return the argument count
< DL > < DT > < DD > < / DL > < P >
< A NAME = "argv" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.10" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > char** argv()< / B > < / TT >
< DD > return the argument array
< DL > < DT > < DD > < / DL > < P >
< A NAME = "operator [] " > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.11" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > char* operator [] (int pos)< / B > < / TT >
< DD > return char* argument at specificed position
< DL > < DT > < DD > < / DL > < P >
< A NAME = "operator [] " > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.12" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > const char* operator [] (int pos) const < / B > < / TT >
< DD > return const char* argument at specificed position
< DL > < DT > < DD > < / DL > < P >
< A NAME = "getApplicationName" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.13" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > std::string getApplicationName() const < / B > < / TT >
< DD > return the application name, as specified by argv[0]
< DL > < DT > < DD > < / DL > < P >
< A NAME = "find" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.14" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > int find(const std::string& str) const < / B > < / TT >
< DD > return the position of an occurance of a string in the argument list.
return -1 when no string is found.
< DL > < DT > < DD > < / DL > < P >
< A NAME = "isOption" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.15" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > bool isOption(int pos) const < / B > < / TT >
< DD > return return true if specified parameter is an option in the form of -option or --option
< DL > < DT > < DD > < / DL > < P >
< A NAME = "isString" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.16" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > bool isString(int pos) const < / B > < / TT >
< DD > return return true if specified parameter is an string, which can be any other string apart from an option
< DL > < DT > < DD > < / DL > < P >
< A NAME = "isNumber" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.17" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > bool isNumber(int pos) const < / B > < / TT >
< DD > return return true if specified parameter is an number
< DL > < DT > < DD > < / DL > < P >
< A NAME = "containsOptions" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.18" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > bool containsOptions() const < / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "remove" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.19" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > void remove(int pos, int num=1)< / B > < / TT >
< DD > remove one or more arguments from the argv argument list, and decrement the argc respectively
< DL > < DT > < DD > < / DL > < P >
2004-08-06 14:53:36 +08:00
< A NAME = "match" > < / A >
< A NAME = "DOC.2.6.20" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > bool match(int pos, const std::string& str) const < / B > < / TT >
< DD > return true if specified argument matches string
< DL > < DT > < DD > < / DL > < P >
2003-04-18 00:22:51 +08:00
< A NAME = "read" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.21" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > bool read(const std::string& str)< / B > < / TT >
< DD > search for an occurance of a string in the argument list, on sucess
remove that occurance from the list and return true, otherwise return false
< DL > < DT > < DD > < / DL > < P >
< A NAME = "read" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.22" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > bool read(const std::string& str, <!1> < A HREF = "Parameter.html" > Parameter< / A > value1)< / B > < / TT >
2003-04-18 00:22:51 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "read" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.23" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > bool read(const std::string& str, <!1> < A HREF = "Parameter.html" > Parameter< / A > value1, <!1> < A HREF = "Parameter.html" > Parameter< / A > value2)< / B > < / TT >
2003-04-18 00:22:51 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "read" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.24" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > bool read(const std::string& str, <!1> < A HREF = "Parameter.html" > Parameter< / A > value1, <!1> < A HREF = "Parameter.html" > Parameter< / A > value2, <!1> < A HREF = "Parameter.html" > Parameter< / A > value3)< / B > < / TT >
2003-04-18 00:22:51 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "read" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.25" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > bool read(const std::string& str, <!1> < A HREF = "Parameter.html" > Parameter< / A > value1, <!1> < A HREF = "Parameter.html" > Parameter< / A > value2, <!1> < A HREF = "Parameter.html" > Parameter< / A > value3, <!1> < A HREF = "Parameter.html" > Parameter< / A > value4)< / B > < / TT >
2003-04-18 00:22:51 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "read" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.26" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > bool read(int pos, const std::string& str)< / B > < / TT >
< DD > if the argument value at the position pos matches specified string, and subsequent
paramters are also matched then set the paramter values and remove the from the list of arguments
2003-04-18 00:22:51 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "read" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.27" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > bool read(int pos, const std::string& str, <!1> < A HREF = "Parameter.html" > Parameter< / A > value1)< / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "read" > < / A >
< A NAME = "DOC.2.6.28" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > bool read(int pos, const std::string& str, <!1> < A HREF = "Parameter.html" > Parameter< / A > value1, <!1> < A HREF = "Parameter.html" > Parameter< / A > value2)< / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "read" > < / A >
< A NAME = "DOC.2.6.29" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > bool read(int pos, const std::string& str, <!1> < A HREF = "Parameter.html" > Parameter< / A > value1, <!1> < A HREF = "Parameter.html" > Parameter< / A > value2, <!1> < A HREF = "Parameter.html" > Parameter< / A > value3)< / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "read" > < / A >
< A NAME = "DOC.2.6.30" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > bool read(int pos, const std::string& str, <!1> < A HREF = "Parameter.html" > Parameter< / A > value1, <!1> < A HREF = "Parameter.html" > Parameter< / A > value2, <!1> < A HREF = "Parameter.html" > Parameter< / A > value3, <!1> < A HREF = "Parameter.html" > Parameter< / A > value4)< / B > < / TT >
2003-04-18 00:22:51 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "ErrorSeverity" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.31" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > enum ErrorSeverity< / B > < / TT >
< DL > < DT > < DD > < / DL > < P > < DL >
< A NAME = "BENIGN" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.31.1" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > BENIGN< / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "CRITICAL" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.31.2" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > CRITICAL< / B > < / TT >
< DL > < DT > < DD > < / DL > < P > < / DL >
< A NAME = "ErrorMessageMap" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.32" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > typedef std::map< std::string,<!1> < A HREF = "ArgumentParser.html#DOC.2.6.31" > ErrorSeverity< / A > > ErrorMessageMap< / B > < / TT >
2003-04-18 00:22:51 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "errors" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.33" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > bool errors(<!1> < A HREF = "ArgumentParser.html#DOC.2.6.31" > ErrorSeverity< / A > severity=<!1> < A HREF = "ArgumentParser.html#DOC.2.6.31.1" > BENIGN< / A > ) const < / B > < / TT >
2003-04-18 00:22:51 +08:00
< DD > return the error flag, true if an error has occured when reading arguments
< DL > < DT > < DD > < / DL > < P >
< A NAME = "reportError" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.34" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > void reportError(const std::string& message, <!1> < A HREF = "ArgumentParser.html#DOC.2.6.31" > ErrorSeverity< / A > severity=<!1> < A HREF = "ArgumentParser.html#DOC.2.6.31.2" > CRITICAL< / A > )< / B > < / TT >
2003-04-18 00:22:51 +08:00
< DD > report an error message by adding to the ErrorMessageMap
< DL > < DT > < DD > < / DL > < P >
< A NAME = "reportRemainingOptionsAsUnrecognized" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.35" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > void reportRemainingOptionsAsUnrecognized(<!1> < A HREF = "ArgumentParser.html#DOC.2.6.31" > ErrorSeverity< / A > severity=<!1> < A HREF = "ArgumentParser.html#DOC.2.6.31.1" > BENIGN< / A > )< / B > < / TT >
2003-04-18 00:22:51 +08:00
< DD > for each remaining option report it as an unrecongnized
< DL > < DT > < DD > < / DL > < P >
< A NAME = "getErrorMessageMap" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.36" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > <!1> < A HREF = "ArgumentParser.html#DOC.2.6.32" > ErrorMessageMap< / A > & getErrorMessageMap()< / B > < / TT >
2003-04-18 00:22:51 +08:00
< DD > return the error message, if any has occured
< DL > < DT > < DD > < / DL > < P >
< A NAME = "getErrorMessageMap" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.37" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > const <!1> < A HREF = "ArgumentParser.html#DOC.2.6.32" > ErrorMessageMap< / A > & getErrorMessageMap() const < / B > < / TT >
2003-04-18 00:22:51 +08:00
< DD > return the error message, if any has occured
< DL > < DT > < DD > < / DL > < P >
< A NAME = "writeErrorMessages" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.38" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > void writeErrorMessages(std::ostream& output, <!1> < A HREF = "ArgumentParser.html#DOC.2.6.31" > ErrorSeverity< / A > sevrity=<!1> < A HREF = "ArgumentParser.html#DOC.2.6.31.1" > BENIGN< / A > )< / B > < / TT >
2003-04-18 00:22:51 +08:00
< DD > write out error messages at an above specified
< DL > < DT > < DD > < / DL > < P >
< A NAME = "_argc" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.39" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > int* _argc< / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "_argv" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.40" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > char** _argv< / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "_errorMessageMap" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.41" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > <!1> < A HREF = "ArgumentParser.html#DOC.2.6.32" > ErrorMessageMap< / A > _errorMessageMap< / B > < / TT >
2003-04-18 00:22:51 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "_usage" > < / A >
2004-08-06 14:53:36 +08:00
< A NAME = "DOC.2.6.42" > < / A >
2003-04-18 00:22:51 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > <!1> < A HREF = "ApplicationUsage.html" > ApplicationUsage< / A > * _usage< / B > < / TT >
< DL > < DT > < DD > < / DL > < P > < / DL >
< HR > < DL > < DT > < B > This class has no child classes.< / B > < / DL >
< DL > < DT > < DD > < / DL > < P > < P > < I > < A HREF = "index.html" > Alphabetic index< / A > < / I > < I > < A HREF = "HIER.html" > HTML hierarchy of classes< / A > or < A HREF = "HIERjava.html" > Java< / A > < / I > < / P > < HR >
< BR >
2004-08-06 14:53:36 +08:00
This page was generated with the help of < A HREF = "http://www.linuxsupportline.com/~doc++" > DOC++< / A > .
2003-04-18 00:22:51 +08:00
< / BODY >
< / HTML >