source: trunk/lib/File.h

Last change on this file was 1538, checked in by Peter Johansson, 9 years ago

refs #334. implement --update also for directories. For Directories the 'revision: ' tag in html output reflects the lowest revision of the nodes (Directory and sub-nodes). Directory is not reprinted if this revision is at least last_changed_rev, in other words, there is no node by node comparison but a more easily implemented collective comparison. In case of homogenous revision (no mixtures) this is is the same thing.

  • 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 1538 2012-10-07 09:29:04Z peter $
5
6/*
7  Copyright (C) 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
8  Copyright (C) 2009, 2010, 2012 Peter Johansson
9
10  This file is part of svndigest, http://dev.thep.lu.se/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 3 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 svndigest. If not, see <http://www.gnu.org/licenses/>.
24*/
25
26#include "Node.h"
27
28#include <subversion-1/svn_types.h>
29
30#include <string>
31
32namespace theplu{
33namespace svndigest{
34
35  class NodeVisitor;
36
37  class File : public Node
38  {
39  public:
40    ///
41    /// @brief Default Constructor
42    ///
43    File(const unsigned int level, const std::string& path,
44         const std::string& output="");
45
46    /**
47       \return absolute path to cache file
48    */
49    std::string cache_name(void) const;
50
51    /**
52       For example 'File.h.html'
53
54       @return href to this file
55    */
56    std::string href(void) const;
57
58    /**
59       \brief Get the revision number of the latest commit.
60    */
61    svn_revnum_t last_changed_rev(void) const;
62
63    /**
64       @return The explicit string "file", nothing else.
65    */
66    std::string node_type(void) const;
67
68    ///
69    /// @brief Parsing out information from svn repository
70    ///
71    /// if \a ignore true, ignore cache file (read from repo).
72    /// ignore revision in range [0, ignore_rev]
73    ///
74    /// @return Stats object of the file
75    ///
76    const StatsCollection& parse(bool verbose, bool ignore,
77                                 svn_revnum_t ignore_rev);
78
79    ///
80    /// \return revision File
81    ///
82    svn_revnum_t revision_min(void) const;
83
84    /**
85       Let the visitor perform its mission via visitor(*this)
86     */
87    void traverse(NodeVisitor& visitor);
88
89  private:
90    /**
91       do nothing
92    */
93    void log_core(SVNlog&) const;
94
95    ///
96    /// @brief Copy Constructor, not implemented
97    ///
98    File(const File&);
99
100  };
101
102}} // end of namespace svndigest and namespace theplu
103
104#endif
Note: See TracBrowser for help on using the repository browser.