source: trunk/bin/Parameter.h @ 519

Last change on this file since 519 was 519, checked in by Jari Häkkinen, 16 years ago

trac moved to new location.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1#ifndef _theplu_svndigest_parameter_
2#define _theplu_svndigest_parameter_
3
4// $Id: Parameter.h 519 2007-12-23 20:14:50Z jari $
5
6/*
7  Copyright (C) 2006 Jari Häkkinen, Peter Johansson
8  Copyright (C) 2007 Peter Johansson
9
10  This file is part of svndigest, http://trac.thep.lu.se/svndigest
11
12  svndigest is free software; you can redistribute it and/or modify it
13  under the terms of the GNU General Public License as published by
14  the Free Software Foundation; either version 2 of the License, or
15  (at your option) any later version.
16
17  svndigest is distributed in the hope that it will be useful, but
18  WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  General Public License for more details.
21
22  You should have received a copy of the GNU General Public License
23  along with this program; if not, write to the Free Software
24  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25  02111-1307, USA.
26*/
27
28#include <map>
29#include <string>
30
31namespace theplu {
32namespace svndigest {
33
34  // class for command line options.
35  class Parameter {
36  public:
37    Parameter( int argc, char *argv[]);
38    std::string config_file(void) const;
39    inline bool copyright(void) const { return copyright_; }
40    /// @todo
41    inline bool force(void) const { return force_; }
42    inline bool generate_config(void) const { return generate_config_; }
43    inline bool report(void) const { return report_; }
44    inline bool revisions(void) const { return revisions_; }
45    /// @return absolute path to root directory
46    inline const std::string& root(void) const { return root_; }
47    /// @return absolute path to target directory
48    inline const std::string& targetdir(void) const { return targetdir_; }
49    inline bool verbose(void) const { return verbose_; }
50
51  private:
52    void analyse(void);
53    void defaults(void);
54    void help(void);
55    void version(void) const;
56
57    std::string config_file_;
58    bool copyright_;
59    bool force_;
60    bool generate_config_;
61    bool report_;
62    bool revisions_;
63    std::string root_;
64    std::string targetdir_;
65    bool verbose_;
66  };
67
68}} // of namespace svndigest and namespace theplu
69
70#endif
Note: See TracBrowser for help on using the repository browser.