source: trunk/lib/CommitStat.h @ 84

Last change on this file since 84 was 84, checked in by Jari Häkkinen, 18 years ago

Added copyright statement. Bumped version number to pre0.3. Cleaned up code.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1// $Id: CommitStat.h 84 2006-03-13 22:04:34Z jari $
2
3/*
4  Copyright (C) 2006 Jari Häkkinen, Peter Johansson
5
6  This file is part of svnstat, http://lev.thep.lu.se/trac/svnstat
7
8  svnstat is free software; you can redistribute it and/or modify it
9  under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or
11  (at your option) any later version.
12
13  svnstat is distributed in the hope that it will be useful, but
14  WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  General Public License for more details.
17
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21  02111-1307, USA.
22*/
23
24#ifndef _theplu_svnstat_commit_stat_
25#define _theplu_svnstat_commit_stat_
26
27#include <string>
28#include <vector>
29
30namespace theplu{
31namespace svnstat{
32
33  ///
34  /// Class for parsing and storing information from svn log
35  ///
36  class CommitStat
37  {
38  public:
39    ///
40    /// @brief Default Constructor
41    ///
42    inline CommitStat(void) {}
43
44    inline const std::vector<std::string>& dates(void) { return date_; }
45
46    ///
47    /// Function parsing output from log() \a path'.
48    ///
49    /// @return return value from system call
50    ///
51    int parse(const std::string& path);
52
53    inline const std::vector<std::string>& date(void) const { return date_; }
54
55  private:
56    ///
57    /// @return return value from 'svn log -q -r 1:HEAD \a path'
58    ///
59    int log(const std::string& path) const;
60
61    void reset(void);
62
63    std::vector<std::string> date_;
64
65  };
66}}
67// end of namespace svnstat end of namespace theplu
68
69#endif
Note: See TracBrowser for help on using the repository browser.