11 #include "Reflex/Type.h"
12 #include "boost/thread/tss.hpp"
26 std::string typeToClassName(std::type_info
const& iType) {
29 #if GCC_PREREQUISITE(3,0,0)
37 theError <<
"TypeID::className: No dictionary for class " << iType.name() <<
'\n';
43 <<
"TypeID::className: No dictionary for class " << iType.name() <<
'\n';
46 return t.Name(Reflex::SCOPED);
52 typedef std::map<edm::TypeID, std::string> Map;
53 static boost::thread_specific_ptr<Map> s_typeToName;
54 if(0 == s_typeToName.get()){
55 s_typeToName.reset(
new Map);
57 Map::const_iterator itFound = s_typeToName->find(*
this);
58 if(s_typeToName->end() == itFound) {
61 return itFound->second;
67 if (theName.find(
"edm::Wrapper") == 0) {
80 std::string
const spec(
"<,>");
81 char const space =
' ';
83 if (idx == std::string::npos) {
88 if (theName[idx] ==
'<') {
89 after = theName.rfind(
'>');
90 assert (after != std::string::npos);
93 theName = theName.substr(0, idx);
96 while (space == theName[--idxa]) --after;
98 while (space == theName[idxf++]) ++
first;
99 theName = theName.substr(first, after - first);
106 bool ret = (idx != std::string::npos);
109 theName = theName.substr(idx);
116 return bool(Reflex::Type::ByTypeInfo(
typeInfo()));
void print(std::ostream &os) const
static bool stripNamespace(std::string &theName)
const std::type_info & typeInfo() const
bool hasDictionary() const
void typeDemangle(char const *mangledName, std::string &demangledName)
std::string friendlyName(std::string const &iFullName)
Container::value_type value_type
std::string className() const
static bool stripTemplate(std::string &theName)
std::string userClassName() const
T first(std::pair< T, U > const &p)
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
std::string friendlyClassName() const