1290 |
12 Nov 10 |
peter |
1 |
#ifndef _theplu_svndigest_stats_plotter_ |
1290 |
12 Nov 10 |
peter |
2 |
#define _theplu_svndigest_stats_plotter_ |
1290 |
12 Nov 10 |
peter |
3 |
|
1290 |
12 Nov 10 |
peter |
// $Id$ |
1290 |
12 Nov 10 |
peter |
5 |
|
1290 |
12 Nov 10 |
peter |
6 |
/* |
1635 |
30 Mar 23 |
peter |
Copyright (C) 2010, 2023 Peter Johansson |
1290 |
12 Nov 10 |
peter |
8 |
|
1290 |
12 Nov 10 |
peter |
This file is part of svndigest, http://dev.thep.lu.se/svndigest |
1290 |
12 Nov 10 |
peter |
10 |
|
1290 |
12 Nov 10 |
peter |
svndigest is free software; you can redistribute it and/or modify it |
1290 |
12 Nov 10 |
peter |
under the terms of the GNU General Public License as published by |
1290 |
12 Nov 10 |
peter |
the Free Software Foundation; either version 3 of the License, or |
1290 |
12 Nov 10 |
peter |
(at your option) any later version. |
1290 |
12 Nov 10 |
peter |
15 |
|
1290 |
12 Nov 10 |
peter |
svndigest is distributed in the hope that it will be useful, but |
1290 |
12 Nov 10 |
peter |
WITHOUT ANY WARRANTY; without even the implied warranty of |
1290 |
12 Nov 10 |
peter |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1290 |
12 Nov 10 |
peter |
General Public License for more details. |
1290 |
12 Nov 10 |
peter |
20 |
|
1290 |
12 Nov 10 |
peter |
You should have received a copy of the GNU General Public License |
1290 |
12 Nov 10 |
peter |
along with svndigest. If not, see <http://www.gnu.org/licenses/>. |
1290 |
12 Nov 10 |
peter |
23 |
*/ |
1290 |
12 Nov 10 |
peter |
24 |
|
1290 |
12 Nov 10 |
peter |
25 |
#include "Vector.h" |
1290 |
12 Nov 10 |
peter |
26 |
|
1290 |
12 Nov 10 |
peter |
27 |
#include <string> |
1290 |
12 Nov 10 |
peter |
28 |
#include <map> |
1290 |
12 Nov 10 |
peter |
29 |
|
1290 |
12 Nov 10 |
peter |
30 |
namespace theplu { |
1290 |
12 Nov 10 |
peter |
31 |
namespace svndigest { |
1290 |
12 Nov 10 |
peter |
32 |
|
1290 |
12 Nov 10 |
peter |
33 |
class Stats; |
1290 |
12 Nov 10 |
peter |
34 |
|
1290 |
12 Nov 10 |
peter |
35 |
/** |
1290 |
12 Nov 10 |
peter |
Class plotting a Stats object |
1290 |
12 Nov 10 |
peter |
37 |
*/ |
1290 |
12 Nov 10 |
peter |
38 |
class StatsPlotter |
1290 |
12 Nov 10 |
peter |
39 |
{ |
1290 |
12 Nov 10 |
peter |
40 |
public: |
1513 |
23 Sep 12 |
peter |
41 |
/** |
1513 |
23 Sep 12 |
peter |
\brief Default Constructor |
1290 |
12 Nov 10 |
peter |
43 |
*/ |
1290 |
12 Nov 10 |
peter |
44 |
explicit StatsPlotter(const Stats& stats); |
1290 |
12 Nov 10 |
peter |
45 |
|
1290 |
12 Nov 10 |
peter |
46 |
/** |
1290 |
12 Nov 10 |
peter |
\brief Destructor |
1290 |
12 Nov 10 |
peter |
48 |
*/ |
1290 |
12 Nov 10 |
peter |
49 |
virtual ~StatsPlotter(void); |
1290 |
12 Nov 10 |
peter |
50 |
|
1290 |
12 Nov 10 |
peter |
51 |
/** |
1290 |
12 Nov 10 |
peter |
Create statistics graph. |
1290 |
12 Nov 10 |
peter |
53 |
*/ |
1614 |
15 Feb 23 |
peter |
54 |
std::string plot(const std::string&, const std::string&, |
1614 |
15 Feb 23 |
peter |
55 |
const std::string& title) const; |
1290 |
12 Nov 10 |
peter |
56 |
|
1290 |
12 Nov 10 |
peter |
57 |
/** |
1290 |
12 Nov 10 |
peter |
Plotting code, comment, other, and total in same plot (for |
1290 |
12 Nov 10 |
peter |
'all' not individual authors). |
1290 |
12 Nov 10 |
peter |
60 |
*/ |
1290 |
12 Nov 10 |
peter |
61 |
void plot_summary(const std::string& output) const; |
1290 |
12 Nov 10 |
peter |
62 |
|
1290 |
12 Nov 10 |
peter |
63 |
private: |
1290 |
12 Nov 10 |
peter |
64 |
typedef std::map<std::string, SumVector> Author2Vector; |
1290 |
12 Nov 10 |
peter |
65 |
const Stats& stats_; |
1290 |
12 Nov 10 |
peter |
66 |
|
1290 |
12 Nov 10 |
peter |
67 |
/** |
1290 |
12 Nov 10 |
peter |
called from plot(2) |
1290 |
12 Nov 10 |
peter |
69 |
*/ |
1290 |
12 Nov 10 |
peter |
70 |
void plot(const std::string& basename, const std::string& linetype, |
1614 |
15 Feb 23 |
peter |
71 |
const std::string& format, const std::string& title) const; |
1290 |
12 Nov 10 |
peter |
72 |
|
1290 |
12 Nov 10 |
peter |
73 |
/** |
1290 |
12 Nov 10 |
peter |
called from plot_summary(1) |
1290 |
12 Nov 10 |
peter |
75 |
*/ |
1513 |
23 Sep 12 |
peter |
76 |
void plot_summary(const std::string& basename, |
1290 |
12 Nov 10 |
peter |
77 |
const std::string& format) const; |
1290 |
12 Nov 10 |
peter |
78 |
|
1290 |
12 Nov 10 |
peter |
79 |
}; |
1290 |
12 Nov 10 |
peter |
80 |
}} // end of namespace svndigest end of namespace theplu |
1290 |
12 Nov 10 |
peter |
81 |
|
1513 |
23 Sep 12 |
peter |
82 |
#endif |