Changeset 532 for trunk/lib/Directory.cc


Ignore:
Timestamp:
Dec 26, 2007, 2:47:03 AM (14 years ago)
Author:
Peter Johansson
Message:

Node holds a StatsCollection? rather than a Stats object.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Directory.cc

    r519 r532  
    129129  }
    130130
    131   const ClassicStats& Directory::parse(const bool verbose)
     131  const StatsCollection& Directory::parse(const bool verbose)
    132132  {
    133133    stats_.reset();
     
    154154  {
    155155
     156    const Stats& stats = stats_[stats_type];
    156157    std::string outdir = stats_type+"/"+user+"/"+line_type+"/"+local_path_;
    157158    if (local_path_=="")
     
    176177    os << "../../../";
    177178    if (user=="all")
    178       os << stats_.plot(imagedir+"/index.png", line_type);
     179      os << stats.plot(imagedir+"/index.png", line_type);
    179180    else
    180181      os << imagedir << "/index.png";
     
    208209    // print html links to daughter nodes
    209210    for (NodeConstIterator d = daughters_.begin(); d!=daughters_.end(); ++d) {
    210       (*d)->html_tablerow(os,color, user);
     211      (*d)->html_tablerow(os,stats_type, color, user);
    211212      if (color=="dark")
    212213        color = "light";
     
    217218    os << "<td>Total</td>\n";
    218219    if (user=="all"){
    219       os << "<td>" << stats_.lines() << "</td>\n";
    220       os << "<td>" << stats_.code() << "</td>\n";
    221       os << "<td>" << stats_.comments() << "</td>\n";
    222       os << "<td>" << stats_.empty() << "</td>\n";
     220      os << "<td>" << stats.lines() << "</td>\n";
     221      os << "<td>" << stats.code() << "</td>\n";
     222      os << "<td>" << stats.comments() << "</td>\n";
     223      os << "<td>" << stats.empty() << "</td>\n";
    223224    }
    224225    else {
    225       os << "<td>" << stats_.lines(user);
    226       if (stats_.lines(user))
    227         os << " (" << percent(stats_.lines(user),stats_.lines()) << "%)";
    228       os << "</td>\n";
    229       os << "<td>" << stats_.code(user);
    230       if (stats_.code(user))
    231         os << " (" << percent(stats_.code(user),stats_.code()) << "%)";
    232       os << "</td>\n";
    233       os << "<td>" << stats_.comments(user);
    234       if (stats_.comments(user))
    235         os << " (" << percent(stats_.comments(user),stats_.comments()) << "%)";
    236       os << "</td>\n";
    237       os << "<td>" << stats_.empty(user);
    238       if (stats_.empty(user))
    239         os << " (" << percent(stats_.empty(user),stats_.empty()) << "%)";
    240       os << "</td>\n";
    241     }
    242     os << "<td>" << trac_revision(stats_.last_changed_rev()) << "</td>\n";
     226      os << "<td>" << stats.lines(user);
     227      if (stats.lines(user))
     228        os << " (" << percent(stats.lines(user),stats.lines()) << "%)";
     229      os << "</td>\n";
     230      os << "<td>" << stats.code(user);
     231      if (stats.code(user))
     232        os << " (" << percent(stats.code(user),stats.code()) << "%)";
     233      os << "</td>\n";
     234      os << "<td>" << stats.comments(user);
     235      if (stats.comments(user))
     236        os << " (" << percent(stats.comments(user),stats.comments()) << "%)";
     237      os << "</td>\n";
     238      os << "<td>" << stats.empty(user);
     239      if (stats.empty(user))
     240        os << " (" << percent(stats.empty(user),stats.empty()) << "%)";
     241      os << "</td>\n";
     242    }
     243    os << "<td>" << trac_revision(stats.last_changed_rev()) << "</td>\n";
    243244    os << "<td>" << author() << "</td>\n";
    244245    os << "</tr>\n";
    245246    os << "</tbody>\n";
    246247    os << "</table>\n";
    247     print_author_summary(os, line_type, log);
     248    print_author_summary(os, stats, line_type, log);
    248249    os << "\n";
    249250    print_footer(os);
Note: See TracChangeset for help on using the changeset viewer.