// $Id: Node.h 29 2006-01-09 09:35:50Z peter $ #ifndef _theplu_svnstat_node_ #define _theplu_svnstat_node_ #include "Stats.h" #include #include namespace theplu{ namespace svnstat{ /// /// Abstract Base Class for files. /// class Node { public: /// /// @brief Constructor /// Node(const std::string& path, const std::string& output=""); /// /// @brief Destructor /// virtual inline ~Node(void) {}; /// /// @brief parsing file using svn blame. /// virtual const Stats& parse(void)=0; /// /// Function printing HTML in directory path /// virtual void print(const std::string& path) const=0; /// /// Prints a html link. /// inline void print_link(std::ostream& os) const { os << "" << name() << ""; } /// /// /// inline virtual void purge(void) { /* Nothing to be done */ }; /// /// Check if the node is under subversion control. This is done by /// checking the return status of 'svn proplist . /// /// @return True if subversion controlled, false otherwise. /// bool subversion_controlled(void) const; protected: /// /// Function returning everything after the last '/' /// /// @return name of node (not full path) /// std::string name(void) const; /// /// @brief print html footer of page /// void print_footer(std::ostream&) const; /// /// @brief print html header of page /// void print_header(std::ostream&) const; std::string output_name_; //without suffix std::string path_; Stats stats_; private: /// /// @brief Copy Constructor, not implemented /// Node(const Node&); }; }} // end of namespace svnstat and namespace theplu #endif