1293 |
14 Nov 10 |
peter |
1 |
#ifndef _theplu_svndigest_cache_copyer_ |
1293 |
14 Nov 10 |
peter |
2 |
#define _theplu_svndigest_cache_copyer_ |
1293 |
14 Nov 10 |
peter |
3 |
|
1293 |
14 Nov 10 |
peter |
// $Id$ |
1293 |
14 Nov 10 |
peter |
5 |
|
1293 |
14 Nov 10 |
peter |
6 |
/* |
1515 |
26 Sep 12 |
peter |
Copyright (C) 2010, 2012 Peter Johansson |
1293 |
14 Nov 10 |
peter |
8 |
|
1293 |
14 Nov 10 |
peter |
This file is part of svndigest, http://dev.thep.lu.se/svndigest |
1293 |
14 Nov 10 |
peter |
10 |
|
1293 |
14 Nov 10 |
peter |
svndigest is free software; you can redistribute it and/or modify it |
1293 |
14 Nov 10 |
peter |
under the terms of the GNU General Public License as published by |
1293 |
14 Nov 10 |
peter |
the Free Software Foundation; either version 3 of the License, or |
1293 |
14 Nov 10 |
peter |
(at your option) any later version. |
1293 |
14 Nov 10 |
peter |
15 |
|
1293 |
14 Nov 10 |
peter |
svndigest is distributed in the hope that it will be useful, but |
1293 |
14 Nov 10 |
peter |
WITHOUT ANY WARRANTY; without even the implied warranty of |
1293 |
14 Nov 10 |
peter |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1293 |
14 Nov 10 |
peter |
General Public License for more details. |
1293 |
14 Nov 10 |
peter |
20 |
|
1293 |
14 Nov 10 |
peter |
You should have received a copy of the GNU General Public License |
1293 |
14 Nov 10 |
peter |
along with svndigest. If not, see <http://www.gnu.org/licenses/>. |
1293 |
14 Nov 10 |
peter |
23 |
*/ |
1293 |
14 Nov 10 |
peter |
24 |
|
1293 |
14 Nov 10 |
peter |
25 |
#include "NodeVisitor.h" |
1293 |
14 Nov 10 |
peter |
26 |
|
1293 |
14 Nov 10 |
peter |
27 |
#include <string> |
1293 |
14 Nov 10 |
peter |
28 |
|
1293 |
14 Nov 10 |
peter |
29 |
namespace theplu{ |
1293 |
14 Nov 10 |
peter |
30 |
namespace svndigest{ |
1293 |
14 Nov 10 |
peter |
31 |
|
1293 |
14 Nov 10 |
peter |
32 |
class Directory; |
1293 |
14 Nov 10 |
peter |
33 |
class File; |
1293 |
14 Nov 10 |
peter |
34 |
|
1293 |
14 Nov 10 |
peter |
35 |
/** |
1293 |
14 Nov 10 |
peter |
Visitor for updating copyright in files. |
1293 |
14 Nov 10 |
peter |
37 |
*/ |
1293 |
14 Nov 10 |
peter |
38 |
class CacheCopyer : public NodeVisitor |
1293 |
14 Nov 10 |
peter |
39 |
{ |
1293 |
14 Nov 10 |
peter |
40 |
public: |
1293 |
14 Nov 10 |
peter |
41 |
CacheCopyer(const std::string& target, bool verbose); |
1293 |
14 Nov 10 |
peter |
42 |
|
1293 |
14 Nov 10 |
peter |
43 |
/** |
1293 |
14 Nov 10 |
peter |
\return false if dir.ignore or dir.svncopyright_ignore |
1293 |
14 Nov 10 |
peter |
45 |
*/ |
1293 |
14 Nov 10 |
peter |
46 |
bool enter(Directory& dir); |
1293 |
14 Nov 10 |
peter |
47 |
|
1293 |
14 Nov 10 |
peter |
48 |
/** |
1293 |
14 Nov 10 |
peter |
Doing nothing |
1293 |
14 Nov 10 |
peter |
50 |
*/ |
1293 |
14 Nov 10 |
peter |
51 |
void leave(Directory& dir); |
1293 |
14 Nov 10 |
peter |
52 |
|
1293 |
14 Nov 10 |
peter |
53 |
/** |
1508 |
31 Aug 12 |
peter |
Updating copyright in \a file |
1293 |
14 Nov 10 |
peter |
55 |
*/ |
1293 |
14 Nov 10 |
peter |
56 |
void visit(File& file); |
1293 |
14 Nov 10 |
peter |
57 |
|
1293 |
14 Nov 10 |
peter |
58 |
private: |
1508 |
31 Aug 12 |
peter |
59 |
void copy(const std::string& src, const std::string& trg_dir) const; |
1508 |
31 Aug 12 |
peter |
60 |
|
1293 |
14 Nov 10 |
peter |
61 |
std::string target_; |
1293 |
14 Nov 10 |
peter |
62 |
bool verbose_; |
1293 |
14 Nov 10 |
peter |
63 |
}; |
1293 |
14 Nov 10 |
peter |
64 |
}} // end of namespace svndigest and namespace theplu |
1293 |
14 Nov 10 |
peter |
65 |
|
1293 |
14 Nov 10 |
peter |
66 |
#endif |