Ignore:
Timestamp:
Jun 13, 2010, 7:28:19 PM (12 years ago)
Author:
Peter Johansson
Message:

merge trunk to src-highlight

Location:
branches/src-highlight
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/src-highlight

  • branches/src-highlight/bin/Parameter.h

    r820 r1100  
    55
    66/*
    7   Copyright (C) 2006 Jari Häkkinen, Peter Johansson
    8   Copyright (C) 2007, 2008 Peter Johansson
     7  Copyright (C) 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
     8  Copyright (C) 2009, 2010 Peter Johansson
    99
    1010  This file is part of svndigest, http://dev.thep.lu.se/svndigest
     
    4747  class Parameter {
    4848  public:
    49     Parameter( int argc, char *argv[]);
     49    Parameter(void);
    5050    virtual ~Parameter(void);
     51    void parse( int argc, char *argv[]);
     52
    5153    std::string config_file(void) const;
    5254   
    53     bool copyright(void) const;
    54     bool force(void) const;
    5555    bool generate_config(void) const ;
    5656    bool ignore_cache(void) const;
    57     bool report(void) const;
    58     bool revisions(void) const;
    5957    /// @return absolute path to root directory
    6058    std::string root(void) const;
    61     /// @return absolute path to target directory
    62     std::string targetdir(void) const;
    6359    bool verbose(void) const;
    6460
    65   private:
    66     void analyse(void);
     61  protected:
     62    yat::utility::CommandLine cmd_;
     63    yat::utility::OptionHelp help_;
     64
    6765    // throw cmd_error if path doesn't exist
    6866    void check_existence(std::string path) const;
     
    7270    void check_readable(std::string path) const;
    7371
     72  private:
     73    void analyse(void);
     74    virtual void analyse2(void)=0;
    7475    void init(void);
     76    // called at end of init(void)
     77    virtual void init2(void) = 0;
     78    void set_default(void);
     79    virtual void set_default2(void)=0;
    7580
    76     yat::utility::CommandLine cmd_;
    7781    yat::utility::OptionArg<std::string> config_file_;
    78     yat::utility::OptionSwitch copyright_;
    79     yat::utility::OptionSwitch force_;
    8082    yat::utility::OptionSwitch generate_config_;
    81     yat::utility::OptionHelp help_;
    8283    yat::utility::OptionSwitch ignore_cache_;
    83     yat::utility::OptionSwitch report_;
    84     yat::utility::OptionSwitch revisions_;
    8584    yat::utility::OptionArg<std::string> root_;
    86     yat::utility::OptionArg<std::string> target_;
    8785    yat::utility::OptionSwitch verbose_;
     86  protected:
    8887    OptionVersion version_;
    8988
Note: See TracChangeset for help on using the changeset viewer.