MetadataSummaryForMFStatsPlugin.h
Go to the documentation of this file.
1 #ifndef art_Framework_Art_detail_md_summary_MetadataSummaryForMFStatsPlugin_h
2 #define art_Framework_Art_detail_md_summary_MetadataSummaryForMFStatsPlugin_h
3 
7 
8 #include <iomanip>
9 #include <sstream>
10 #include <string>
11 
12 namespace art::detail {
13 
14  template <>
16  : public MetadataSummary {
17  public:
19  : widths_{std::to_string(coll.size()).size(),
20  columnWidth(coll,
22  "Statistics destination type"),
23  columnWidth(coll, &LibraryInfo::path, "Source location")}
24  {}
25 
26  private:
28  Widths const&
29  doWidths() const override
30  {
31  return widths_;
32  }
33 
35  doHeader() const override
36  {
37  std::ostringstream result;
38  result << indent(widths_[0] + 2) << std::setw(widths_[1] + 4) << std::left
39  << "Statistics destination type" << std::left << "Source location";
40  return result.str();
41  }
42 
43  Summary
44  doSummary(LibraryInfo const& li, std::size_t const entry) const override
45  {
46  std::ostringstream result;
47  result << std::setw(widths_[0]) << std::right << entry << ". "
48  << std::setw(widths_[1] + 4) << std::left << li.short_spec()
49  << std::left << li.path() << "\n";
50  return {result.str(), false};
51  }
52  };
53 }
54 
55 #endif /* art_Framework_Art_detail_md_summary_MetadataSummaryForMFStatsPlugin_h */
56 
57 // Local variables:
58 // mode: c++
59 // End:
std::vector< std::size_t > Widths
QList< Entry > entry
static QCString result
std::string string
Definition: nybbler.cc:12
std::size_t columnWidth(T const &coll, std::string const Elem::*cp, std::string const &header)
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
std::string indent(std::size_t const i)
Q_EXPORT QTSManip setw(int w)
Definition: qtextstream.h:331
std::string const & short_spec() const
Definition: LibraryInfo.h:43
Summary doSummary(LibraryInfo const &li, std::size_t const entry) const override
std::string const & path() const
Definition: LibraryInfo.h:53
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
std::multiset< LibraryInfo > LibraryInfoCollection