source: trunk/lib/Node.h @ 18

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

Directory tree created. Use purge() to remove non subversion controlled entries.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1// $Id: Node.h 18 2005-12-30 17:41:33Z jari $
2
3#ifndef _theplu_svnstat_node_
4#define _theplu_svnstat_node_
5
6#include "Stats.h"
7
8#include <string>
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    inline Node(const std::string& path) : path_(path) {}
23
24    ///
25    /// @brief Destructor
26    ///
27    virtual inline ~Node(void) {};
28
29    ///
30    /// @brief parsing file using svn blame.
31    ///
32    virtual const Stats& parse(void)=0;
33
34    ///
35    /// Function printing HTML in directory path
36    ///
37    virtual void print(void)=0;
38
39    inline virtual void purge(void) { /* Nothing to be done */ };
40
41    ///
42    /// Check if the node is under subversion control. This is done by
43    /// checking the return status of 'svn proplist <Node>.
44    ///
45    /// @return True if subversion controlled, false otherwise.
46    ///
47    bool subversion_controlled(void) const;
48
49  protected:
50    std::string author_;
51    std::string path_;
52    u_int revision_;
53    Stats stats_;
54    std::string uuid_;
55
56  private:
57    ///
58    /// @brief Copy Constructor, not implemented
59    ///
60    Node(const Node&);
61  };
62
63}} // end of namespace svnstat and namespace theplu
64
65#endif
Note: See TracBrowser for help on using the repository browser.