source: trunk/lib/File.h @ 1293

Last change on this file since 1293 was 1293, checked in by Peter Johansson, 11 years ago

rewrite svndigest-copy-cache in C++. closes #463

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1#ifndef _theplu_svndigest_file_
2#define _theplu_svndigest_file_
3
4// $Id: File.h 1293 2010-11-14 05:34:10Z peter $
5
6/*
7  Copyright (C) 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
8  Copyright (C) 2009, 2010 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 <string>
29
30namespace theplu{
31namespace svndigest{
32
33  class NodeVisitor;
34
35  class File : public Node
36  {
37  public:
38    ///
39    /// @brief Default Constructor
40    ///
41    File(const unsigned int level, const std::string& path, 
42         const std::string& output=""); 
43
44    /**
45       \return absolute path to cache file
46    */
47    std::string cache_name(void) const;
48
49    /**
50       For example 'File.h.html'
51
52       @return href to this file
53    */
54    std::string href(void) const;
55
56    /**
57       \brief Get the revision number of the latest commit.
58    */
59    svn_revnum_t last_changed_rev(void) const;
60
61    /**
62       @return The explicit string "file", nothing else.
63    */
64    std::string node_type(void) const;
65
66    ///
67    /// @brief Parsing out information from svn repository
68    ///
69    /// @return Stats object of the file
70    ///
71    const StatsCollection& parse(bool verbose, bool ignore);
72
73    /**
74       Let the visitor perform its mission via visitor(*this)
75     */
76    void traverse(NodeVisitor& visitor);
77
78  private:
79    /**
80       do nothing
81    */
82    void log_core(SVNlog&) const;
83
84    ///
85    /// @brief Copy Constructor, not implemented
86    ///
87    File(const File&);
88
89  };
90
91}} // end of namespace svndigest and namespace theplu
92
93#endif
94
95
Note: See TracBrowser for help on using the repository browser.