source: trunk/bin/Parameter.h

Last change on this file was 1673, checked in by Peter Johansson, 4 weeks ago

closes #541. Require installed libyat

  • 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 1673 2023-08-26 15:36:10Z peter $
5
6/*
7  Copyright (C) 2006 Jari Häkkinen, Peter Johansson
8  Copyright (C) 2007 Peter Johansson
9  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
10  Copyright (C) 2009, 2010 Peter Johansson
11
12  This file is part of svndigest, http://dev.thep.lu.se/svndigest
13
14  svndigest is free software; you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation; either version 3 of the License, or
17  (at your option) any later version.
18
19  svndigest is distributed in the hope that it will be useful, but
20  WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  General Public License for more details.
23
24  You should have received a copy of the GNU General Public License
25  along with svndigest. If not, see <http://www.gnu.org/licenses/>.
26*/
27
28#include "AbstractParameter.h"
29
30#include "lib/OptionVersion.h"
31
32#include <yat/utility/CommandLine.h>
33#include <yat/utility/OptionArg.h>
34#include <yat/utility/OptionSwitch.h>
35
36#include <string>
37
38namespace theplu {
39namespace svndigest {
40
41  // base class for svndigestParameter and svncopyrightParameter
42  class Parameter : public AbstractParameter
43  {
44  public:
45    Parameter(void);
46    virtual ~Parameter(void);
47
48    std::string config_file(void) const;
49
50    bool generate_config(void) const ;
51    bool ignore_cache(void) const;
52
53  private:
54    void analyse1(void);
55    virtual void analyse2(void)=0;
56    void init1(void);
57    // called at end of init(void)
58    virtual void init2(void) = 0;
59    void set_default1(void);
60    virtual void set_default2(void)=0;
61
62    yat::utility::OptionArg<std::string> config_file_;
63    yat::utility::OptionSwitch generate_config_;
64    yat::utility::OptionSwitch ignore_cache_;
65  };
66
67}} // of namespace svndigest and namespace theplu
68
69#endif
Note: See TracBrowser for help on using the repository browser.