source: trunk/lib/File.h @ 225

Last change on this file since 225 was 225, checked in by Peter Johansson, 15 years ago

copyright based on log is printed to cout refs #36

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1#ifndef _theplu_svndigest_file_
2#define _theplu_svndigest_file_
3
4// $Id: File.h 225 2007-03-11 11:41:51Z peter $
5
6/*
7  Copyright (C) 2005, 2006 Jari Häkkinen, Peter Johansson
8  Copyright (C) 2007 Peter Johansson
9
10  This file is part of svndigest, http://lev.thep.lu.se/trac/svndigest
11
12  svndigest is free software; you can redistribute it and/or modify it
13  under the terms of the GNU General Public License as published by
14  the Free Software Foundation; either version 2 of the License, or
15  (at your option) any later version.
16
17  svndigest is distributed in the hope that it will be useful, but
18  WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  General Public License for more details.
21
22  You should have received a copy of the GNU General Public License
23  along with this program; if not, write to the Free Software
24  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25  02111-1307, USA.
26*/
27
28#include "Node.h"
29
30#include <string>
31
32namespace theplu{
33namespace svndigest{
34
35  class File : public Node
36  {
37  public:
38    ///
39    /// @brief Default Constructor
40    ///
41    File(const u_int level, const std::string& path, 
42         const std::string& output="") 
43      : Node(level,path,output) {}
44
45    ///
46    /// @return href to this file
47    ///
48    std::string href(void) const;
49
50    ///
51    /// @return file
52    ///
53    const std::string node_type(void) const;
54
55    ///
56    /// @brief Parsing out information from svn repository
57    ///
58    /// @return true if succesful
59    ///
60    const Stats& parse(const bool verbose=false);
61
62    ///
63    /// printing all pages related to this file
64    ///
65    void print(const bool verbose=false) const;
66
67    ///
68    /// print blame output
69    ///
70    void print_blame(std::ofstream&, const std::string line_type) const;
71
72    void print_copyright(const std::vector<std::string>&,
73                         const std::vector<std::string>&) const;
74  private:
75
76    ///
77    /// @brief Parsing svn blame output
78    ///
79    /// @return true if parsing is succesful
80    ///
81    bool blame(void) const;
82
83    ///
84    /// @brief Copy Constructor, not implemented
85    ///
86    File(const File&);
87
88    ///
89    /// print page for specific user (or all) and specific line_style
90    /// (or total).
91    ///
92    void print(const std::string& user, const std::string& line_type) const; 
93
94  };
95
96}} // end of namespace svndigest and namespace theplu
97
98#endif
99
100
Note: See TracBrowser for help on using the repository browser.