#include "MaybeDisplayParent.h"
Definition at line 18 of file MaybeDisplayParent.h.
fhicl::detail::MaybeDisplayParent::MaybeDisplayParent |
( |
ParameterBase const & |
p, |
|
|
bool const |
showParents, |
|
|
Indentation & |
ind |
|
) |
| |
|
inline |
Definition at line 20 of file MaybeDisplayParent.h.
References closingBraces_, e, fullPayload_, get_parents(), art::detail::indent(), indent_, names_, fhicl::detail::Indentation::push(), show_, and util::size().
27 std::ostringstream os;
31 for (
auto it =
names_.begin(),
e =
names_.end() - 1; it !=
e; ++it) {
32 std::string
const& name = *it;
33 std::string
const& next_name = *std::next(it);
40 if (!std::isdigit(name[0])) {
41 if (std::isdigit(next_name[0])) {
42 os <<
indent << name <<
": [ # index: " << next_name <<
'\n';
45 os <<
indent << name <<
": {\n";
49 if (!std::isdigit(next_name[0])) {
53 os << indent <<
"[ # index: " << next_name <<
'\n';
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
std::vector< std::string > closingBraces_
std::string indent(std::size_t const i)
std::vector< std::string > names_
std::vector< std::string > get_parents(std::string const &k)
std::string fhicl::detail::MaybeDisplayParent::closing_braces |
( |
| ) |
const |
|
inline |
std::vector< std::string > fhicl::detail::MaybeDisplayParent::get_parents |
( |
std::string const & |
k | ) |
|
|
private |
Definition at line 14 of file MaybeDisplayParent.cc.
Referenced by MaybeDisplayParent().
16 std::vector<std::string> parents;
17 for (
auto const& key : cet::split_by_regex(k, re_dot))
18 for (
auto const& token :
19 cet::split_by_regex(std::regex_replace(key, re_index,
",$1"),
","))
20 parents.push_back(token);
24 return std::vector<std::string>(parents.begin() + 1, parents.end());
bool fhicl::detail::MaybeDisplayParent::is_sequence_element |
( |
ParameterBase const & |
p | ) |
|
|
inlineprivate |
std::string const& fhicl::detail::MaybeDisplayParent::parent_names |
( |
| ) |
const |
|
inline |
std::vector<std::string> fhicl::detail::MaybeDisplayParent::closingBraces_ {} |
|
private |
std::string fhicl::detail::MaybeDisplayParent::fullPayload_ {} |
|
private |
Indentation& fhicl::detail::MaybeDisplayParent::indent_ |
|
private |
std::vector<std::string> fhicl::detail::MaybeDisplayParent::names_ |
|
private |
bool fhicl::detail::MaybeDisplayParent::show_ |
|
private |
The documentation for this class was generated from the following files: