Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
art
art
Framework
Art
detail
md-summary
MetadataSummaryForMFPlugin.h
Go to the documentation of this file.
1
#ifndef art_Framework_Art_detail_md_summary_MetadataSummaryForMFPlugin_h
2
#define art_Framework_Art_detail_md_summary_MetadataSummaryForMFPlugin_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
::
mfPlugin
> :
public
MetadataSummary
{
16
public
:
17
MetadataSummaryFor
(
LibraryInfoCollection
const
& coll)
18
: widths_{
std::to_string
(coll.size()).
size
(),
19
columnWidth
(coll, &
LibraryInfo::short_spec
,
"Destination type"
),
20
columnWidth
(coll, &
LibraryInfo::path
,
"Source location"
)}
21
{}
22
23
private
:
24
Widths
widths_
;
25
Widths
const
&
26
doWidths
()
const override
27
{
28
return
widths_;
29
}
30
31
std::string
32
doHeader
()
const override
33
{
34
std::ostringstream
result
;
35
result <<
indent
(widths_[0] + 2) <<
std::setw
(widths_[1] + 4) <<
std::left
36
<<
"Destination type"
<<
std::left
<<
"Source location"
;
37
return
result.str();
38
}
39
40
Summary
41
doSummary
(
LibraryInfo
const
& li, std::size_t
const
entry
)
const override
42
{
43
std::ostringstream
result
;
44
result <<
std::setw
(widths_[0]) <<
std::right
<< entry <<
". "
45
<<
std::setw
(widths_[1] + 4) <<
std::left
<< li.
short_spec
()
46
<<
std::left
<< li.
path
() <<
"\n"
;
47
return
{result.str(),
false
};
48
}
49
};
50
51
}
// namespace art::detail
52
53
#endif
/* art_Framework_Art_detail_md_summary_MetadataSummaryForMFPlugin_h */
54
55
// Local variables:
56
// mode: c++
57
// End:
art::detail::Widths
std::vector< std::size_t > Widths
Definition:
PrintFormatting.h:65
art::detail::MetadataSummaryFor< suffix_type::mfPlugin >::MetadataSummaryFor
MetadataSummaryFor(LibraryInfoCollection const &coll)
Definition:
MetadataSummaryForMFPlugin.h:17
entry
QList< Entry > entry
Definition:
tclscanner.cpp:1150
result
static QCString result
Definition:
fortranscanner.cpp:56614
art::detail::MetadataSummaryFor< suffix_type::mfPlugin >::doHeader
std::string doHeader() const override
Definition:
MetadataSummaryForMFPlugin.h:32
art::detail::MetadataSummaryFor< suffix_type::mfPlugin >::doSummary
Summary doSummary(LibraryInfo const &li, std::size_t const entry) const override
Definition:
MetadataSummaryForMFPlugin.h:41
string
std::string string
Definition:
nybbler.cc:12
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
art::detail::MetadataSummaryFor< suffix_type::mfPlugin >::widths_
Widths widths_
Definition:
MetadataSummaryForMFPlugin.h:24
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::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::suffix_type::mfPlugin
wirecell.validate.cmaps.left
left
Definition:
cmaps.py:84
art::detail::MetadataSummaryFor< suffix_type::mfPlugin >::doWidths
Widths const & doWidths() const override
Definition:
MetadataSummaryForMFPlugin.h:26
art::detail::LibraryInfo::path
std::string const & path() const
Definition:
LibraryInfo.h:53
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