Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Stats.cc
r439 r454 33 33 #include <cassert> 34 34 #include <cstdlib> 35 #include <fstream> 35 36 #include <iostream> 37 #include <iterator> 36 38 #include <map> 37 39 #include <numeric> … … 277 279 278 280 281 void Stats::print(std::ostream& os) const 282 { 283 os << last_changed_rev_ << "\n"; 284 os << authors_.size() << "\n"; 285 std::copy(authors_.begin(), authors_.end(), 286 std::ostream_iterator<std::string>(os, "\n")); 287 print(os, code_); 288 print(os, comments_); 289 print(os, empty_); 290 print(os, total_); 291 } 292 293 294 void Stats::print(std::ostream& os, const Map_& m) const 295 { 296 for (MapConstIter_ i(m.begin()); i!=m.end(); ++i){ 297 os << i->first << "\n"; 298 os << i->second.size() << "\n"; 299 std::copy(i->second.begin(), i->second.end(), 300 std::ostream_iterator<u_int>(os, "\n")); 301 } 302 } 303 304 279 305 Stats& Stats::operator+=(const Stats& other) 280 306 { -
trunk/lib/Stats.h
r439 r454 121 121 void plot_summary(const std::string& output) const; 122 122 123 /** 124 */ 125 void print(std::ostream&) const; 126 123 127 /// 124 128 /// @brief Clear all statistics … … 175 179 176 180 181 void print(std::ostream& os, const Map_& map) const; 182 177 183 svn_revnum_t revision_; // Should be the latest revision for whole project 178 184 svn_revnum_t last_changed_rev_; // Should be the latest revision for file
Note: See TracChangeset
for help on using the changeset viewer.