source: trunk/lib/File.h @ 343

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

refs #169

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
1#ifndef _theplu_svndigest_file_
2#define _theplu_svndigest_file_
3
4// $Id: File.h 343 2007-05-19 13:58:19Z 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 <map>
31#include <string>
32
33namespace theplu{
34namespace svndigest{
35
36  class File : public Node
37  {
38  public:
39    ///
40    /// @brief Default Constructor
41    ///
42    File(const u_int level, const std::string& path, 
43         const std::string& output=""); 
44
45    /**
46       For example 'File.h.html'
47
48       @return href to this file
49    */
50    std::string href(void) const;
51
52    ///
53    /// @return file
54    ///
55    std::string node_type(void) const;
56
57    /**
58       @return output dir for example 'lib' for this file
59     */
60    std::string output_dir(void) const;
61
62    /**
63       @return output path for example 'lib/File.h.html' for this file
64     */
65    std::string output_path(void) const;
66
67    ///
68    /// @brief Parsing out information from svn repository
69    ///
70    /// @return Stats object of the file
71    ///
72    const Stats& parse(const bool verbose=false);
73
74    ///
75    /// print blame output
76    ///
77    void print_blame(std::ofstream&, const std::string line_type) const;
78
79    void print_copyright(std::map<std::string, Alias>&) const;
80
81  private:
82
83    ///
84    /// @brief Parsing svn blame output
85    ///
86    /// @return true if parsing is succesful
87    ///
88    bool blame(void) const;
89
90    ///
91    /// @brief Copy Constructor, not implemented
92    ///
93    File(const File&);
94
95    void print_core(bool verbose=false) const;
96
97    ///
98    /// print page for specific user (or all) and specific line_style
99    /// (or total).
100    ///
101    void print_core(const std::string& user, const std::string& line_type,
102                    const SVNlog&) const; 
103
104  };
105
106}} // end of namespace svndigest and namespace theplu
107
108#endif
109
110
Note: See TracBrowser for help on using the repository browser.