165 |
24 Aug 06 |
jari |
1 |
#ifndef _theplu_svndigest_file_ |
165 |
24 Aug 06 |
jari |
2 |
#define _theplu_svndigest_file_ |
165 |
24 Aug 06 |
jari |
3 |
|
7 |
30 Dec 05 |
jari |
// $Id$ |
4 |
29 Dec 05 |
peter |
5 |
|
84 |
13 Mar 06 |
jari |
6 |
/* |
978 |
12 Dec 09 |
peter |
Copyright (C) 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson |
1478 |
29 May 12 |
peter |
Copyright (C) 2009, 2010, 2012 Peter Johansson |
84 |
13 Mar 06 |
jari |
9 |
|
687 |
04 Aug 08 |
peter |
This file is part of svndigest, http://dev.thep.lu.se/svndigest |
84 |
13 Mar 06 |
jari |
11 |
|
149 |
12 Aug 06 |
jari |
svndigest is free software; you can redistribute it and/or modify it |
84 |
13 Mar 06 |
jari |
under the terms of the GNU General Public License as published by |
693 |
11 Sep 08 |
jari |
the Free Software Foundation; either version 3 of the License, or |
84 |
13 Mar 06 |
jari |
(at your option) any later version. |
84 |
13 Mar 06 |
jari |
16 |
|
149 |
12 Aug 06 |
jari |
svndigest is distributed in the hope that it will be useful, but |
84 |
13 Mar 06 |
jari |
WITHOUT ANY WARRANTY; without even the implied warranty of |
149 |
12 Aug 06 |
jari |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
84 |
13 Mar 06 |
jari |
General Public License for more details. |
84 |
13 Mar 06 |
jari |
21 |
|
84 |
13 Mar 06 |
jari |
You should have received a copy of the GNU General Public License |
693 |
11 Sep 08 |
jari |
along with svndigest. If not, see <http://www.gnu.org/licenses/>. |
84 |
13 Mar 06 |
jari |
24 |
*/ |
84 |
13 Mar 06 |
jari |
25 |
|
4 |
29 Dec 05 |
peter |
26 |
#include "Node.h" |
4 |
29 Dec 05 |
peter |
27 |
|
1478 |
29 May 12 |
peter |
28 |
#include <subversion-1/svn_types.h> |
1478 |
29 May 12 |
peter |
29 |
|
4 |
29 Dec 05 |
peter |
30 |
#include <string> |
4 |
29 Dec 05 |
peter |
31 |
|
4 |
29 Dec 05 |
peter |
32 |
namespace theplu{ |
149 |
12 Aug 06 |
jari |
33 |
namespace svndigest{ |
4 |
29 Dec 05 |
peter |
34 |
|
1234 |
23 Oct 10 |
peter |
35 |
class NodeVisitor; |
1234 |
23 Oct 10 |
peter |
36 |
|
129 |
02 Aug 06 |
jari |
37 |
class File : public Node |
129 |
02 Aug 06 |
jari |
38 |
{ |
129 |
02 Aug 06 |
jari |
39 |
public: |
1478 |
29 May 12 |
peter |
40 |
/// |
1478 |
29 May 12 |
peter |
/// @brief Default Constructor |
1478 |
29 May 12 |
peter |
42 |
/// |
1478 |
29 May 12 |
peter |
43 |
File(const unsigned int level, const std::string& path, |
1478 |
29 May 12 |
peter |
44 |
const std::string& output=""); |
9 |
30 Dec 05 |
jari |
45 |
|
330 |
18 May 07 |
peter |
46 |
/** |
1293 |
14 Nov 10 |
peter |
\return absolute path to cache file |
1293 |
14 Nov 10 |
peter |
48 |
*/ |
1293 |
14 Nov 10 |
peter |
49 |
std::string cache_name(void) const; |
1293 |
14 Nov 10 |
peter |
50 |
|
1293 |
14 Nov 10 |
peter |
51 |
/** |
330 |
18 May 07 |
peter |
For example 'File.h.html' |
330 |
18 May 07 |
peter |
53 |
|
330 |
18 May 07 |
peter |
@return href to this file |
330 |
18 May 07 |
peter |
55 |
*/ |
175 |
02 Sep 06 |
peter |
56 |
std::string href(void) const; |
100 |
19 Jun 06 |
peter |
57 |
|
380 |
21 Jun 07 |
jari |
58 |
/** |
834 |
07 Nov 09 |
peter |
\brief Get the revision number of the latest commit. |
834 |
07 Nov 09 |
peter |
60 |
*/ |
834 |
07 Nov 09 |
peter |
61 |
svn_revnum_t last_changed_rev(void) const; |
834 |
07 Nov 09 |
peter |
62 |
|
834 |
07 Nov 09 |
peter |
63 |
/** |
380 |
21 Jun 07 |
jari |
@return The explicit string "file", nothing else. |
380 |
21 Jun 07 |
jari |
65 |
*/ |
343 |
19 May 07 |
peter |
66 |
std::string node_type(void) const; |
182 |
03 Sep 06 |
peter |
67 |
|
182 |
03 Sep 06 |
peter |
68 |
/// |
129 |
02 Aug 06 |
jari |
/// @brief Parsing out information from svn repository |
112 |
29 Jun 06 |
peter |
70 |
/// |
1478 |
29 May 12 |
peter |
/// if \a ignore true, ignore cache file (read from repo). |
1478 |
29 May 12 |
peter |
/// ignore revision in range [0, ignore_rev] |
1478 |
29 May 12 |
peter |
73 |
/// |
330 |
18 May 07 |
peter |
/// @return Stats object of the file |
112 |
29 Jun 06 |
peter |
75 |
/// |
1478 |
29 May 12 |
peter |
76 |
const StatsCollection& parse(bool verbose, bool ignore, |
1478 |
29 May 12 |
peter |
77 |
svn_revnum_t ignore_rev); |
112 |
29 Jun 06 |
peter |
78 |
|
1538 |
07 Oct 12 |
peter |
79 |
/// |
1538 |
07 Oct 12 |
peter |
/// \return revision File |
1538 |
07 Oct 12 |
peter |
81 |
/// |
1538 |
07 Oct 12 |
peter |
82 |
svn_revnum_t revision_min(void) const; |
1538 |
07 Oct 12 |
peter |
83 |
|
462 |
21 Aug 07 |
jari |
84 |
/** |
1234 |
23 Oct 10 |
peter |
Let the visitor perform its mission via visitor(*this) |
1234 |
23 Oct 10 |
peter |
86 |
*/ |
1234 |
23 Oct 10 |
peter |
87 |
void traverse(NodeVisitor& visitor); |
1234 |
23 Oct 10 |
peter |
88 |
|
129 |
02 Aug 06 |
jari |
89 |
private: |
452 |
17 Aug 07 |
peter |
90 |
/** |
757 |
27 Jan 09 |
peter |
do nothing |
452 |
17 Aug 07 |
peter |
92 |
*/ |
757 |
27 Jan 09 |
peter |
93 |
void log_core(SVNlog&) const; |
452 |
17 Aug 07 |
peter |
94 |
|
425 |
29 Jun 07 |
peter |
95 |
/// |
425 |
29 Jun 07 |
peter |
/// @brief Copy Constructor, not implemented |
425 |
29 Jun 07 |
peter |
97 |
/// |
425 |
29 Jun 07 |
peter |
98 |
File(const File&); |
176 |
02 Sep 06 |
peter |
99 |
|
129 |
02 Aug 06 |
jari |
100 |
}; |
4 |
29 Dec 05 |
peter |
101 |
|
149 |
12 Aug 06 |
jari |
102 |
}} // end of namespace svndigest and namespace theplu |
4 |
29 Dec 05 |
peter |
103 |
|
7 |
30 Dec 05 |
jari |
104 |
#endif |