source: trunk/bin/Parameter.h @ 223

Last change on this file since 223 was 198, checked in by Peter Johansson, 15 years ago

refs #36 optionally a copyright information, based on Stats, can be displayed using --copyright flag. This will flag will be added to usage output when this feature is mature.

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