source: trunk/lib/Node.h @ 7

Last change on this file since 7 was 7, checked in by Jari Häkkinen, 16 years ago

Fixed svn properties. Moved endo of namespace comments to correct line.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1// $Id: Node.h 7 2005-12-30 06:41:11Z jari $
2
3#ifndef _theplu_svnstat_node_
4#define _theplu_svnstat_node_
5
6#include <map>
7#include <string>
8#include <vector>
9
10namespace theplu{
11namespace svnstat{
12
13  ///
14  /// Abstract Base Class for files.
15  ///
16  class Node
17  {
18  public:
19    ///
20    /// @brief Constructor
21    ///
22    Node(const std::string& name, Node*);
23
24    virtual ~Node() {};
25
26    ///
27    /// @return accumulated vector of total
28    ///
29    std::vector<u_int> accumulated(void) const;
30
31    ///
32    /// @return accumulated vector of stats_[user]
33    ///
34    std::vector<u_int> accumulated(const std::string& user);
35
36    ///
37    /// @brief adding a line to user from revision to the stats
38    ///
39    void add(const std::string& user, const u_int& revision); 
40
41    ///
42    /// @brief parsing file using svn blame.
43    ///
44    virtual bool parse(void)=0;
45
46    ///
47    /// Function printing HTML in directory dir
48    ///
49    void print(const std::string& dir);
50
51  protected:
52    ///
53    /// @brief performing svn info and parsing the info.
54    ///
55    /// @return true if parsing succesful
56    ///
57    bool info(void);
58
59    std::string author_;
60    Node* mother_;
61    std::string path_;
62    u_int revision_;
63    // Peter, if the vector is sparse make it a map
64    std::map<std::string, std::vector<u_int> > stats_;
65    std::string uuid_;
66
67  };
68
69}} // end of namespace svnstat and namespace theplu
70
71#endif
Note: See TracBrowser for help on using the repository browser.