source: trunk/lib/CopyrightVisitor.h @ 1234

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

refs #476. Merged visitor branch into trunk. Used 'svn merge /branches/visitor' because --reintegrate did (currently) not work on our repo. Since I could not merge as suggested in subversion manual, I reverted all mergeinfo properties to avoid future confusion by svn-client. This means (I think) that there will be no connection about this commit and the visitor branch, but to svn-client this will look like a large changeset (just like a merge in the old days).

  • 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 1234 2010-10-23 16:41:33Z 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 <map>
29#include <string>
30
31namespace theplu{
32namespace svndigest{
33
34  class Directory;
35  class File;
36
37  /**
38     Visitor for updating copyright in files.
39  */
40  class CopyrightVisitor : public NodeVisitor
41  {
42  public:
43    CopyrightVisitor(std::map<std::string, Alias>&, bool verbose,
44                     const std::map<int, svn_revnum_t>& year2rev,
45                     bool ignore_cache);
46
47    /**
48       \return false if dir.ignore or dir.svncopyright_ignore
49     */
50    bool enter(Directory& dir);
51
52    /**
53     */
54    void leave(Directory& dir);
55
56    /**
57     */
58    void visit(File& dir);
59
60  private:
61    std::map<std::string, Alias>& alias_;
62    bool verbose_;
63    const std::map<int, svn_revnum_t>& year2rev_;
64    bool ignore_cache_;
65  };
66}} // end of namespace svndigest and namespace theplu
67
68#endif
Note: See TracBrowser for help on using the repository browser.