1290 |
12 Nov 10 |
peter |
1 |
#ifndef _theplu_svndigest_node_printer_ |
1290 |
12 Nov 10 |
peter |
2 |
#define _theplu_svndigest_node_printer_ |
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 |
757 |
27 Jan 09 |
peter |
Copyright (C) 2009 Peter Johansson |
1264 |
02 Nov 10 |
peter |
Copyright (C) 2010 Jari Häkkinen, Peter Johansson |
1515 |
26 Sep 12 |
peter |
Copyright (C) 2012 Peter Johansson |
84 |
13 Mar 06 |
jari |
11 |
|
687 |
04 Aug 08 |
peter |
This file is part of svndigest, http://dev.thep.lu.se/svndigest |
84 |
13 Mar 06 |
jari |
13 |
|
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 |
18 |
|
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 |
23 |
|
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 |
26 |
*/ |
84 |
13 Mar 06 |
jari |
27 |
|
1234 |
23 Oct 10 |
peter |
28 |
#include "LineTypeParser.h" |
532 |
26 Dec 07 |
peter |
29 |
#include "StatsCollection.h" |
129 |
02 Aug 06 |
jari |
30 |
#include "SVNinfo.h" |
285 |
06 May 07 |
peter |
31 |
#include "SVNlog.h" |
1234 |
23 Oct 10 |
peter |
32 |
#include "TinyStats.h" |
14 |
30 Dec 05 |
peter |
33 |
|
226 |
11 Mar 07 |
peter |
34 |
#include <map> |
29 |
09 Jan 06 |
peter |
35 |
#include <ostream> |
91 |
23 Mar 06 |
jari |
36 |
#include <stdexcept> |
4 |
29 Dec 05 |
peter |
37 |
#include <string> |
4 |
29 Dec 05 |
peter |
38 |
|
4 |
29 Dec 05 |
peter |
39 |
namespace theplu{ |
149 |
12 Aug 06 |
jari |
40 |
namespace svndigest{ |
4 |
29 Dec 05 |
peter |
41 |
|
1290 |
12 Nov 10 |
peter |
42 |
class Node; |
303 |
11 May 07 |
peter |
43 |
|
4 |
29 Dec 05 |
peter |
44 |
/// |
1290 |
12 Nov 10 |
peter |
/// Base class for FilePrinter and DirectoryPrinter |
4 |
29 Dec 05 |
peter |
46 |
/// |
1290 |
12 Nov 10 |
peter |
47 |
class NodePrinter |
4 |
29 Dec 05 |
peter |
48 |
{ |
4 |
29 Dec 05 |
peter |
49 |
public: |
91 |
23 Mar 06 |
jari |
50 |
|
1513 |
23 Sep 12 |
peter |
51 |
/// |
1513 |
23 Sep 12 |
peter |
/// @brief Constructor |
1513 |
23 Sep 12 |
peter |
53 |
/// |
1290 |
12 Nov 10 |
peter |
54 |
NodePrinter(void); |
91 |
23 Mar 06 |
jari |
55 |
|
9 |
30 Dec 05 |
jari |
56 |
/// |
9 |
30 Dec 05 |
jari |
/// @brief Destructor |
9 |
30 Dec 05 |
jari |
58 |
/// |
1290 |
12 Nov 10 |
peter |
59 |
virtual ~NodePrinter(void); |
4 |
29 Dec 05 |
peter |
60 |
|
185 |
06 Sep 06 |
jari |
61 |
/** |
356 |
25 May 07 |
peter |
Note that returned string always end with '/' with the |
356 |
25 May 07 |
peter |
exception when an empty string is returned. |
356 |
25 May 07 |
peter |
64 |
|
482 |
13 Oct 07 |
peter |
@return output dir for example 'lib/' for this file |
343 |
19 May 07 |
peter |
66 |
*/ |
343 |
19 May 07 |
peter |
67 |
std::string output_dir(void) const; |
343 |
19 May 07 |
peter |
68 |
|
343 |
19 May 07 |
peter |
69 |
/** |
1290 |
12 Nov 10 |
peter |
@return output path for example 'lib/NodePrinter.h.html' for this file |
343 |
19 May 07 |
peter |
71 |
*/ |
343 |
19 May 07 |
peter |
72 |
virtual std::string output_path(void) const=0; |
343 |
19 May 07 |
peter |
73 |
|
201 |
09 Sep 06 |
peter |
74 |
/// |
58 |
15 Jan 06 |
jari |
/// Function printing HTML in current working directory |
10 |
30 Dec 05 |
jari |
76 |
/// |
1537 |
07 Oct 12 |
peter |
77 |
void print(const bool verbose=false, bool update=false) const; |
4 |
29 Dec 05 |
peter |
78 |
|
1513 |
23 Sep 12 |
peter |
79 |
void print_author_summary(std::ostream&, |
1513 |
23 Sep 12 |
peter |
80 |
const Stats& stats, |
1513 |
23 Sep 12 |
peter |
81 |
const std::string& line_type, |
1513 |
23 Sep 12 |
peter |
82 |
const SVNlog&) const; |
234 |
09 Apr 07 |
peter |
83 |
|
129 |
02 Aug 06 |
jari |
84 |
protected: |
23 |
02 Jan 06 |
peter |
85 |
/// |
199 |
09 Sep 06 |
peter |
/// print path in html format (with anchors) to @a os |
199 |
09 Sep 06 |
peter |
87 |
/// |
1513 |
23 Sep 12 |
peter |
88 |
void path_anchor(std::ostream& os) const; |
199 |
09 Sep 06 |
peter |
89 |
|
9 |
30 Dec 05 |
jari |
90 |
private: |
9 |
30 Dec 05 |
jari |
91 |
/// |
9 |
30 Dec 05 |
jari |
/// @brief Copy Constructor, not implemented |
9 |
30 Dec 05 |
jari |
93 |
/// |
1290 |
12 Nov 10 |
peter |
94 |
NodePrinter(const NodePrinter&); |
29 |
09 Jan 06 |
peter |
95 |
|
1290 |
12 Nov 10 |
peter |
96 |
virtual const Node& node(void) const=0; |
1234 |
23 Oct 10 |
peter |
97 |
|
1537 |
07 Oct 12 |
peter |
98 |
/** |
1537 |
07 Oct 12 |
peter |
\return revision in output from previous run |
1537 |
07 Oct 12 |
peter |
100 |
*/ |
1537 |
07 Oct 12 |
peter |
101 |
svn_revnum_t output_revision(void) const; |
1537 |
07 Oct 12 |
peter |
102 |
|
258 |
30 Apr 07 |
peter |
103 |
virtual void print_core(bool verbose=false) const=0; |
258 |
30 Apr 07 |
peter |
104 |
|
258 |
30 Apr 07 |
peter |
105 |
/// |
258 |
30 Apr 07 |
peter |
/// print page for specific user (or all) and specific line_style |
258 |
30 Apr 07 |
peter |
/// (or total). |
258 |
30 Apr 07 |
peter |
108 |
/// |
497 |
14 Oct 07 |
peter |
109 |
virtual void print_core(const std::string& stats_type, |
1513 |
23 Sep 12 |
peter |
110 |
const std::string& user, |
258 |
30 Apr 07 |
peter |
111 |
const std::string& line_type, |
1513 |
23 Sep 12 |
peter |
112 |
const SVNlog&) const=0; |
258 |
30 Apr 07 |
peter |
113 |
|
1537 |
07 Oct 12 |
peter |
114 |
virtual std::string out_name(const std::string& stats_type, |
1537 |
07 Oct 12 |
peter |
115 |
const std::string& user, |
1537 |
07 Oct 12 |
peter |
116 |
const std::string& line_type) const=0; |
1537 |
07 Oct 12 |
peter |
117 |
|
9 |
30 Dec 05 |
jari |
118 |
}; |
4 |
29 Dec 05 |
peter |
119 |
|
101 |
22 Jun 06 |
peter |
120 |
|
1290 |
12 Nov 10 |
peter |
121 |
|
1290 |
12 Nov 10 |
peter |
122 |
|
149 |
12 Aug 06 |
jari |
123 |
}} // end of namespace svndigest and namespace theplu |
4 |
29 Dec 05 |
peter |
124 |
|
7 |
30 Dec 05 |
jari |
125 |
#endif |