source: trunk/lib/File.h @ 198

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

refs #36 optionally a copyright information, based on Stats, can be displayed using --copyright flag. This will flag will be added to usage output when this feature is mature.

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