source: trunk/lib/CopyrightVisitor.h @ 1237

Last change on this file since 1237 was 1237, checked in by Peter Johansson, 11 years ago

remove unneeded include in Alias.h and missing includes (found after this removal).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1#ifndef _theplu_svndigest_copyright_visitor_
2#define _theplu_svndigest_copyright_visitor_
3
4// $Id: CopyrightVisitor.h 1237 2010-10-23 21:41:40Z peter $
5
6/*
7  Copyright (C) 2010 Peter Johansson
8
9  This file is part of svndigest, http://dev.thep.lu.se/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 3 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 svndigest. If not, see <http://www.gnu.org/licenses/>.
23*/
24
25#include "Alias.h"
26#include "NodeVisitor.h"
27
28#include <subversion-1/svn_types.h>
29
30#include <map>
31#include <string>
32
33namespace theplu{
34namespace svndigest{
35
36  class Directory;
37  class File;
38
39  /**
40     Visitor for updating copyright in files.
41  */
42  class CopyrightVisitor : public NodeVisitor
43  {
44  public:
45    CopyrightVisitor(std::map<std::string, Alias>&, bool verbose,
46                     const std::map<int, svn_revnum_t>& year2rev,
47                     bool ignore_cache);
48
49    /**
50       \return false if dir.ignore or dir.svncopyright_ignore
51     */
52    bool enter(Directory& dir);
53
54    /**
55     */
56    void leave(Directory& dir);
57
58    /**
59     */
60    void visit(File& dir);
61
62  private:
63    std::map<std::string, Alias>& alias_;
64    bool verbose_;
65    const std::map<int, svn_revnum_t>& year2rev_;
66    bool ignore_cache_;
67  };
68}} // end of namespace svndigest and namespace theplu
69
70#endif
Note: See TracBrowser for help on using the repository browser.