source: trunk/lib/Node.h @ 20

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

Fixed subversion_controlled/info mixup..

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1// $Id: Node.h 20 2005-12-30 22:02:50Z 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    /// Extracts information from 'svn info <node>'
31    ///
32    /// @note <node> must be in subversion control.
33    ///
34    void info(void);
35
36    ///
37    /// @brief parsing file using svn blame.
38    ///
39    virtual const Stats& parse(void)=0;
40
41    ///
42    /// Function printing HTML in directory path
43    ///
44    virtual void print(void)=0;
45
46    inline virtual void purge(void) { /* Nothing to be done */ };
47
48    ///
49    /// Check if the node is under subversion control. This is done by
50    /// checking the return status of 'svn proplist <Node>.
51    ///
52    /// @return True if subversion controlled, false otherwise.
53    ///
54    bool subversion_controlled(void) const;
55
56  protected:
57    std::string author_;
58    std::string path_;
59    u_int revision_;
60    Stats stats_;
61    std::string uuid_;
62
63  private:
64    ///
65    /// @brief Copy Constructor, not implemented
66    ///
67    Node(const Node&);
68  };
69
70}} // end of namespace svnstat and namespace theplu
71
72#endif
Note: See TracBrowser for help on using the repository browser.