source: trunk/lib/DirectoryPrinter.h @ 1290

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

closes #457. Lifting out plotting functions in Stats into a new class
StatsPlotter?. In same manner lifting out print functions from
Node/Directory/File? into a new hierarchy
NodePrinter/DirectoryPrinter/FilePrinter?. To accomplish these splits
without to much recoding some friendships are introduced. These new
classes are only needed for svndigest (not svncopyright) and are
therefore placed in a library named libsvndigest together with Graph
class and first_page functions. Remaining functionality, shared
between svncopyright and svndigest, are located in libsvndigest_core
and linked into both binaries.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1#ifndef _theplu_svndigest_directory_printer_
2#define _theplu_svndigest_directory_printer_
3
4// $Id: DirectoryPrinter.h 1290 2010-11-12 04:01:35Z 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 "NodePrinter.h"
27
28#include <map>
29#include <string>
30#include <vector>
31
32namespace theplu{
33namespace svndigest{
34
35  class Directory;
36  class Node;
37
38  ///
39  /// Class taking care of directories.
40  ///
41  class DirectoryPrinter : public NodePrinter
42  {
43  public:
44    /**
45       \brief Constructor
46    */
47    explicit DirectoryPrinter(const Directory&);
48
49    /**
50       \brief Destructor
51    */
52    ~DirectoryPrinter(void);
53
54    /**
55       @return output path for example 'lib/File.h.html' for this file
56     */
57    std::string output_path(void) const;
58
59  private:
60    ///
61    /// @brief Copy Constructor, not implemented
62    ///
63    DirectoryPrinter(const DirectoryPrinter&);
64
65    const Node& node(void) const;
66
67    void print_core(bool verbose=false) const;
68
69    void print_core(const std::string& stats_type, const std::string& user, 
70                    const std::string& line_type, const SVNlog&) const;
71
72
73   
74
75    const Directory& directory_;
76    typedef std::vector<Node*> NodeContainer;
77    typedef NodeContainer::iterator NodeIterator;
78    typedef NodeContainer::const_iterator NodeConstIterator;
79  };
80
81}} // end of namespace svndigest and namespace theplu
82
83#endif
Note: See TracBrowser for help on using the repository browser.