Changeset 258
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Directory.cc
r244 r258 28 28 #include "Node.h" 29 29 #include "SVN.h" 30 #include "SVNlog.h" 30 31 #include "utility.h" 31 32 … … 120 121 121 122 122 void Directory::print(const bool verbose) const 123 { 124 if (ignore()) 125 return; 126 if (verbose) 127 std::cout << "Printing output for " << path_ << std::endl; 128 print("all", "total"); 129 print("all", "code"); 130 print("all", "comments"); 131 print("all", "empty"); 132 133 for (std::set<std::string>::const_iterator i = stats_.authors().begin(); 134 i!=stats_.authors().end(); ++i) { 135 print(*i, "total"); 136 print(*i, "code"); 137 print(*i, "comments"); 138 print(*i, "empty"); 139 } 140 123 void Directory::print_core(const bool verbose) const 124 { 141 125 // print daughter nodes, i.e., this function is recursive 142 126 for (NodeConstIterator i=daughters_.begin(); i!=daughters_.end(); ++i) … … 145 129 146 130 147 void Directory::print(const std::string& user, 148 const std::string& line_type) const 131 void Directory::print_core(const std::string& user, 132 const std::string& line_type, 133 const SVNlog& log) const 149 134 { 150 135 std::string outdir = user+"/"+line_type+"/"+local_path_; … … 223 208 os << "</tr>\n"; 224 209 os << "</table>\n"; 225 print_author_summary(os, line_type );210 print_author_summary(os, line_type, log); 226 211 os << "</p>\n"; 227 212 print_footer(os); -
trunk/lib/Directory.h
r234 r258 79 79 const Stats& parse(const bool verbose=false); 80 80 81 void print(const bool verbose=false) const;82 83 81 void print_copyright(std::map<std::string, std::string>&) const; 84 82 … … 89 87 Directory(const Directory&); 90 88 91 void print(const std::string& user, const std::string& line_type) const; 89 void print_core(bool verbose=false) const; 90 91 void print_core(const std::string& user, const std::string& line_type, 92 const SVNlog&) const; 92 93 93 94 -
trunk/lib/File.cc
r244 r258 61 61 62 62 63 void File::print(const std::string& user, const std::string& line_type) const 63 void File::print_core(const std::string& user, const std::string& line_type, 64 const SVNlog& log) const 64 65 { 65 66 std::string outpath = user+"/"+line_type+"/"+local_path(); … … 79 80 os << "' alt='[plot]' border=0>\n</p>"; 80 81 81 print_author_summary(os, line_type );82 print_author_summary(os, line_type, log); 82 83 os << "</p>\n"; 83 84 … … 87 88 88 89 89 void File::print(const bool verbose) const 90 { 91 // no output page for binary files 92 if (ignore()) 93 return; 94 if (verbose) 95 std::cout << "Printing output for " << path_ << std::endl; 96 print("all", "total"); 97 print("all", "code"); 98 print("all", "comments"); 99 print("all", "empty"); 100 101 for (std::set<std::string>::const_iterator i = stats_.authors().begin(); 102 i!=stats_.authors().end(); ++i) { 103 print(*i, "total"); 104 print(*i, "code"); 105 print(*i, "comments"); 106 print(*i, "empty"); 107 } 108 90 void File::print_core(const bool verbose) const 91 { 109 92 } 110 93 -
trunk/lib/File.h
r234 r258 87 87 File(const File&); 88 88 89 void print_core(bool verbose=false) const; 90 89 91 /// 90 92 /// print page for specific user (or all) and specific line_style 91 93 /// (or total). 92 94 /// 93 void print(const std::string& user, const std::string& line_type) const; 95 void print_core(const std::string& user, const std::string& line_type, 96 const SVNlog&) const; 94 97 95 98 }; -
trunk/lib/Node.cc
r252 r258 25 25 #include "Node.h" 26 26 #include "html_utility.h" 27 #include "SVNlog.h" 27 28 #include "SVNproperty.h" 28 29 #include "utility.h" … … 121 122 122 123 123 void Node::print_author_summary(std::ostream& os, std::string line_type) const 124 void Node::print(const bool verbose) const 125 { 126 if (ignore()) 127 return; 128 if (verbose) 129 std::cout << "Printing output for " << path_ << std::endl; 130 SVNlog log(path_); 131 print_core("all", "total", log); 132 print_core("all", "code", log); 133 print_core("all", "comments", log); 134 print_core("all", "empty", log); 135 136 for (std::set<std::string>::const_iterator i = stats_.authors().begin(); 137 i!=stats_.authors().end(); ++i) { 138 print_core(*i, "total", log); 139 print_core(*i, "code", log); 140 print_core(*i, "comments", log); 141 print_core(*i, "empty", log); 142 } 143 144 print_core(verbose); 145 } 146 147 148 void Node::print_author_summary(std::ostream& os, std::string line_type, 149 const SVNlog& log) const 124 150 { 125 151 os << "<table class=\"listings\">\n"; -
trunk/lib/Node.h
r235 r258 140 140 /// Function printing HTML in current working directory 141 141 /// 142 v irtual void print(const bool verbose=false) const=0;143 144 void print_author_summary(std::ostream&, std::string ) const;142 void print(const bool verbose=false) const; 143 144 void print_author_summary(std::ostream&, std::string, const SVNlog&) const; 145 145 146 146 virtual void … … 177 177 /// 178 178 Node(const Node&); 179 180 virtual void print_core(bool verbose=false) const=0; 181 182 /// 183 /// print page for specific user (or all) and specific line_style 184 /// (or total). 185 /// 186 virtual void print_core(const std::string& user, 187 const std::string& line_type, 188 const SVNlog&) const=0; 179 189 180 190 bool binary_;
Note: See TracChangeset
for help on using the changeset viewer.