#include "MaybeDisplayParent.h"
Definition at line 19 of file MaybeDisplayParent.h.
fhicl::detail::MaybeDisplayParent::MaybeDisplayParent |
( |
ParameterBase const & |
p, |
|
|
bool const |
showParents, |
|
|
Indentation & |
ind |
|
) |
| |
|
inline |
Definition at line 21 of file MaybeDisplayParent.h.
References closingBraces_, e, fullPayload_, get_parents(), art::detail::indent(), indent_, names_, fhicl::detail::Indentation::push(), and show_.
26 std::vector<std::string>{}}
29 std::ostringstream os;
33 for (
auto it =
names_.begin(),
e =
names_.end() - 1; it !=
e; ++it) {
34 std::string
const& name = *it;
35 std::string
const& next_name = *std::next(it);
42 if (!std::isdigit(name[0])) {
43 if (std::isdigit(next_name[0])) {
44 os <<
indent << name <<
": [ # index: " << next_name <<
'\n';
47 os <<
indent << name <<
": {\n";
51 if (!std::isdigit(next_name[0])) {
55 os << indent <<
"[ # index: " << next_name <<
'\n';
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 16 of file MaybeDisplayParent.cc.
Referenced by MaybeDisplayParent().
18 std::regex
const r_index{
"\\[(\\d+)\\]"};
19 std::vector<std::string> parents;
20 for (
auto const& key : cet::split_by_regex(k,
"\\."))
21 for (
auto const& token :
22 cet::split_by_regex(std::regex_replace(key, r_index,
",$1"),
","))
23 parents.push_back(token);
27 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: