Changeset 625 for trunk/bin/Parameter.h


Ignore:
Timestamp:
Apr 24, 2008, 12:44:52 AM (14 years ago)
Author:
Peter Johansson
Message:

made function Parameter::help() const

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/Parameter.h

    r540 r625  
    2626*/
    2727
     28#include "Option.h"
     29
    2830#include <map>
    2931#include <string>
     
    3739    Parameter( int argc, char *argv[]);
    3840    std::string config_file(void) const;
    39     inline bool copyright(void) const { return copyright_; }
     41    inline bool copyright(void) const { return copyright_.value(); }
    4042    /// @todo
    41     inline bool force(void) const { return force_; }
    42     inline bool generate_config(void) const { return generate_config_; }
    43     inline bool ignore_cache(void) const { return ignore_cache_; }
    44     inline bool report(void) const { return report_; }
    45     inline bool revisions(void) const { return revisions_; }
     43    inline bool force(void) const { return force_.value(); }
     44    inline bool generate_config(void) const { return generate_config_.value(); }
     45    inline bool ignore_cache(void) const { return ignore_cache_.value(); }
     46    inline bool report(void) const { return report_.value(); }
     47    inline bool revisions(void) const { return revisions_.value(); }
    4648    /// @return absolute path to root directory
    47     inline const std::string& root(void) const { return root_; }
     49    inline const std::string& root(void) const { return root_.value(); }
    4850    /// @return absolute path to target directory
    49     inline const std::string& targetdir(void) const { return targetdir_; }
    50     inline bool verbose(void) const { return verbose_; }
     51    inline const std::string& targetdir(void) const
     52    { return targetdir_.value(); }
     53    inline bool verbose(void) const { return verbose_.value(); }
    5154
    5255  private:
    5356    void analyse(void);
    54     void defaults(void);
    55     void help(void);
     57    void help(void) const;
    5658    void version(bool=false) const;
    5759
    58     std::string config_file_;
    59     bool copyright_;
    60     bool force_;
    61     bool generate_config_;
    62     bool ignore_cache_;
    63     bool report_;
    64     bool revisions_;
    65     std::string root_;
    66     std::string targetdir_;
    67     bool verbose_;
    68     bool version_;
     60    Option<std::string> config_file_;
     61    Option<bool> copyright_;
     62    Option<bool> force_;
     63    Option<bool> generate_config_;
     64    Option<bool> ignore_cache_;
     65    Option<bool> report_;
     66    Option<bool> revisions_;
     67    Option<std::string> root_;
     68    Option<std::string> targetdir_;
     69    Option<bool> verbose_;
    6970  };
    7071
Note: See TracChangeset for help on using the changeset viewer.