Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
art
art
Framework
Art
detail
md-summary
MetadataSummaryForService.h
Go to the documentation of this file.
1
#ifndef art_Framework_Art_detail_md_summary_MetadataSummaryForService_h
2
#define art_Framework_Art_detail_md_summary_MetadataSummaryForService_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
::
service
> :
public
MetadataSummary
{
16
public
:
17
MetadataSummaryFor
(
LibraryInfoCollection
const
& coll)
18
: widths_{
std::to_string
(coll.size()).
size
(),
19
columnWidth
(coll, &
LibraryInfo::short_spec
,
"Service"
),
20
columnWidth
(coll, &
LibraryInfo::provider
,
"Provider"
),
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
<<
"Service"
<<
std::setw
(widths_[2] + 4) <<
std::left
38
<<
"Provider"
<<
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.
provider
()
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_MetadataSummaryForService_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
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< suffix_type::service >::doWidths
Widths const & doWidths() const override
Definition:
MetadataSummaryForService.h:27
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::detail::MetadataSummaryFor< suffix_type::service >::doSummary
Summary doSummary(LibraryInfo const &li, std::size_t const entry) const override
Definition:
MetadataSummaryForService.h:43
art::detail::MetadataSummaryFor< suffix_type::service >::MetadataSummaryFor
MetadataSummaryFor(LibraryInfoCollection const &coll)
Definition:
MetadataSummaryForService.h:17
art::detail::indent
std::string indent(std::size_t const i)
Definition:
PrintFormatting.h:17
art::suffix_type::service
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::service >::doHeader
std::string doHeader() const override
Definition:
MetadataSummaryForService.h:33
art::detail::LibraryInfo::provider
std::string const & provider() const
Definition:
LibraryInfo.h:63
wirecell.validate.cmaps.left
left
Definition:
cmaps.py:84
art::detail::LibraryInfo::path
std::string const & path() const
Definition:
LibraryInfo.h:53
art::detail::MetadataSummary
Definition:
MetadataSummary.h:23
art::detail::MetadataSummaryFor< suffix_type::service >::widths_
Widths widths_
Definition:
MetadataSummaryForService.h:25
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