15 std::regex
const reSequenceElement{R
"(.*\[(\d+)\])"}; 20 return !src_info.empty() && src_info != UNKNOWN_SRC;
32 if (!allowed_info(curr_info))
36 curr_info == cached_info ?
"\"\"" : curr_info;
37 return tag + printed_info;
43 std::string const printed_info = allowed_info(info) ? info :
"";
44 return "#SRC|" + printed_info +
"|";
58 if (std::regex_match(key, m, reSequenceElement) &&
59 std::stoul(m[1]) != sz - 1) {
114 "An error occurred while converting a name to a sequence " 116 <<
"The name '" << name <<
"' does not correspond to a sequence element.";
118 auto const b = name.find_last_of(
"[");
119 assert(
b != std::string::npos);
120 auto const e = name.find_last_of(
"]");
121 assert(
e == name.length() - 1);
122 auto const start =
b + 1;
124 return std::stoull(name.substr(start,
e - start));
std::string printed_suffix(std::string const &key, std::size_t const sz)
std::string print_annotated_info(std::string const &curr_info, std::string const &cached_info)
bool is_sequence_element(std::string const &key)
std::string opening_brace()
std::string printed_prefix(std::string const &key)
std::string print_prefix_annotated_info(std::string const &curr_info)
std::string printed_prefix(std::string const &key)
std::size_t index_for_sequence_element(std::string const &name)
std::string value(std::any const &)
static int max(int a, int b)
std::string printed_prefix(std::string const &key)
cet::coded_exception< error, detail::translate > exception