Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
art
art
Framework
Art
detail
md-summary
MetadataSummaryForTool.h
Go to the documentation of this file.
1
#ifndef art_Framework_Art_detail_md_summary_MetadataSummaryForTool_h
2
#define art_Framework_Art_detail_md_summary_MetadataSummaryForTool_h
3
4
#include "
art/Framework/Art/detail/LibraryInfoCollection.h
"
5
#include "
art/Framework/Art/detail/MetadataSummary.h
"
6
#include "
art/Framework/Art/detail/PrintFormatting.h
"
7
8
#include <iomanip>
9
#include <sstream>
10
#include <string>
11
12
namespace
art::detail
{
13
14
template
<>
15
class
MetadataSummaryFor
<
suffix_type
::
tool
> :
public
MetadataSummary
{
16
public
:
17
MetadataSummaryFor
(
LibraryInfoCollection
const
& coll)
18
: widths_{
std::to_string
(coll.size()).
size
(),
19
columnWidth
(coll, &
LibraryInfo::short_spec
,
"tool_type"
),
20
columnWidth
(coll, &
LibraryInfo::plugin_type
,
"Type"
),
21
columnWidth
(coll, &
LibraryInfo::path
,
"Source location"
)}
22
{}
23
24
private
:
25
Widths
widths_
;
26
Widths
const
&
27
doWidths
()
const override
28
{
29
return
widths_;
30
}
31
32
std::string
33
doHeader
()
const override
34
{
35
std::ostringstream
result
;
36
result <<
indent
(widths_[0] + 2) <<
std::setw
(widths_[1] + 4) <<
std::left
37
<<
"tool_type"
<<
std::setw
(widths_[2] + 4) <<
std::left
<<
"Type"
38
<<
std::left
<<
"Source location"
;
39
return
result.str();
40
}
41
42
Summary
43
doSummary
(
LibraryInfo
const
& li, std::size_t
const
entry
)
const override
44
{
45
std::ostringstream
result
;
46
result <<
std::setw
(widths_[0]) <<
std::right
<< entry <<
". "
47
<<
std::setw
(widths_[1] + 4) <<
std::left
<< li.
short_spec
()
48
<<
std::setw
(widths_[2] + 4) <<
std::left
<< li.
plugin_type
()
49
<<
std::left
<< li.
path
() <<
"\n"
;
50
return
{result.str(),
false
};
51
}
52
};
53
54
}
// namespace art::detail
55
56
#endif
/* art_Framework_Art_detail_md_summary_MetadataSummaryForTool_h */
57
58
// Local variables:
59
// mode: c++
60
// End:
art::detail::Widths
std::vector< std::size_t > Widths
Definition:
PrintFormatting.h:65
entry
QList< Entry > entry
Definition:
tclscanner.cpp:1150
result
static QCString result
Definition:
fortranscanner.cpp:56614
art::detail::MetadataSummaryFor< suffix_type::tool >::doSummary
Summary doSummary(LibraryInfo const &li, std::size_t const entry) const override
Definition:
MetadataSummaryForTool.h:43
string
std::string string
Definition:
nybbler.cc:12
art::detail::MetadataSummaryFor< suffix_type::tool >::doHeader
std::string doHeader() const override
Definition:
MetadataSummaryForTool.h:33
art::detail::Summary
Definition:
MetadataSummary.h:18
art::detail::columnWidth
std::size_t columnWidth(T const &coll, std::string const Elem::*cp, std::string const &header)
Definition:
PrintFormatting.h:41
PrintFormatting.h
art::detail::MetadataSummaryFor
Definition:
MetadataSummary.h:13
LibraryInfoCollection.h
util::size
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition:
StdUtils.h:92
art::detail
Definition:
AllowedConfiguration.h:76
art::detail::LibraryInfo
Definition:
LibraryInfo.h:12
art::suffix_type::tool
art::detail::MetadataSummaryFor< suffix_type::tool >::MetadataSummaryFor
MetadataSummaryFor(LibraryInfoCollection const &coll)
Definition:
MetadataSummaryForTool.h:17
art::detail::indent
std::string indent(std::size_t const i)
Definition:
PrintFormatting.h:17
MetadataSummary.h
art::suffix_type
suffix_type
Definition:
PluginSuffixes.h:59
wirecell.validate.cmaps.right
right
Definition:
cmaps.py:84
setw
Q_EXPORT QTSManip setw(int w)
Definition:
qtextstream.h:331
art::detail::LibraryInfo::short_spec
std::string const & short_spec() const
Definition:
LibraryInfo.h:43
art::detail::MetadataSummaryFor< suffix_type::tool >::widths_
Widths widths_
Definition:
MetadataSummaryForTool.h:25
wirecell.validate.cmaps.left
left
Definition:
cmaps.py:84
art::detail::MetadataSummaryFor< suffix_type::tool >::doWidths
Widths const & doWidths() const override
Definition:
MetadataSummaryForTool.h:27
art::detail::LibraryInfo::path
std::string const & path() const
Definition:
LibraryInfo.h:53
art::detail::LibraryInfo::plugin_type
std::string const & plugin_type() const
Definition:
LibraryInfo.h:68
art::detail::MetadataSummary
Definition:
MetadataSummary.h:23
art::to_string
std::string to_string(ModuleType const mt)
Definition:
ModuleType.h:34
art::detail::LibraryInfoCollection
std::multiset< LibraryInfo > LibraryInfoCollection
Definition:
LibraryInfoCollection.h:10
Generated by
1.8.11