source: trunk/lib/ClassicStats.h @ 529

Last change on this file since 529 was 529, checked in by Peter Johansson, 14 years ago

moving stuff to base class, Stats

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1#ifndef _theplu_svndigest_classic_stats_
2#define _theplu_svndigest_classic_stats_
3
4// $Id: ClassicStats.h 529 2007-12-25 13:10:25Z peter $
5
6/*
7  Copyright (C) 2005 Peter Johansson
8  Copyright (C) 2006 Jari Häkkinen, Peter Johansson
9  Copyright (C) 2007 Peter Johansson
10
11  This file is part of svndigest, http://trac.thep.lu.se/svndigest
12
13  svndigest is free software; you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation; either version 2 of the License, or
16  (at your option) any later version.
17
18  svndigest is distributed in the hope that it will be useful, but
19  WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  General Public License for more details.
22
23  You should have received a copy of the GNU General Public License
24  along with this program; if not, write to the Free Software
25  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
26  02111-1307, USA.
27*/
28
29#include "Stats.h"
30
31namespace theplu{
32namespace svndigest{
33
34  ///
35  /// Class taking care of statistics from svn.
36  ///
37  class ClassicStats : public Stats
38  {
39  public:
40    ///
41    /// @brief Default Constructor
42    ///
43    explicit ClassicStats(const std::string& path);
44
45    ClassicStats(const ClassicStats& other);
46
47  private:
48    /// using compiler generated copy
49
50    ///
51    /// @brief adding a line to user from revision to the stats
52    ///
53    void add(const std::string& user, const u_int& revision,
54             const Parser::line_type&); 
55
56    /**
57       Load object from a stream.
58       
59       \return true if successful
60     */
61    bool do_load_cache(std::istream&);
62
63    void do_parse(const std::string&);
64
65    ///
66    /// Create statistics graph.
67    ///
68    std::string do_plot(const std::string&, const std::string&) const;
69
70    /**
71     */
72    void do_print(std::ostream&) const;
73
74    std::vector<u_int> vector(std::string type, std::string user) const;
75    /**
76       Load map from stream
77     */
78    void load(std::istream&, Author2Vector&);
79
80    void do_print(std::ostream& os, const Author2Vector& map) const;
81
82  };
83}} // end of namespace svndigest end of namespace theplu
84
85#endif
Note: See TracBrowser for help on using the repository browser.