lemon/arg_parser.h
changeset 88 18444049848b
parent 87 81e138275860
child 90 2981a73d49a3
     1.1 --- a/lemon/arg_parser.h	Thu Jan 24 17:25:31 2008 +0000
     1.2 +++ b/lemon/arg_parser.h	Sun Mar 16 01:39:19 2008 +0100
     1.3 @@ -30,17 +30,16 @@
     1.4  
     1.5  ///\ingroup misc
     1.6  ///\file
     1.7 -///\brief A tools to parse command line arguments.
     1.8 -///
     1.9 -///\author Alpar Juttner
    1.10 +///\brief A tool to parse command line arguments.
    1.11  
    1.12  namespace lemon {
    1.13  
    1.14    ///Command line arguments parser
    1.15  
    1.16    ///\ingroup misc
    1.17 -  ///Command line arguments parser
    1.18 +  ///Command line arguments parser.
    1.19    ///
    1.20 +  ///For a complete example see the \ref arg_parser_demo.cc demo file.
    1.21    class ArgParser {
    1.22      
    1.23      static void _showHelp(void *p);
    1.24 @@ -165,7 +164,7 @@
    1.25  		      const std::string &help,
    1.26  		      std::string value="", bool obl=false);
    1.27  
    1.28 -    ///\name Options with an external strorage.
    1.29 +    ///\name Options with external storage
    1.30      ///Using this functions, the value of the option will be directly written
    1.31      ///into a variable once the option appears in the command line.
    1.32  
    1.33 @@ -222,9 +221,9 @@
    1.34      ///Boundle some options into a group
    1.35  
    1.36      /// You can group some option by calling this function repeatedly for each
    1.37 -    /// option to be grupped with the same groupname.
    1.38 -    ///\param group The group name
    1.39 -    ///\param opt The option name
    1.40 +    /// option to be grouped with the same groupname.
    1.41 +    ///\param group The group name.
    1.42 +    ///\param opt The option name.
    1.43      ArgParser &optionGroup(const std::string &group,
    1.44  			   const std::string &opt);
    1.45  
    1.46 @@ -242,7 +241,7 @@
    1.47      
    1.48      ///Create synonym to an option
    1.49  
    1.50 -    ///With this function you can create a sysnonym called \c sys of the
    1.51 +    ///With this function you can create a synonym \c syn of the
    1.52      ///option \c opt.
    1.53      ArgParser &synonym(const std::string &syn,
    1.54  			   const std::string &opt);
    1.55 @@ -252,14 +251,14 @@
    1.56      ///Give help string for non-parsed arguments.
    1.57  
    1.58      ///With this function you can give help string for non-parsed arguments.
    1.59 -    ///the parameter \c name will be printed in the short usage line, while
    1.60 +    ///The parameter \c name will be printed in the short usage line, while
    1.61      ///\c help gives a more detailed description.
    1.62      ArgParser &other(const std::string &name,
    1.63  		     const std::string &help="");
    1.64      
    1.65 -    ///Non option type arguments.
    1.66 +    ///Give back the non-option type arguments.
    1.67  
    1.68 -    ///Gives back a reference to a vector consisting of the program arguments
    1.69 +    ///Give back a reference to a vector consisting of the program arguments
    1.70      ///not starting with a '-' character.
    1.71      std::vector<std::string> &files() { return _file_args; }
    1.72  
    1.73 @@ -298,9 +297,9 @@
    1.74      ///Magic type for operator[]
    1.75      
    1.76      ///This is the type of the return value of ArgParser::operator[]().
    1.77 -    ///It automatically converts to int, double, bool or std::string if
    1.78 -    ///the type of the option matches, otherwise it throws an exception.
    1.79 -    ///(i.e. it performs runtime type checking).
    1.80 +    ///It automatically converts to \c int, \c double, \c bool or
    1.81 +    ///\c std::string if the type of the option matches, otherwise it
    1.82 +    ///throws an exception (i.e. it performs runtime type checking).
    1.83      class RefType 
    1.84      {
    1.85        ArgParser &_parser;
    1.86 @@ -355,7 +354,7 @@
    1.87  
    1.88      ///Give back the value of an option
    1.89      
    1.90 -    ///Give back the value of an option
    1.91 +    ///Give back the value of an option.
    1.92      ///\sa RefType
    1.93      RefType operator[](const std::string &n)
    1.94      {