|
|
Go to the documentation of this file.
12 #include "tbb/concurrent_unordered_map.h"
20 constexpr
bool debug =
false;
25 namespace friendlyname {
29 static std::regex
const reColons(
"::");
30 static std::regex
const reComma(
",");
33 static std::regex
const reArray(
"\\[\\]");
34 static std::regex
const reUniquePtrDeleter(
"^std::unique_ptr< *(.*), *std::default_delete<\\1> *>");
35 static std::regex
const reUniquePtr(
"^std::unique_ptr");
45 static std::regex
const reWrapper(
"edm::Wrapper<(.*)>");
46 static std::regex
const reString(
"std::basic_string<char>");
47 static std::regex
const reString2(
"std::string");
48 static std::regex
const reString3(
"std::basic_string<char,std::char_traits<char> >");
50 static std::regex
const reCXX11(
"std::__cxx11::");
51 static std::regex
const reSorted(
"edm::SortedCollection<(.*), *edm::StrictWeakOrdering<\\1 *> >");
52 static std::regex
const reclangabi(
"std::__1::");
54 static std::regex
const reLongLong(
"Long64_t");
55 static std::regex
const reUnsigned(
"unsigned ");
56 static std::regex
const reLong(
"long ");
57 static std::regex
const reVector(
"std::vector");
58 static std::regex
const reSharedPtr(
"std::shared_ptr");
59 static std::regex
const reAIKR(
60 ", *edm::helper::AssociationIdenticalKeyReference");
63 static std::regex
const reOwnVector(
"edm::OwnVector<(.*), *edm::ClonePolicy<\\1 *> >");
67 static std::regex
const reOneToOne(
"edm::AssociationMap< *edm::OneToOne<(.*?),(.*?), *u[a-z]*> >");
68 static std::regex
const reOneToMany(
"edm::AssociationMap< *edm::OneToMany<(.*?),(.*?), *u[a-z]*> >");
69 static std::regex
const reOneToValue(
"edm::AssociationMap< *edm::OneToValue<(.*?),(.*?), *u[a-z]*> >");
71 "edm::AssociationMap<edm::OneToManyWithQuality<(.*?), *(.*?), *(.*?), *u[a-z]*> >");
72 static std::regex
const reToVector(
"edm::AssociationVector<(.*), *(.*), *edm::Ref.*,.*>");
74 static std::regex
const reToRangeMap(
"edm::RangeMap< *(.*), *(.*), *edm::ClonePolicy<([^>]*)> >");
77 "edm::RefVector< *(.*)< *(.*) *>, *\\2 *, *edm::refhelper::FindUsingAdvance< *\\1< *\\2 *> *, *\\2 *> *>");
79 "edm::RefVector< *(.*) *, *(.*) *, *edm::refhelper::FindUsingAdvance< *\\1, *\\2 *> *>");
81 "edm::RefVector< *Association(.*) *, *edm::helper(.*), *Association(.*)::Find>");
85 using std::regex_replace;
123 if (std::string_view{
result}.substr(0, 5) ==
"const") {
124 leadingConst =
"const";
128 if constexpr (
debug) {
129 std::cout <<
prefix <<
"subFriendlyName iFullName " << iFullName <<
" result " <<
result << std::endl;
136 result2 = regex_replace(
result,
reUniquePtr,
"UniquePtr", std::regex_constants::format_first_only);
147 if constexpr (
debug) {
151 if constexpr (
debug) {
154 std::cout <<
prefix <<
" aMatch " << aMatch <<
" theSub " << theSub << std::endl;
156 regex
const eMatch(
std::string(
"(^[^<]*)<") + aMatch +
">");
165 if constexpr (
debug) {
166 std::cout <<
prefix <<
"handleTemplateArguments " << iIn <<
" removeExtraSpaces " <<
result << std::endl;
174 result2.reserve(iIn.size());
175 unsigned int openTemplate = 0;
176 bool hadTemplate =
false;
193 if (
const bool hasComma =
result[
i] ==
',', hasColon = hadTemplate and
result[
i] ==
':';
194 openTemplate == 0 and (hasComma
or hasColon)) {
196 if constexpr (
debug) {
197 std::cout <<
prefix <<
" templateClass " << templateClass << std::endl;
200 if constexpr (
debug) {
204 if constexpr (
debug) {
207 std::cout <<
prefix <<
" friendlierName " << friendlierName << std::endl;
209 result2 += friendlierName;
211 result2 += templateClass;
213 if constexpr (
debug) {
228 if constexpr (
debug) {
234 if constexpr (
debug) {
235 std::cout <<
"\nfriendlyName for " << iFullName << std::endl;
238 typedef tbb::concurrent_unordered_map<std::string, std::string> Map;
239 static Map s_fillToFriendlyName;
240 auto itFound = s_fillToFriendlyName.find(iFullName);
241 if (s_fillToFriendlyName.end() == itFound) {
242 itFound = s_fillToFriendlyName
246 if constexpr (
debug) {
247 std::cout <<
"result " << itFound->second << std::endl;
249 return itFound->second;
static const std::regex rePointer("\\*")
std::string removeExtraSpaces(std::string const &iIn)
static const std::regex reToRefs2("edm::RefVector< *(.*) *, *(.*) *, *edm::refhelper::FindUsingAdvance< *\\1, *\\2 *> *>")
static const std::regex reString("std::basic_string<char>")
static const std::regex reLongLong("Long64_t")
static const std::regex reWrapper("edm::Wrapper<(.*)>")
static const std::regex reOneToValue("edm::AssociationMap< *edm::OneToValue<(.*?),(.*?), *u[a-z]*> >")
static const std::string emptyString("")
std::string subFriendlyName(std::string const &iFullName)
static const std::regex reToRangeMap("edm::RangeMap< *(.*), *(.*), *edm::ClonePolicy<([^>]*)> >")
static const std::regex reArray("\\[\\]")
std::string removeAllSpaces(std::string const &iIn)
static const std::regex reToRefs1("edm::RefVector< *(.*)< *(.*) *>, *\\2 *, *edm::refhelper::FindUsingAdvance< *\\1< *\\2 *> *, *\\2 *> *>")
static const std::regex reColons("::")
static const std::regex reLong("long ")
static const std::regex reToVector("edm::AssociationVector<(.*), *(.*), *edm::Ref.*,.*>")
static const std::regex reOneToOne("edm::AssociationMap< *edm::OneToOne<(.*?),(.*?), *u[a-z]*> >")
static const std::regex reTemplateArgs("[^<]*<(.*)>$")
static const std::regex reString3("std::basic_string<char,std::char_traits<char> >")
std::string handleNamespaces(std::string const &iIn)
static const std::regex reAIKR(", *edm::helper::AssociationIdenticalKeyReference")
static const std::regex reUniquePtr("^std::unique_ptr")
static const std::regex reUniquePtrDeleter("^std::unique_ptr< *(.*), *std::default_delete<\\1> *>")
static const std::regex reSorted("edm::SortedCollection<(.*), *edm::StrictWeakOrdering<\\1 *> >")
std::string friendlyName(std::string const &iFullName)
static const std::regex reUnsigned("unsigned ")
static const std::regex reComma(",")
static const std::regex reToRefsAssoc("edm::RefVector< *Association(.*) *, *edm::helper(.*), *Association(.*)::Find>")
static const std::regex reOneToMany("edm::AssociationMap< *edm::OneToMany<(.*?),(.*?), *u[a-z]*> >")
std::string handleTemplateArguments(std::string const &)
Container::value_type value_type
static const std::regex reEndSpace(" +$")
static const std::regex reULongLong("ULong64_t")
static const std::regex reOwnVector("edm::OwnVector<(.*), *edm::ClonePolicy<\\1 *> >")
std::string standardRenames(std::string const &iIn)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
static const std::regex reCXX11("std::__cxx11::")
static const std::regex reAllSpaces(" +")
static const std::regex reBeginSpace("^ +")
static const std::regex reclangabi("std::__1::")
static const std::regex reVector("std::vector")
static const std::regex reOneToManyWithQuality("edm::AssociationMap<edm::OneToManyWithQuality<(.*?), *(.*?), *(.*?), *u[a-z]*> >")
static const std::regex reSharedPtr("std::shared_ptr")
static const std::regex reString2("std::string")