100 #define RTLD_DEFAULT ((void *)::GetModuleHandle(NULL)) 101 #define dlsym(library, function_name) ::GetProcAddress((HMODULE)library, function_name) 126 class TMmallocDescTemp {
130 TMmallocDescTemp(
void *value = 0) :
157 auto strLen = strlen(name);
158 if (strLen == 0)
return;
160 const char* endCharPtr = strchr(name,
'<');
161 endCharPtr = !endCharPtr ? &name[strLen] : endCharPtr;
163 const char* beginCharPtr = endCharPtr;
164 while (beginCharPtr!=name){
165 if (*beginCharPtr==
':'){
171 beginCharPtr = beginCharPtr!=endCharPtr ? beginCharPtr :
name;
172 std::string
s(beginCharPtr, endCharPtr);
174 printf(
"TDeclNameRegistry::AddQualifiedName Adding key %s for class/namespace %s\n", s.c_str(),
name);
196 printf(
"TDeclNameRegistry Destructor. List of %lu names:\n",
199 printf(
" - %s\n", key.c_str());
230 struct ObjRepoValue {
231 ObjRepoValue(
const TClass *what,
Version_t version) : fClass(what),fVersion(version) {}
256 std::pair<RepoCont_t::iterator, Bool_t> tmp =
gObjectVersionRepository.insert(RepoCont_t::value_type>(location, RepoCont_t::mapped_type(what,version)));
258 Warning(where,
"Reregistering an object of class '%s' version %d at address %p", what->
GetName(), version, p);
262 Warning(where,
"Failed to reregister an object of class '%s' version %d at address %p", what->
GetName(), version, location);
275 RepoCont_t::iterator tmp = cur++;
276 if ((tmp->first == location) && (tmp->second.fVersion == what->
GetClassVersion())) {
292 size_t objsize = what->
Size();
293 long delta = (
char*)newadd - (
char*)oldadd;
297 RepoCont_t::iterator tmp = cur++;
298 if (oldadd <= tmp->
first && tmp->first < ( ((
char*)oldadd) + objsize) ) {
301 gObjectVersionRepository.insert(RepoCont_t::value_type(((
char*)tmp->first)+delta, RepoCont_t::mapped_type(tmp->second.fClass,tmp->second.fVersion)));
314 #define R__USE_STD_MAP 315 class TMapTypeToTClass {
316 #if defined R__USE_STD_MAP 320 typedef std::map<std::string,TClass*>
IdMap_t;
321 typedef IdMap_t::key_type key_type;
322 typedef IdMap_t::const_iterator const_iterator;
323 typedef IdMap_t::size_type size_type;
326 typedef TClass* mapped_type;
328 typedef IdMap_t::mapped_type mapped_type;
335 void Add(
const key_type &key, mapped_type &obj)
340 mapped_type
Find(
const key_type &key)
const 343 IdMap_t::const_iterator iter = fMap.find(key);
345 if (iter != fMap.end()) cl = iter->second;
348 void Remove(
const key_type &key) {
357 #ifdef R__COMPLETE_MEM_TERMINATION 366 void Add(
const char *key,
TClass *&obj) {
368 fMap.
Add(realkey, obj);
375 void Remove(
const char *key) {
383 class TMapDeclIdToTClass {
386 typedef multimap<TDictionary::DeclId_t, TClass*>
DeclIdMap_t;
387 typedef DeclIdMap_t::key_type key_type;
388 typedef DeclIdMap_t::mapped_type mapped_type;
389 typedef DeclIdMap_t::const_iterator const_iterator;
390 typedef std::pair <const_iterator, const_iterator> equal_range;
391 typedef DeclIdMap_t::size_type size_type;
397 void Add(
const key_type &key, mapped_type obj)
400 std::pair<const key_type, mapped_type> pair = make_pair(key, obj);
403 size_type CountElementsWithKey(
const key_type &key)
405 return fMap.count(key);
407 equal_range
Find(
const key_type &key)
const 410 return fMap.equal_range(key);
412 void Remove(
const key_type &key) {
421 #ifdef R__COMPLETE_MEM_TERMINATION 423 return &gIdMapObject;
432 #ifdef R__COMPLETE_MEM_TERMINATION 434 return &gDeclIdMapObject;
449 gROOT->GetListOfClasses()->Add(cl);
463 if (!cl || !
id)
return;
475 gROOT->GetListOfClasses()->Remove(oldcl);
507 TDumpMembers(
bool noAddr): fNoAddr(noAddr) { }
524 void TDumpMembers::Inspect(
TClass *cl,
const char *pname,
const char *mname,
const void *add,
Bool_t )
526 const Int_t kvalue = 30;
528 const Int_t ktitle = 50;
530 const Int_t ktitle = 42;
532 const Int_t kline = 1024;
540 const char *memberName;
541 const char *memberFullTypeName;
542 const char *memberTitle;
547 if (member->GetDataType()) {
548 memberDataType = (
EDataType)member->GetDataType()->GetType();
550 memberName = member->GetName();
551 memberFullTypeName = member->GetFullTypeName();
552 memberTitle = member->GetTitle();
553 isapointer = member->IsaPointer();
554 isbasic = member->IsBasic();
561 const char *cursor = mname;
562 while ( (*cursor)==
'*' ) ++cursor;
563 TString elname( cursor );
564 Ssiz_t pos = elname.Index(
"[");
565 if ( pos !=
kNPOS ) {
566 elname.Remove( pos );
569 if (!element)
return;
574 memberName = element->
GetName();
577 membertype =
gROOT->GetType(memberFullTypeName);
579 isbasic = membertype !=0;
586 if (strcmp(memberName,
"fDatime") == 0 && memberDataType ==
kUInt_t) {
590 if (strcmp(memberName,
"fBits") == 0 && memberDataType ==
kUInt_t) {
595 static TClassRef stdClass(
"std::string");
596 Bool_t isStdString = (dataClass == stdClass);
599 for (i = 0;i < kline; i++) line[i] =
' ';
601 snprintf(line,kline,
"%s%s ",pname,mname);
602 i = strlen(line); line[i] =
' ';
605 char *pointer = (
char*)add;
606 char **ppointer = (
char**)(pointer);
609 char **p3pointer = (
char**)(*ppointer);
611 snprintf(&line[kvalue],kline-kvalue,
"->0");
616 }
else if (membertype) {
618 i = strlen(*ppointer);
619 if (kvalue+i > kline) i=kline-1-kvalue;
621 for (
Int_t j = 0; j < i; j++) {
622 if (!std::isprint((*ppointer)[j])) {
628 strncpy(line + kvalue, *ppointer, i);
634 strncpy(&line[kvalue], membertype->
AsString(p3pointer),
TMath::Min(kline-1-kvalue,(
int)strlen(membertype->
AsString(p3pointer))));
636 }
else if (!strcmp(memberFullTypeName,
"char*") ||
637 !strcmp(memberFullTypeName,
"const char*")) {
638 i = strlen(*ppointer);
639 if (kvalue+i >= kline) i=kline-1-kvalue;
641 for (
Int_t j = 0; j < i; j++) {
642 if (!std::isprint((*ppointer)[j])) {
648 strncpy(line + kvalue, *ppointer, i);
658 }
else if (membertype) {
660 cdatime = (
UInt_t*)pointer;
662 snprintf(&line[kvalue],kline-kvalue,
"%d/%d",cdate,ctime);
670 std::string *str = (std::string*)pointer;
671 snprintf(&line[kvalue],kline-kvalue,
"%s",str->c_str());
672 }
else if (isTString) {
673 TString *str = (TString*)pointer;
674 snprintf(&line[kvalue],kline-kvalue,
"%s",str->Data());
682 if (isdate ==
kFALSE && strcmp(memberFullTypeName,
"char*") && strcmp(memberFullTypeName,
"const char*")) {
683 i = strlen(&line[0]); line[i] =
' ';
684 Int_t lentit = strlen(memberTitle);
685 if (lentit > 250-ktitle) lentit = 250-ktitle;
686 strncpy(&line[ktitle],memberTitle,lentit);
687 line[ktitle+lentit] = 0;
709 void *fRealDataObject;
713 TBuildRealData(
void *obj,
TClass *cl) {
715 fRealDataObject = obj;
726 void TBuildRealData::Inspect(
TClass* cl,
const char* pname,
const char* mname,
const void* add,
Bool_t isTransient)
738 isTransientMember =
kTRUE;
742 TString rname( pname );
745 if (cl != fRealDataClass) {
746 if (!fRealDataClass->InheritsFrom(cl)) {
747 Ssiz_t dot = rname.Index(
'.');
752 if (!fRealDataClass->GetDataMember(rname)) {
767 if (!fRealDataClass->GetBaseDataMember(rname)) {
782 fRealDataClass->GetListOfRealData()->Add(rd);
792 fRealDataClass->GetListOfRealData()->Add(rd);
837 void* addrForRecursion = 0;
838 if (GetObjectValidity() == kValidObjectGiven)
839 addrForRecursion =
const_cast<void*
>(add);
846 fRealDataClass->GetListOfRealData()->Add(rd);
863 fBrowser =
b; fCount = 0; }
864 virtual ~TAutoInspector() { }
867 virtual Bool_t IsTreatingNonAccessibleTypes() {
return kFALSE;}
873 void TAutoInspector::Inspect(
TClass *cl,
const char *tit,
const char *
name,
874 const void *addr,
Bool_t )
876 if(tit && strchr(tit,
'.')) return ;
877 if (fCount && !fBrowser)
return;
884 int ln = strcspn(
name,
"[ ");
885 TString iname(
name,ln);
888 if (!classInfo)
return;
897 mname.ReplaceAll(
"*",
"");
898 if ((found = (iname==mname)))
break;
910 if (mname ==
"G__virtualinfo")
return;
912 int size =
sizeof(
void*);
932 for(
int i=0; i<nmax; i++) {
934 char *ptr = (
char*)addr + i*size;
941 if (!fBrowser)
return;
949 bwname = actualClass->
GetName();
955 bwname.Length()==0 ||
956 strcmp(bwname.Data(),actualClass->
GetName())==0) {
958 int l = strcspn(bwname.Data(),
"[ ");
959 if (l<bwname.Length() && bwname[
l]==
'[') {
960 char cbuf[13];
snprintf(cbuf,13,
"[%02d]",i);
961 ts.Replace(0,999,bwname,l);
963 bwname = (
const char*)ts;
969 fBrowser->Add(obj,clm,bwname);
976 fBrowser->Add( obj, clm, bwname );
982 int sz = proxy->
Size();
984 char fmt[] = {
"#%09d"};
985 fmt[3] =
'0'+(int)
log10(
double(sz))+1;
987 for (
int ii=0;ii<sz;ii++) {
988 void *p = proxy->
At(ii);
1000 fBrowser->Add( p, actualCl, ts );
1039 TMmallocDescTemp setreset;
1075 ::Fatal(
"TClass::TClass",
"ROOT system not initialized");
1078 TMmallocDescTemp setreset;
1085 ::Fatal(
"TClass::TClass",
"gInterpreter not initialized");
1089 ::
Warning(
"TClass::TClass",
"no dictionary for class %s is available", name);
1120 Init(name, cversion, 0, 0, 0, 0, -1, -1, 0, silent);
1156 "A TClass entry cannot be initialized in a state different from kForwardDeclared or kEmulated.");
1157 Init(name, cversion, 0, 0, 0, 0, -1, -1, 0, silent);
1193 ::Fatal(
"TClass::TClass",
"ROOT system not initialized");
1199 ::Fatal(
"TClass::TClass",
"gInterpreter not initialized");
1201 if (!classInfo || !
gInterpreter->ClassInfo_IsValid(classInfo)) {
1208 Init(
fName, cversion, 0, 0, dfil, ifil, dl, il, classInfo, silent);
1241 Init(name,cversion, 0, 0, dfil, ifil, dl, il, 0, silent);
1250 const char *dfil,
const char *ifil,
Int_t dl,
Int_t il,
1273 Init(name, cversion, &info, isa, dfil, ifil, dl, il, 0, silent);
1291 info->
Clear(
"build");
1307 const char *dfil,
const char *ifil,
Int_t dl,
Int_t il,
1308 ClassInfo_t *givenInfo,
1312 ::Fatal(
"TClass::TClass",
"ROOT system not initialized");
1313 if (!name || !name[0]) {
1314 ::Error(
"TClass::Init",
"The name parameter is invalid (null or empty)");
1348 TClass **persistentRef = 0;
1366 info->
Clear(
"build");
1385 ::Fatal(
"TClass::Init",
"gInterpreter not initialized");
1388 bool invalid = !
gInterpreter->ClassInfo_IsValid(givenInfo);
1389 bool notloaded = !
gInterpreter->ClassInfo_IsLoaded(givenInfo);
1390 auto property =
gInterpreter->ClassInfo_Property(givenInfo);
1392 if (invalid || (notloaded && (property &
kIsNamespace)) ||
1455 ::Error(
"TClass::Init",
"no interpreter information for class %s is available even though it has a TClass " 1456 "initialization routine.",
1462 ::Warning(
"TClass::Init",
"no dictionary for class %s is available",
fName.Data());
1473 TString resolvedThis;
1474 if (!givenInfo && strchr (name,
'<')) {
1475 if (
fName != name) {
1486 if (resolvedThis != name) {
1510 if (resolvedThis !=
fName) {
1511 oldcl = (
TClass*)
gROOT->GetListOfClasses()->FindObject(resolvedThis);
1512 if (oldcl && oldcl !=
this) {
1518 while (
TNameMapNode* htmp = static_cast<TNameMapNode*> (next()) ) {
1519 if (resolvedThis != htmp->String())
continue;
1520 oldcl = (
TClass*)
gROOT->GetListOfClasses()->FindObject(htmp->fOrigName);
1521 if (oldcl && oldcl !=
this) {
1539 if (persistentRef) {
1546 if ( isStl || !strncmp(
GetName(),
"stdext::hash_",13) || !strncmp(
GetName(),
"__gnu_cxx::hash_",16) ) {
1557 }
else if (!silent) {
1558 Warning(
"Init",
"Collection proxy for %s was not properly initialized!",
GetName());
1564 }
else if (!strncmp(
GetName(),
"std::pair<",10) || !strncmp(
GetName(),
"pair<",5) ) {
1583 while (
TNameMapNode* htmp = static_cast<TNameMapNode*> (next()) ) {
1584 if (resolvedThis == htmp->String() && htmp->fOrigName ==
GetName()) {
1651 std::map<std::string, TObjArray*>::iterator it;
1652 std::map<std::string, TObjArray*>::iterator end = (*fConversionStreamerInfo).end();
1653 for( it = (*fConversionStreamerInfo).begin(); it != end; ++it ) {
1663 Int_t ReadRulesContent(FILE *f)
1675 while ((c = fgetc(f)) != EOF) {
1681 if (rule.Length() > 0) {
1733 static const char *suffix =
"class.rules";
1734 TString sname = suffix;
1739 FILE * f = fopen(sname,
"r");
1741 res = ReadRulesContent(f);
1744 ::Error(
"TClass::ReadRules()",
"Cannot find rules file %s", sname.Data());
1757 if (!filename || !filename[0]) {
1758 ::Error(
"TClass::ReadRules",
"no file name specified");
1762 FILE * f = fopen(filename,
"r");
1764 ::Error(
"TClass::ReadRules",
"Failed to open %s\n",filename);
1767 Int_t count = ReadRulesContent(f);
1820 ::Warning(
"TClass::AddRule",
"The rule for class: \"%s\": version, \"%s\" and data members: \"%s\" has been skipped because it conflicts with one of the other rules (%s).",
1881 TAutoInspector insp(b);
1882 obj->ShowMembers(insp);
1903 }
else if (actual !=
this) {
1904 return actual->
Browse(obj, b);
1910 TAutoInspector insp(b);
1953 isTransient =
kTRUE;
1958 TMmallocDescTemp setreset;
1969 static TClassRef clRefString(
"std::string");
1970 if (clRefString ==
this) {
1979 && strncmp(
GetName(),
"pair<", 5) != 0) {
1980 Error(
"BuildRealData",
"Inspection for %s not supported!",
GetName());
1986 TBuildRealData brd(pointer,
this);
1992 if ( isTransient ) {
2000 Error(
"BuildRealData",
"Cannot find any ShowMembers function for %s!",
GetName());
2035 Error(
"BuildEmulatedRealData",
"Missing StreamerInfo for %s",
GetName());
2044 Long_t eoffset = element->GetOffset();
2045 TClass *cle = element->GetClassPointer();
2054 TString rdname; rdname.Form(
"%s%s",name,element->GetFullName());
2059 rdname.Form(
"%s%s.",name,element->GetFullName());
2063 TString rdname; rdname.Form(
"%s%s",name,element->GetFullName());
2077 Int_t etype = element->GetType();
2080 Long_t eoffset = element->GetOffset();
2081 TClass *cle = element->GetClassPointer();
2101 TMmallocDescTemp setreset;
2128 if (strcmp(
GetName(),
"string") == 0) {
2136 gInterpreter->InspectMembers(insp, obj,
this, isTransient);
2140 sinfo->CallShowMembers(obj, insp, isTransient);
2155 return gInterpreter->InspectMembers(insp, obj,
this, isTransient);
2189 TClass *clbase = element->GetClassPointer();
2263 static TClassRef stdStringClass(
"std::string");
2328 if (new_name == 0 || new_name[0]==
'\0' ||
fName == new_name) {
2329 Error(
"Clone",
"The name of the class must be changed when cloning a TClass object.");
2359 copy->
fName = new_name;
2414 if (!padsav || !opt.Contains(
"same")) {
2417 gROOT->ProcessLine(
"new TCanvas(\"R__class\",\"class\",20,20,1000,750);");
2423 if (
gPad)
gPad->DrawClassObject(
this,option);
2425 if (padsav) padsav->
cd();
2466 if (
sizeof(
this) == 4)
2469 Printf(
"==> Dumping object at: 0x%016lx, name=%s, class=%s\n",prObj,tobj->
GetName(),
GetName());
2472 if (
sizeof(
this) == 4)
2473 Printf(
"==> Dumping object at: 0x%08lx, class=%s\n",prObj,
GetName());
2475 Printf(
"==> Dumping object at: 0x%016lx, class=%s\n",prObj,
GetName());
2478 TDumpMembers dm(noAddr);
2480 Info(
"Dump",
"No ShowMembers function, dumping disabled");
2490 static const UInt_t maxsize = 255;
2491 static char name[maxsize+2];
2493 UInt_t nch = strlen(text);
2495 for (
UInt_t i = 0; i < nch && icur < maxsize; ++i, ++icur) {
2496 if (text[i] ==
'\"' || text[i] ==
'[' || text[i] ==
'~' ||
2497 text[i] ==
']' || text[i] ==
'&' || text[i] ==
'#' ||
2498 text[i] ==
'!' || text[i] ==
'^' || text[i] ==
'<' ||
2499 text[i] ==
'?' || text[i] ==
'>') {
2503 name[icur] = text[i];
2529 if (
object==0)
return (
TClass*)
this;
2531 return (*
fIsA)(object);
2542 return realTObject->IsA();
2559 return (*
fIsA)(object);
2577 if (strcmp(
GetName(), classname) == 0)
return this;
2596 if (cl ==
this)
return this;
2608 if (cl == c)
return c;
2627 if (cl ==
this)
return 0;
2629 if (!
fBase.load()) {
2636 if (!sinfo)
return -1;
2642 for(
Int_t i=0; i<size; i++) {
2648 if (!baseclass)
return -1;
2650 if (subOffset == -2)
return -2;
2651 if (subOffset != -1)
return offset+subOffset;
2652 offset += baseclass->
Size();
2656 if (!baseclass)
return -1;
2658 if (subOffset == -2)
return -2;
2659 if (subOffset != -1)
return offset+subOffset;
2660 offset += baseclass->
Size();
2663 Error(
"GetBaseClassOffsetRecurse",
"Unexpected element type for base class: %s\n",element->IsA()->
GetName());
2675 if (
fBase.load() == 0)
2678 lnk =
fBase.load()->FirstLink();
2695 if (off == -2)
return -2;
2714 if (
this == toBase)
return 0;
2730 if(derived && base) {
2752 if (dm)
return this;
2761 if (cdm)
return cdm;
2772 struct TClassLocalStorage {
2778 static TClassLocalStorage *GetStorage(
const TClass *cl)
2784 if (*thread_ptr==0) *thread_ptr =
new TExMap();
2791 local = (
ULong_t)
new TClassLocalStorage();
2794 return (TClassLocalStorage*)local;
2822 TClassLocalStorage *local = TClassLocalStorage::GetStorage(
this);
2825 return local->fCollectionProxy;
2836 TClassLocalStorage *local = TClassLocalStorage::GetStorage(
this);
2838 if (local->fStreamer==0) {
2840 const std::type_info &orig = (
typeid(*fStreamer) );
2841 if (!local->fStreamer) {
2842 Warning(
"GetStreamer",
"For %s, the TClassStreamer (%s) passed's call to Generate failed!",
GetName(),orig.name());
2844 const std::type_info © = (
typeid(*local->fStreamer) );
2845 if (strcmp(orig.name(),copy.name())!=0) {
2846 Warning(
"GetStreamer",
"For %s, the TClassStreamer passed does not properly implement the Generate method (%s vs %s)\n",
GetName(),orig.name(),copy.name());
2850 return local->fStreamer;
2889 if (!name || !name[0])
return 0;
2891 if (strstr(name,
"(anonymous)"))
return 0;
2892 if (strncmp(name,
"class ",6)==0) name += 6;
2893 if (strncmp(name,
"struct ",7)==0) name += 7;
2895 if (!
gROOT->GetListOfClasses())
return 0;
2911 cl = (
TClass*)
gROOT->GetListOfClasses()->FindObject(name);
2941 if (!cl && !load)
return 0;
2943 TClass *loadedcl = (dict)();
2953 std::string normalizedName;
2961 if (normalizedName != name) {
2962 cl = (
TClass*)
gROOT->GetListOfClasses()->FindObject(normalizedName.c_str());
2973 normalizedName = cl->
GetName();
2974 checkTable = load && (normalizedName !=
name);
2977 if (!load)
return 0;
3003 if (
TDataType* theDataType =
gROOT->GetType(normalizedName.c_str())){
3005 auto underlyingTypeName = theDataType->GetTypeName();
3008 if (underlyingTypeDict){
3009 loadedcl = underlyingTypeDict();
3015 if (loadedcl)
return loadedcl;
3019 if (loadedcl)
return loadedcl;
3032 std::string::size_type posLess = normalizedName.find(
'<');
3033 if (posLess != std::string::npos) {
3040 printf(
"TClass::GetClass: Header Parsing - The representation of %s was not found in the type system. A lookup in the interpreter is about to be tried: this can cause parsing. This can be avoided selecting %s in the linkdef/selection file.\n",normalizedName.c_str(), normalizedName.c_str());
3042 if (normalizedName.length()) {
3052 auto ci =
gInterpreter->ClassInfo_Factory(normalizedName.c_str());
3054 auto method =
gInterpreter->MethodInfo_Factory(funcDecl);
3055 typedef void (*tcling_callfunc_Wrapper_t)(
void *, int,
void **,
void *);
3056 auto funcPtr = (tcling_callfunc_Wrapper_t)
gInterpreter->MethodInfo_InterfaceMethod(method);
3060 funcPtr(0, 0,
nullptr, &res);
3072 std::string alternative;
3073 gInterpreter->GetInterpreterTypeName(normalizedName.c_str(), alternative,
kTRUE);
3074 const char *altname = alternative.c_str();
3075 if (strncmp(altname,
"std::", 5) == 0) {
3080 if (altname != normalizedName && strcmp(altname, name) != 0) {
3107 if (!
gROOT->GetListOfClasses())
3115 if (cl && cl->
IsLoaded())
return cl;
3122 cl =
GetIdMap()->Find(typeinfo.name());
3141 if (!load)
return 0;
3151 TIter next(
gROOT->GetListOfClassGenerators());
3163 if (!autoload_old) {
3195 if (!
gROOT->GetListOfClasses())
return 0;
3209 if (cl->IsLoaded())
return cl;
3216 if (!load)
return 0;
3219 if (cl) loadedcl =
gROOT->LoadClass(cl->GetName(),silent);
3220 else loadedcl =
gROOT->LoadClass(
name,silent);
3222 if (loadedcl)
return loadedcl;
3247 if (!
gROOT->GetListOfClasses())
return 0;
3251 DeclIdMap_t::equal_range iter = map->Find(
id);
3252 if (iter.first == iter.second)
return false;
3253 std::vector<TClass*>::iterator vectIt = classes.begin();
3254 for (DeclIdMap_t::const_iterator it = iter.first; it != iter.second; ++it)
3255 vectIt = classes.insert(vectIt, it->second);
3283 || datamember == 0)
return 0;
3286 const char *start_name = datamember;
3287 while (*start_name ==
'*') ++start_name;
3292 if (
const char *
s = strchr(start_name,
'[')){
3294 TString
name(start_name,len);
3312 if (strchr(name,
'[')==0) {
3354 std::string givenName(name);
3357 std::string::size_type firstBracket = givenName.find_first_of(
"[");
3358 if (firstBracket != std::string::npos) {
3360 std::string nameNoDim(givenName.substr(0, firstBracket));
3363 TObject* obj = lnk->GetObject();
3364 std::string objName(obj->
GetName());
3365 std::string::size_type pos = objName.find_first_of(
"[");
3367 if (pos != std::string::npos) {
3369 if (objName == nameNoDim) {
3378 std::ostringstream ptrname;
3379 ptrname <<
"*" << givenName;
3386 std::string::size_type firstDot = givenName.find_first_of(
".");
3387 if (firstDot == std::string::npos) {
3398 std::string::size_type lastDot = givenName.find_last_of(
".");
3399 std::ostringstream starname;
3400 starname << givenName.substr(0, lastDot) <<
".*" << givenName.substr(lastDot + 1);
3408 std::string firstDotName(givenName.substr(firstDot + 1));
3422 std::string::size_type firstDotBracket = firstDotName.find_first_of(
"[");
3423 if (firstDotBracket != std::string::npos) {
3425 std::string nameNoDim(firstDotName.substr(0, firstDotBracket));
3428 TObject* obj = lnk->GetObject();
3429 std::string objName(obj->
GetName());
3430 std::string::size_type pos = objName.find_first_of(
"[");
3432 if (pos != std::string::npos) {
3434 if (objName == nameNoDim) {
3447 ptrname <<
"*" << firstDotName;
3463 std::string::size_type bracket = starname.str().find_first_of(
"[");
3464 if (bracket == std::string::npos) {
3509 if (!
fBase.load()) {
3534 Fatal(
"GetListOfBases",
"gInterpreter not initialized");
3537 if (!
fBase.load()) {
3563 auto temp =
fEnums.load();
3565 if (requestListLoading) {
3580 if (!requestListLoading) {
3587 static bool fromRootCling = dlsym(RTLD_DEFAULT,
"usedToIdentifyRootClingByDlSym");
3672 if (
gDebug>0)
Info(
"GetListOfMethods",
"Header Parsing - Asking for all the methods of class %s: this can involve parsing.",
GetName());
3705 if (
gDebug>0)
Info(
"GetListOfAllPublicMethods",
"Header Parsing - Asking for all the methods of class %s: this can involve parsing.",
GetName());
3735 while ((baseClass = (
TBaseClass *) nextBase())) {
3743 while ((method = (
TMethod*)next())) {
3802 TIter nextMemb(ldm);
3833 for (
int i = 0; i < 2; i++) {
3849 if (
this == sCIString)
return;
3852 if (strncmp(
fName,
"pair<", 5) == 0) {
3860 if (uniquePtrCl && !uniquePtrCl->HasDictionary()) {
3909 if (
this == sCIString)
return;
3913 if (strncmp(
fName,
"pair<", 5) == 0) {
3968 while ((acl = (
TClass*)nextClass())) {
3969 if (acl == newcl)
continue;
3971 TIter nextInfo(acl->GetStreamerInfos());
3974 info->
Update(
this, newcl);
3977 if (acl->GetCollectionProxy()) {
3978 acl->GetCollectionProxy()->UpdateValueClass(
this, newcl);
3983 TIter delIter( &tobedeleted );
3984 while ((acl = (
TClass*)delIter())) {
3997 Warning(
"ResetClassInfo(Long_t tagnum)",
"Call to deprecated interface (does nothing)");
4048 (*fMethod).Unload();
4082 if (options==0 || options[0]==0)
return;
4084 if (strstr(options,
"streamerinfo")!=0) {
4088 std::map<std::string, TObjArray*>::iterator it;
4089 std::map<std::string, TObjArray*>::iterator end = (*fConversionStreamerInfo).end();
4090 for( it = (*fConversionStreamerInfo).begin(); it != end; ++it ) {
4091 it->second->ls(options);
4118 TIter next(methodList);
4120 while ((method = (
TMethod*) next())) {
4122 if (classPtr != method->
GetClass()) {
4130 TIter nextarg(margsList);
4131 while ((methodArg = (
TMethodArg*)nextarg())) {
4134 if (sig.Length()!=0) sig.Remove(0,1);
4181 if(
fMethod.compare_exchange_strong(expected, temp.get()) ) {
4239 Fatal(
"GetMethod",
"gInterpreter not initialized");
4245 if (!decl)
return 0;
4252 "\nDid not find matching TMethod <%s> with \"%s\" %sfor %s",
4253 method,params,objectIsConst ?
"const " :
"",
GetName());
4263 return static_cast<TMethod *
>(method);
4266 if (
auto base = static_cast<TBaseClass *>(item)->GetClassPointer())
4267 if (
TFunction* method = base->FindClassOrBaseMethodWithId(declId))
4268 return static_cast<TMethod *>(method);
4285 Fatal(
"GetMethodWithPrototype",
"gInterpreter not initialized");
4289 objectIsConst, mode);
4291 if (!decl)
return 0;
4294 Error(
"GetMethodWithPrototype",
4295 "\nDid not find matching TMethod <%s> with \"%s\" %sfor %s",
4296 method,proto,objectIsConst ?
"const " :
"",
GetName());
4310 while ((m = (
TMethod *) next())) {
4330 Fatal(
"GetClassMethod",
"gInterpreter not initialized");
4336 if (!decl)
return 0;
4356 Fatal(
"GetClassMethodWithPrototype",
"gInterpreter not initialized");
4363 if (!decl)
return 0;
4455 Error(
"GetStreamerInfo",
"class: %s, attempting to access a wrong version: %d",
GetName(), version);
4474 TMmallocDescTemp setreset;
4528 newname +=
"@@emulated";
4553 for (
Int_t i = -1; sinfo == 0 && i < ninfos; ++i)
4566 Error(
"GetStreamerInfoAbstractEmulated",
"could not create TVirtualStreamerInfo");
4591 newname +=
"@@emulated";
4606 if (!sinfo && (checksum !=
fCheckSum)) {
4616 for (
Int_t i = -1; sinfo == 0 && i < ninfos; ++i)
4629 Error(
"GetStreamerInfoAbstractEmulated",
"could not create TVirtualStreamerInfo");
4676 Error(
"IgnoreTObjectStreamer",
"Must be called before the creation of StreamerInfo");
4702 if (cl ==
this)
return kTRUE;
4711 TClass *clbase = element->GetClassPointer();
4712 if (!clbase)
return kFALSE;
4719 if (((
TClass *)
this)->GetBaseClass(cl))
return kTRUE;
4731 if (cl ==
this)
return obj;
4738 return (
void*)((
Long_t)obj+off);
4740 return (
void*)((
Long_t)obj-off);
4806 Error(
"New",
"cannot create object of class %s",
GetName());
4822 Error(
"New",
"cannot create object of class %s",
GetName());
4833 Error(
"New",
"cannot create object of class %s",
GetName());
4854 if (!sinfo && !quiet) {
4873 Error(
"New",
"Failed to construct class '%s' using streamer info",
GetName());
4876 Fatal(
"New",
"This cannot happen!");
4900 Error(
"New with placement",
"cannot create object of class %s version %d at address %p",
GetName(),
fClassVersion, arena);
4915 Error(
"New with placement",
"cannot create object of class %s version %d at address %p",
GetName(),
fClassVersion, arena);
4943 Error(
"New with placement",
"Cannot construct class '%s' version %d at address %p, no streamer info available!",
GetName(),
fClassVersion, arena);
4948 p = sinfo->
New(arena);
4962 Error(
"New with placement",
"This cannot happen!");
5049 Error(
"NewArray",
"This cannot happen!");
5073 Error(
"NewArray with placement",
"cannot create object of class %s version %d at address %p",
GetName(),
fClassVersion, arena);
5088 Error(
"NewArray with placement",
"cannot create object of class %s version %d at address %p",
GetName(),
fClassVersion, arena);
5116 Error(
"NewArray with placement",
"Cannot construct class '%s' version %d at address %p, no streamer info available!",
GetName(),
fClassVersion, arena);
5121 p = sinfo->
NewArray(nElements, arena);
5140 Error(
"NewArray with placement",
"This cannot happen!");
5152 if (obj == 0)
return;
5159 }
else if ((!dtorOnly) &&
fDelete) {
5191 std::multiset<Version_t> knownVersions;
5204 knownVersions.insert(ver);
5212 if (!inRepo || verFound) {
5219 Error(
"Destructor",
"No streamer info available for class '%s' version %d at address %p, cannot destruct emulated object!",
GetName(),
fClassVersion, p);
5225 Error(
"Destructor",
"Doing Dump() ...");
5240 Error(
"Destructor2",
"No streamer info available for class '%s' version %d, cannot destruct object at addr: %p",
GetName(), objVer, p);
5247 Error(
"Destructor2",
"Doing Dump() ...");
5255 if (inRepo && verFound && p) {
5259 Error(
"Destructor",
"This cannot happen! (class %s)",
GetName());
5269 if (ary == 0)
return;
5276 Error(
"DeleteArray",
"Destructor only is not supported!");
5305 std::multiset<Version_t> knownVersions;
5316 knownVersions.insert(ver);
5324 if (!inRepo || verFound) {
5331 Error(
"DeleteArray",
"No streamer info available for class '%s' version %d at address %p, cannot destruct object!",
GetName(),
fClassVersion, ary);
5337 Error(
"DeleteArray",
"Doing Dump() ...");
5346 Error(
"DeleteArray",
"Loaded class version %d is not registered for addr %p",
fClassVersion, p);
5355 Error(
"DeleteArray",
"No streamer info available for class '%s' version %d at address %p, cannot destruct object!",
GetName(), objVer, ary);
5362 Error(
"DeleteArray",
"Doing Dump() ...");
5373 if (inRepo && verFound && p) {
5377 Error(
"DeleteArray",
"This cannot happen! (class '%s')",
GetName());