Changeset 1396


Ignore:
Timestamp:
Aug 5, 2008, 9:28:40 PM (13 years ago)
Author:
Peter
Message:

fixes #379 - improving docs of Option help output

Location:
branches/0.4-stable/yat
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/0.4-stable/yat/classifier/NBC.cc

    r1392 r1396  
    3333#include <cassert>
    3434#include <cmath>
     35#include <limits>
    3536#include <stdexcept>
    3637#include <vector>
  • branches/0.4-stable/yat/utility/CommandLine.h

    r1392 r1396  
    141141  /**
    142142     \brief CommandLine output operator
     143
     144     A typical output may look like this
     145     \verbatim
     146     Available options are:
     147     -h, --help      display this help and exit
     148     -v, --verbose   explain what is being done
     149     \endverbatim
     150     The output starts with a descriptive line such as "Available
     151     options are:" (default) that can be set in constructor. Then follows the
     152     options described in the order they were added to
     153     Commandline. Each Option is described according to
     154     Option::print(void) function.
     155     \see OptionHelp
    143156  */
    144157  std::ostream& operator<<(std::ostream&, const CommandLine&);
  • branches/0.4-stable/yat/utility/Option.h

    r1392 r1396  
    8181    /**
    8282       \brief print help output
     83
     84       This function calls the four virtual private functions print1,
     85       print2, print3, and print4. This allows an inherited class to
     86       implement one (or several) of these functions and keep the
     87       default output of the others. The default behavior is that:
     88
     89       - print1 prints the short name, '-h', as short_name(void) const
     90       - print2 prints the long name, '--help', as long_name(void) const
     91       - print3 is empty
     92       - print4 prints the description as description(void) const.
    8393     */
    8494    std::string print(void);
  • branches/0.4-stable/yat/utility/OptionHelp.h

    r1392 r1396  
    3939
    4040     When this option is found in parsing of commandline, it displays
    41      a help output exits.
     41     a help output and exits. A typical output looks like:
     42
     43     \verbatim
     44     Usage: foo [OPTION]...
     45
     46     SYNOPSIS
     47
     48     Available options are:
     49     -h, --help      display this help and exit
     50     -v, --verbose   explain what is being done
     51
     52     Some extra information explaining something.
     53     \endverbatim
     54
     55     The output consist of four blocks. The first block can be
     56     modified with usage(void) function. The second is block is
     57     typically a one-liner explaining the application and can be
     58     modified with the synopsis(void) function. The third block
     59     contain the description of the different options, see
     60     operator<<(std::ostream&, const CommandLine&) for further
     61     details. The last block can be modified with post_arguments(void)
     62     function.
    4263   */
    4364  class OptionHelp : public OptionSwitch
  • branches/0.4-stable/yat/utility/utility.h

    r1392 r1396  
    3434///
    3535
     36#include <limits>
    3637#include <string>
    3738#include <stdexcept>
Note: See TracChangeset for help on using the changeset viewer.