summaryrefslogtreecommitdiffstats
path: root/arg_parser.h
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 15:29:08 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 15:29:08 +0000
commitebfebbfb4b77fa42f84e07b6fe671c56cdd12a35 (patch)
treea55e5d8f3b0da9372f59932cbd3079309a55fecc /arg_parser.h
parentAdding upstream version 0.8. (diff)
downloadplzip-ebfebbfb4b77fa42f84e07b6fe671c56cdd12a35.tar.xz
plzip-ebfebbfb4b77fa42f84e07b6fe671c56cdd12a35.zip
Adding upstream version 0.9.upstream/0.9
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r--arg_parser.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/arg_parser.h b/arg_parser.h
index 5d036ab..4fbd1af 100644
--- a/arg_parser.h
+++ b/arg_parser.h
@@ -26,12 +26,12 @@
Public License.
*/
-/* Arg_parser reads the arguments in `argv' and creates a number of
+/* Arg_parser reads the arguments in 'argv' and creates a number of
option codes, option arguments and non-option arguments.
- In case of error, `error' returns a non-empty error message.
+ In case of error, 'error' returns a non-empty error message.
- `options' is an array of `struct Option' terminated by an element
+ 'options' is an array of 'struct Option' terminated by an element
containing a code which is zero. A null name means a short-only
option. A code value outside the unsigned char range means a
long-only option.
@@ -40,13 +40,13 @@
were specified before all the non-option arguments for the purposes
of parsing, even if the user of your program intermixed option and
non-option arguments. If you want the arguments in the exact order
- the user typed them, call `Arg_parser' with `in_order' = true.
+ the user typed them, call 'Arg_parser' with 'in_order' = true.
- The argument `--' terminates all options; any following arguments are
+ The argument '--' terminates all options; any following arguments are
treated as non-option arguments, even if they begin with a hyphen.
- The syntax for optional option arguments is `-<short_option><argument>'
- (without whitespace), or `--<long_option>=<argument>'.
+ The syntax for optional option arguments is '-<short_option><argument>'
+ (without whitespace), or '--<long_option>=<argument>'.
*/
class Arg_parser
@@ -85,20 +85,20 @@ public:
Arg_parser( const char * const opt, const char * const arg,
const Option options[] );
- const std::string & error() const throw() { return error_; }
+ const std::string & error() const { return error_; }
// The number of arguments parsed (may be different from argc)
- int arguments() const throw() { return data.size(); }
+ int arguments() const { return data.size(); }
// If code( i ) is 0, argument( i ) is a non-option.
// Else argument( i ) is the option's argument (or empty).
- int code( const int i ) const throw()
+ int code( const int i ) const
{
if( i >= 0 && i < arguments() ) return data[i].code;
else return 0;
}
- const std::string & argument( const int i ) const throw()
+ const std::string & argument( const int i ) const
{
if( i >= 0 && i < arguments() ) return data[i].argument;
else return error_;