109#define RTLD_DEFAULT ((void *)::GetModuleHandle(NULL))
110#define dlsym(library, function_name) ::GetProcAddress((HMODULE)library, function_name)
136 static constexpr const char kUndeterminedClassInfoName[] =
"<NOT YET DETERMINED FROM fClassInfo>";
138 class TMmallocDescTemp {
142 TMmallocDescTemp(
void *
value =
nullptr) :
163 TNameMapNode(
const char *typedf,
const char *orig) :
176 const static bool foundSymbol = dlsym(RTLD_DEFAULT,
"usedToIdentifyRootClingByDlSym");
199 auto strLen = strlen(
name);
200 if (strLen == 0)
return;
202 const char* endCharPtr = strchr(
name,
'<');
203 endCharPtr = !endCharPtr ? &
name[strLen] : endCharPtr;
205 const char* beginCharPtr = endCharPtr;
206 while (beginCharPtr!=
name){
207 if (*beginCharPtr==
':'){
213 beginCharPtr = beginCharPtr!=endCharPtr ? beginCharPtr :
name;
214 std::string
s(beginCharPtr, endCharPtr);
216 printf(
"TDeclNameRegistry::AddQualifiedName Adding key %s for class/namespace %s\n",
s.c_str(),
name);
218 fClassNamesSet.insert(
s);
228 found = fClassNamesSet.find(
name) != fClassNamesSet.end();
237 if (fVerbLevel > 1) {
238 printf(
"TDeclNameRegistry Destructor. List of %lu names:\n",
239 (
long unsigned int)fClassNamesSet.size());
240 for (
auto const & key: fClassNamesSet) {
241 printf(
" - %s\n", key.c_str());
279 fOldValue(fCurrentValue)
281 fCurrentValue = newvalue;
286 fCurrentValue = fOldValue;
306 std::pair<RepoCont_t::iterator, Bool_t> tmp =
fObjectVersionRepository.insert(RepoCont_t::value_type>(location, version));
308 Warning(where,
"Reregistering an object of class '%s' version %d at address %p",
what->GetName(), version,
p);
312 Warning(where,
"Failed to reregister an object of class '%s' version %d at address %p",
what->GetName(), version, location);
325 RepoCont_t::iterator tmp = cur++;
326 if ((tmp->first == location) && (tmp->second ==
what->GetClassVersion())) {
342 size_t objsize =
what->Size();
343 long delta = (
char*)newadd - (
char*)oldadd;
347 RepoCont_t::iterator tmp = cur++;
348 if (oldadd <= tmp->
first && tmp->first < ( ((
char*)oldadd) + objsize) ) {
364#define R__USE_STD_MAP
366#if defined R__USE_STD_MAP
370 typedef std::map<std::string,TClass*>
IdMap_t;
395 if (iter != fMap.end()) cl = iter->second;
407#ifdef R__COMPLETE_MEM_TERMINATION
416 void Add(
const char *key,
TClass *&obj) {
418 fMap.
Add(realkey, obj);
421 const TPair *
a = (
const TPair *)fMap.FindObject(key);
425 void Remove(
const char *key) {
450 std::pair<const key_type, mapped_type> pair = make_pair(key, obj);
455 return fMap.count(key);
471#ifdef R__COMPLETE_MEM_TERMINATION
473 return &gIdMapObject;
482#ifdef R__COMPLETE_MEM_TERMINATION
484 return &gDeclIdMapObject;
499 gROOT->GetListOfClasses()->Add(cl);
513 if (!cl || !
id)
return;
525 gROOT->GetListOfClasses()->Remove(oldcl);
576 const Int_t kvalue = 30;
578 const Int_t ktitle = 50;
580 const Int_t ktitle = 42;
582 const Int_t kline = 1024;
585 UInt_t *cdatime =
nullptr;
590 const char *memberName;
591 const char *memberFullTypeName;
592 const char *memberTitle;
598 if (member->GetDataType()) {
599 memberDataType = (
EDataType)member->GetDataType()->GetType();
601 memberName = member->GetName();
602 memberFullTypeName = member->GetFullTypeName();
603 memberTitle = member->GetTitle();
604 isapointer = member->IsaPointer();
605 isbasic = member->IsBasic();
607 isarray = member->GetArrayDim();
613 const char *
cursor = mname;
617 if ( pos !=
kNPOS ) {
621 if (!element)
return;
626 memberName = element->
GetName();
629 membertype =
gROOT->GetType(memberFullTypeName);
631 isbasic = membertype !=
nullptr;
639 if (strcmp(memberName,
"fDatime") == 0 && memberDataType ==
kUInt_t) {
643 if (strcmp(memberName,
"fBits") == 0 && memberDataType ==
kUInt_t) {
648 static TClassRef stdClass(
"std::string");
649 Bool_t isStdString = (dataClass == stdClass);
652 for (i = 0;i < kline; i++)
line[i] =
' ';
658 char *pointer = (
char*)add;
659 char **ppointer = (
char**)(pointer);
662 char **p3pointer = (
char**)(*ppointer);
667 snprintf(&
line[kvalue],kline-kvalue,
"->%zx ", (
size_t)p3pointer);
669 }
else if (membertype) {
671 i = strlen(*ppointer);
672 if (kvalue+i > kline) i=kline-1-kvalue;
674 for (
Int_t j = 0; j < i; j++) {
675 if (!std::isprint((*ppointer)[j])) {
681 strncpy(
line + kvalue, *ppointer, i);
689 }
else if (!strcmp(memberFullTypeName,
"char*") ||
690 !strcmp(memberFullTypeName,
"const char*")) {
691 i = strlen(*ppointer);
692 if (kvalue+i >= kline) i=kline-1-kvalue;
694 for (
Int_t j = 0; j < i; j++) {
695 if (!std::isprint((*ppointer)[j])) {
701 strncpy(
line + kvalue, *ppointer, std::min( i, kline - kvalue));
708 snprintf(&
line[kvalue],kline-kvalue,
"->%zx ", (
size_t)p3pointer);
711 }
else if (membertype) {
713 cdatime = (
UInt_t*)pointer;
715 snprintf(&
line[kvalue],kline-kvalue,
"%d/%d",cdate,ctime);
723 std::string *str = (std::string*)pointer;
725 }
else if (isTString) {
730 snprintf(&
line[kvalue],kline-kvalue,
"->%zx ", (
size_t)pointer);
735 if (isdate ==
kFALSE && strcmp(memberFullTypeName,
"char*") && strcmp(memberFullTypeName,
"const char*")) {
736 i = strlen(&
line[0]);
line[i] =
' ';
737 assert(250 > ktitle);
738 strlcpy(&
line[ktitle],memberTitle,250-ktitle+1);
742 strncat(
line,
" ...", kline-strlen(
line)-1);
760 fRealDataObject = obj;
783 isTransientMember =
kTRUE;
790 if (cl != fRealDataClass) {
791 if (!fRealDataClass->InheritsFrom(cl)) {
797 if (!fRealDataClass->GetDataMember(rname)) {
812 if (!fRealDataClass->GetBaseDataMember(rname)) {
827 fRealDataClass->GetListOfRealData()->Add(rd);
837 fRealDataClass->GetListOfRealData()->Add(rd);
882 void* addrForRecursion =
nullptr;
883 if (GetObjectValidity() == kValidObjectGiven)
884 addrForRecursion =
const_cast<void*
>(add);
891 fRealDataClass->GetListOfRealData()->Add(rd);
909 fBrowser =
b; fCount = 0;
921 const void *addr,
Bool_t )
923 if(tit && strchr(tit,
'.')) return ;
924 if (fCount && !fBrowser)
return;
931 int ln = strcspn(
name,
"[ ");
935 if (!classInfo)
return;
945 if ((found = (iname==mname)))
break;
957 if (mname ==
"G__virtualinfo")
return;
959 int size =
sizeof(
void*);
979 for(
int i=0; i<nmax; i++) {
981 char *ptr = (
char*)addr + i*
size;
988 if (!fBrowser)
return;
996 bwname = actualClass->
GetName();
1003 strcmp(bwname.
Data(),actualClass->
GetName())==0) {
1005 int l = strcspn(bwname.
Data(),
"[ ");
1006 if (
l<bwname.
Length() && bwname[
l]==
'[') {
1007 char cbuf[13];
snprintf(cbuf,13,
"[%02d]",i);
1010 bwname = (
const char*)ts;
1014 if (proxy==
nullptr) {
1016 fBrowser->Add(obj,clm,bwname);
1021 if (valueCl==
nullptr) {
1023 fBrowser->Add( obj, clm, bwname );
1027 TClass *actualCl =
nullptr;
1029 int sz = proxy->
Size();
1031 char fmt[] = {
"#%09d"};
1032 fmt[3] =
'0'+(
int)
log10(
double(sz))+1;
1034 for (
int ii=0;ii<sz;ii++) {
1035 void *
p = proxy->
At(ii);
1047 fBrowser->Add(
p, actualCl, ts );
1089 TMmallocDescTemp setreset;
1105 fPersistentRef(nullptr),
1106 fStreamerInfo(nullptr), fConversionStreamerInfo(nullptr), fRealData(nullptr),
1107 fBase(nullptr), fData(nullptr), fUsingData(nullptr), fEnums(nullptr), fFuncTemplate(nullptr), fMethod(nullptr), fAllPubData(nullptr),
1108 fAllPubMethod(nullptr), fClassMenuList(nullptr),
1109 fDeclFileName(
""), fImplFileName(
""), fDeclFileLine(0), fImplFileLine(0),
1110 fInstanceCount(0), fOnHeap(0),
1111 fCheckSum(0), fCollectionProxy(nullptr), fClassVersion(0), fClassInfo(nullptr),
1112 fTypeInfo(nullptr), fShowMembers(nullptr),
1113 fStreamer(nullptr), fIsA(nullptr), fGlobalIsA(nullptr), fIsAMethod(nullptr),
1114 fMerge(nullptr), fResetAfterMerge(nullptr), fNew(nullptr), fNewArray(nullptr), fDelete(nullptr), fDeleteArray(nullptr),
1115 fDestructor(nullptr), fDirAutoAdd(nullptr), fStreamerFunc(nullptr), fConvStreamerFunc(nullptr), fSizeof(-1),
1116 fCanSplit(-1), fIsSyntheticPair(
kFALSE), fProperty(0), fClassProperty(0), fHasRootPcmInfo(
kFALSE), fCanLoadClassInfo(
kFALSE),
1117 fIsOffsetStreamerSet(
kFALSE), fVersionUsed(
kFALSE), fRuntimeProperties(0), fOffsetStreamer(0), fStreamerType(
TClass::
kDefault),
1119 fCurrentInfo(nullptr), fLastReadInfo(nullptr), fRefProxy(nullptr),
1120 fSchemaRules(nullptr), fStreamerImpl(&
TClass::StreamerDefault)
1125 ::Fatal(
"TClass::TClass",
"ROOT system not initialized");
1128 TMmallocDescTemp setreset;
1135 ::Fatal(
"TClass::TClass",
"gInterpreter not initialized");
1139 ::Warning(
"TClass::TClass",
"no dictionary for class %s is available",
name);
1153 fPersistentRef(nullptr),
1154 fStreamerInfo(nullptr), fConversionStreamerInfo(nullptr), fRealData(nullptr),
1155 fBase(nullptr), fData(nullptr), fUsingData(nullptr), fEnums(nullptr), fFuncTemplate(nullptr), fMethod(nullptr), fAllPubData(nullptr),
1156 fAllPubMethod(nullptr), fClassMenuList(nullptr),
1157 fDeclFileName(
""), fImplFileName(
""), fDeclFileLine(0), fImplFileLine(0),
1158 fInstanceCount(0), fOnHeap(0),
1159 fCheckSum(0), fCollectionProxy(nullptr), fClassVersion(0), fClassInfo(nullptr),
1160 fTypeInfo(nullptr), fShowMembers(nullptr),
1161 fStreamer(nullptr), fIsA(nullptr), fGlobalIsA(nullptr), fIsAMethod(nullptr),
1162 fMerge(nullptr), fResetAfterMerge(nullptr), fNew(nullptr), fNewArray(nullptr), fDelete(nullptr), fDeleteArray(nullptr),
1163 fDestructor(nullptr), fDirAutoAdd(nullptr), fStreamerFunc(nullptr), fConvStreamerFunc(nullptr), fSizeof(-1),
1164 fCanSplit(-1), fIsSyntheticPair(
kFALSE), fProperty(0), fClassProperty(0), fHasRootPcmInfo(
kFALSE), fCanLoadClassInfo(
kFALSE),
1165 fIsOffsetStreamerSet(
kFALSE), fVersionUsed(
kFALSE), fRuntimeProperties(0), fOffsetStreamer(0), fStreamerType(
TClass::
kDefault),
1167 fCurrentInfo(nullptr), fLastReadInfo(nullptr), fRefProxy(nullptr),
1168 fSchemaRules(nullptr), fStreamerImpl(&
TClass::StreamerDefault)
1171 Init(
name, cversion,
nullptr,
nullptr,
nullptr,
nullptr, -1, -1,
nullptr, silent);
1181 fPersistentRef(nullptr),
1182 fStreamerInfo(nullptr), fConversionStreamerInfo(nullptr), fRealData(nullptr),
1183 fBase(nullptr), fData(nullptr), fUsingData(nullptr), fEnums(nullptr), fFuncTemplate(nullptr), fMethod(nullptr), fAllPubData(nullptr),
1184 fAllPubMethod(nullptr), fClassMenuList(nullptr),
1185 fDeclFileName(
""), fImplFileName(
""), fDeclFileLine(0), fImplFileLine(0),
1186 fInstanceCount(0), fOnHeap(0),
1187 fCheckSum(0), fCollectionProxy(nullptr), fClassVersion(0), fClassInfo(nullptr),
1188 fTypeInfo(nullptr), fShowMembers(nullptr),
1189 fStreamer(nullptr), fIsA(nullptr), fGlobalIsA(nullptr), fIsAMethod(nullptr),
1190 fMerge(nullptr), fResetAfterMerge(nullptr), fNew(nullptr), fNewArray(nullptr), fDelete(nullptr), fDeleteArray(nullptr),
1191 fDestructor(nullptr), fDirAutoAdd(nullptr), fStreamerFunc(nullptr), fConvStreamerFunc(nullptr), fSizeof(-1),
1192 fCanSplit(-1), fIsSyntheticPair(
kFALSE), fProperty(0), fClassProperty(0), fHasRootPcmInfo(
kFALSE), fCanLoadClassInfo(
kFALSE),
1193 fIsOffsetStreamerSet(
kFALSE), fVersionUsed(
kFALSE), fRuntimeProperties(0), fOffsetStreamer(0), fStreamerType(
TClass::
kDefault),
1195 fCurrentInfo(nullptr), fLastReadInfo(nullptr), fRefProxy(nullptr),
1196 fSchemaRules(nullptr), fStreamerImpl(&
TClass::StreamerDefault)
1208 "A TClass entry cannot be initialized in a state different from kForwardDeclared or kEmulated.");
1209 Init(
name, cversion,
nullptr,
nullptr,
nullptr,
nullptr, -1, -1,
nullptr, silent);
1227 fPersistentRef(nullptr),
1228 fStreamerInfo(nullptr), fConversionStreamerInfo(nullptr), fRealData(nullptr),
1229 fBase(nullptr), fData(nullptr), fUsingData(nullptr), fEnums(nullptr), fFuncTemplate(nullptr), fMethod(nullptr), fAllPubData(nullptr),
1230 fAllPubMethod(nullptr), fClassMenuList(nullptr),
1231 fDeclFileName(
""), fImplFileName(
""), fDeclFileLine(0), fImplFileLine(0),
1232 fInstanceCount(0), fOnHeap(0),
1233 fCheckSum(0), fCollectionProxy(nullptr), fClassVersion(0), fClassInfo(nullptr),
1234 fTypeInfo(nullptr), fShowMembers(nullptr),
1235 fStreamer(nullptr), fIsA(nullptr), fGlobalIsA(nullptr), fIsAMethod(nullptr),
1236 fMerge(nullptr), fResetAfterMerge(nullptr), fNew(nullptr), fNewArray(nullptr), fDelete(nullptr), fDeleteArray(nullptr),
1237 fDestructor(nullptr), fDirAutoAdd(nullptr), fStreamerFunc(nullptr), fConvStreamerFunc(nullptr), fSizeof(-1),
1238 fCanSplit(-1), fIsSyntheticPair(
kFALSE), fProperty(0), fClassProperty(0), fHasRootPcmInfo(
kFALSE), fCanLoadClassInfo(
kFALSE),
1239 fIsOffsetStreamerSet(
kFALSE), fVersionUsed(
kFALSE), fRuntimeProperties(0), fOffsetStreamer(0), fStreamerType(
TClass::
kDefault),
1241 fCurrentInfo(nullptr), fLastReadInfo(nullptr), fRefProxy(nullptr),
1242 fSchemaRules(nullptr), fStreamerImpl(&
TClass::StreamerDefault)
1247 ::Fatal(
"TClass::TClass",
"ROOT system not initialized");
1253 ::Fatal(
"TClass::TClass",
"gInterpreter not initialized");
1255 if (!classInfo || !
gInterpreter->ClassInfo_IsValid(classInfo)) {
1262 Init(
fName, cversion,
nullptr,
nullptr, dfil, ifil, dl, il, classInfo, silent);
1278 fPersistentRef(nullptr),
1279 fStreamerInfo(nullptr), fConversionStreamerInfo(nullptr), fRealData(nullptr),
1280 fBase(nullptr), fData(nullptr), fUsingData(nullptr), fEnums(nullptr), fFuncTemplate(nullptr), fMethod(nullptr), fAllPubData(nullptr),
1281 fAllPubMethod(nullptr), fClassMenuList(nullptr),
1282 fDeclFileName(
""), fImplFileName(
""), fDeclFileLine(0), fImplFileLine(0),
1283 fInstanceCount(0), fOnHeap(0),
1284 fCheckSum(0), fCollectionProxy(nullptr), fClassVersion(0), fClassInfo(nullptr),
1285 fTypeInfo(nullptr), fShowMembers(nullptr),
1286 fStreamer(nullptr), fIsA(nullptr), fGlobalIsA(nullptr), fIsAMethod(nullptr),
1287 fMerge(nullptr), fResetAfterMerge(nullptr), fNew(nullptr), fNewArray(nullptr), fDelete(nullptr), fDeleteArray(nullptr),
1288 fDestructor(nullptr), fDirAutoAdd(nullptr), fStreamerFunc(nullptr), fConvStreamerFunc(nullptr), fSizeof(-1),
1289 fCanSplit(-1), fIsSyntheticPair(
kFALSE), fProperty(0), fClassProperty(0), fHasRootPcmInfo(
kFALSE), fCanLoadClassInfo(
kFALSE),
1290 fIsOffsetStreamerSet(
kFALSE), fVersionUsed(
kFALSE), fRuntimeProperties(0), fOffsetStreamer(0), fStreamerType(
TClass::
kDefault),
1292 fCurrentInfo(nullptr), fLastReadInfo(nullptr), fRefProxy(nullptr),
1293 fSchemaRules(nullptr), fStreamerImpl(&
TClass::StreamerDefault)
1296 Init(
name,cversion,
nullptr,
nullptr, dfil, ifil, dl, il,
nullptr, silent);
1306 const char *dfil,
const char *ifil,
Int_t dl,
Int_t il,
1309 fPersistentRef(nullptr),
1310 fStreamerInfo(nullptr), fConversionStreamerInfo(nullptr), fRealData(nullptr),
1311 fBase(nullptr), fData(nullptr), fUsingData(nullptr), fEnums(nullptr), fFuncTemplate(nullptr), fMethod(nullptr), fAllPubData(nullptr),
1312 fAllPubMethod(nullptr),
1313 fClassMenuList(nullptr),
1314 fDeclFileName(
""), fImplFileName(
""), fDeclFileLine(0), fImplFileLine(0),
1315 fInstanceCount(0), fOnHeap(0),
1316 fCheckSum(0), fCollectionProxy(nullptr), fClassVersion(0), fClassInfo(nullptr),
1317 fTypeInfo(nullptr), fShowMembers(nullptr),
1318 fStreamer(nullptr), fIsA(nullptr), fGlobalIsA(nullptr), fIsAMethod(nullptr),
1319 fMerge(nullptr), fResetAfterMerge(nullptr), fNew(nullptr), fNewArray(nullptr), fDelete(nullptr), fDeleteArray(nullptr),
1320 fDestructor(nullptr), fDirAutoAdd(nullptr), fStreamerFunc(nullptr), fConvStreamerFunc(nullptr), fSizeof(-1),
1321 fCanSplit(-1), fIsSyntheticPair(
kFALSE), fProperty(0), fClassProperty(0), fHasRootPcmInfo(
kFALSE), fCanLoadClassInfo(
kFALSE),
1322 fIsOffsetStreamerSet(
kFALSE), fVersionUsed(
kFALSE), fRuntimeProperties(0), fOffsetStreamer(0), fStreamerType(
TClass::
kDefault),
1323 fState(kHasTClassInit),
1324 fCurrentInfo(nullptr), fLastReadInfo(nullptr), fRefProxy(nullptr),
1325 fSchemaRules(nullptr), fStreamerImpl(&
TClass::StreamerDefault)
1329 Init(
name, cversion, &info, isa, dfil, ifil, dl, il,
nullptr, silent);
1347 info->
Clear(
"build");
1371 const char *dfil,
const char *ifil,
Int_t dl,
Int_t il,
1372 ClassInfo_t *givenInfo,
1376 ::Fatal(
"TClass::TClass",
"ROOT system not initialized");
1378 ::Error(
"TClass::Init",
"The name parameter is invalid (null or empty)");
1419 TClass **persistentRef =
nullptr;
1437 info->
Clear(
"build");
1455 (*fMethod).fClass =
this;
1467 ::Fatal(
"TClass::Init",
"gInterpreter not initialized");
1470 bool invalid = !
gInterpreter->ClassInfo_IsValid(givenInfo);
1471 bool notloaded = !
gInterpreter->ClassInfo_IsLoaded(givenInfo);
1472 auto property =
gInterpreter->ClassInfo_Property(givenInfo);
1514 proto->FillTClass(
this);
1540 ::Error(
"TClass::Init",
"no interpreter information for class %s is available even though it has a TClass "
1541 "initialization routine.",
1559 if (!givenInfo && strchr (
name,
'<')) {
1571 if (resolvedThis !=
name) {
1595 if (resolvedThis !=
fName) {
1596 oldcl = (
TClass*)
gROOT->GetListOfClasses()->FindObject(resolvedThis);
1597 if (oldcl && oldcl !=
this) {
1603 while ( TNameMapNode* htmp =
static_cast<TNameMapNode*
> (next()) ) {
1604 if (resolvedThis != htmp->String())
continue;
1605 oldcl = (
TClass*)
gROOT->GetListOfClasses()->FindObject(htmp->fOrigName);
1606 if (oldcl && oldcl !=
this) {
1624 if (persistentRef) {
1631 if ( isStl || !strncmp(
GetName(),
"stdext::hash_",13) || !strncmp(
GetName(),
"__gnu_cxx::hash_",16) ) {
1642 }
else if (!silent) {
1643 Warning(
"Init",
"Collection proxy for %s was not properly initialized!",
GetName());
1668 while ( TNameMapNode* htmp =
static_cast<TNameMapNode*
> (next()) ) {
1669 if (resolvedThis == htmp->String() && htmp->fOrigName ==
GetName()) {
1695 (*fUsingData).Delete();
1740 std::map<std::string, TObjArray*>::iterator it;
1741 std::map<std::string, TObjArray*>::iterator end = (*fConversionStreamerInfo).end();
1742 for( it = (*fConversionStreamerInfo).begin(); it != end; ++it ) {
1752 Int_t ReadRulesContent(FILE *
f)
1764 while ((
c = fgetc(
f)) != EOF) {
1770 if (rule.Length() > 0) {
1822 static const char *suffix =
"class.rules";
1828 FILE *
f = fopen(sname,
"r");
1830 res = ReadRulesContent(
f);
1833 ::Error(
"TClass::ReadRules()",
"Cannot find rules file %s", sname.
Data());
1847 ::Error(
"TClass::ReadRules",
"no file name specified");
1856 Int_t count = ReadRulesContent(
f);
1909 ::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).",
1971 obj->ShowMembers(insp);
1992 }
else if (actual !=
this) {
1993 return actual->
Browse(obj,
b);
2042 isTransient =
kTRUE;
2047 TMmallocDescTemp setreset;
2058 static TClassRef clRefString(
"std::string");
2059 if (clRefString ==
this) {
2069 Error(
"BuildRealData",
"Inspection for %s not supported!",
GetName());
2081 if ( isTransient ) {
2089 Error(
"BuildRealData",
"Cannot find any ShowMembers function for %s!",
GetName());
2104 c->BuildRealData(
nullptr, isTransient);
2124 Error(
"BuildEmulatedRealData",
"Missing StreamerInfo for %s",
GetName());
2190 TMmallocDescTemp setreset;
2217 if (strcmp(
GetName(),
"string") == 0) {
2225 gInterpreter->InspectMembers(insp, obj,
this, isTransient);
2229 sinfo->CallShowMembers(obj, insp, isTransient);
2244 return gInterpreter->InspectMembers(insp, obj,
this, isTransient);
2308 }
else if (!
c->CanSplitBaseAllow()) {
2352 static TClassRef stdStringClass(
"std::string");
2409 if (new_name ==
nullptr || new_name[0]==
'\0' ||
fName == new_name) {
2410 Error(
"Clone",
"The name of the class must be changed when cloning a TClass object.");
2440 copy->
fName = new_name;
2495 if (!padsav || !opt.
Contains(
"same")) {
2498 gROOT->ProcessLine(
"new TCanvas(\"R__class\",\"class\",20,20,1000,750);");
2506 if (padsav) padsav->
cd();
2547 if (
sizeof(
this) == 4)
2550 Printf(
"==> Dumping object at: 0x%016lx, name=%s, class=%s\n",prObj,tobj->
GetName(),
GetName());
2553 if (
sizeof(
this) == 4)
2554 Printf(
"==> Dumping object at: 0x%08lx, class=%s\n",prObj,
GetName());
2556 Printf(
"==> Dumping object at: 0x%016lx, class=%s\n",prObj,
GetName());
2561 Info(
"Dump",
"No ShowMembers function, dumping disabled");
2571 static const UInt_t maxsize = 255;
2572 static char name[maxsize+2];
2576 for (
UInt_t i = 0; i < nch && icur < maxsize; ++i, ++icur) {
2577 if (
text[i] ==
'\"' ||
text[i] ==
'[' ||
text[i] ==
'~' ||
2580 text[i] ==
'?' ||
text[i] ==
'>') {
2610 if (
object==
nullptr)
return (
TClass*)
this;
2623 return realTObject->
IsA();
2658 if (strcmp(
GetName(), classname) == 0)
return this;
2667 else return nullptr;
2677 if (cl ==
this)
return this;
2689 if (cl ==
c)
return c;
2690 c1 =
c->GetBaseClass(cl);
2708 if (cl ==
this)
return 0;
2710 if (!
fBase.load()) {
2717 if (!sinfo)
return -1;
2729 if (!baseclass)
return -1;
2731 if (subOffset == -2)
return -2;
2732 if (subOffset != -1)
return offset+subOffset;
2737 if (!baseclass)
return -1;
2739 if (subOffset == -2)
return -2;
2740 if (subOffset != -1)
return offset+subOffset;
2744 Error(
"GetBaseClassOffsetRecurse",
"Unexpected element type for base class: %s\n",element->
IsA()->
GetName());
2756 if (
fBase.load() ==
nullptr)
2759 lnk =
fBase.load()->FirstLink();
2775 off =
c->GetBaseClassOffsetRecurse(cl);
2776 if (off == -2)
return -2;
2795 if (
this == toBase)
return 0;
2811 if(derived && base) {
2833 if (dm)
return this;
2841 TClass *cdm =
c->GetBaseDataMember(datamember);
2842 if (cdm)
return cdm;
2853 struct TClassLocalStorage {
2854 TClassLocalStorage() : fCollectionProxy(nullptr), fStreamer(nullptr) {};
2859 static TClassLocalStorage *GetStorage(
const TClass *cl)
2865 if (*thread_ptr==
nullptr) *thread_ptr =
new TExMap();
2872 local = (
ULongptr_t)
new TClassLocalStorage();
2875 return (TClassLocalStorage*)local;
2903 TClassLocalStorage *local = TClassLocalStorage::GetStorage(
this);
2906 return local->fCollectionProxy;
2917 TClassLocalStorage *local = TClassLocalStorage::GetStorage(
this);
2919 if (local->fStreamer==
nullptr) {
2921 const std::type_info &orig = (
typeid(*fStreamer) );
2922 if (!local->fStreamer) {
2923 Warning(
"GetStreamer",
"For %s, the TClassStreamer (%s) passed's call to Generate failed!",
GetName(),orig.name());
2925 const std::type_info © = (
typeid(*local->fStreamer) );
2926 if (strcmp(orig.name(),copy.name())!=0) {
2927 Warning(
"GetStreamer",
"For %s, the TClassStreamer passed does not properly implement the Generate method (%s vs %s)\n",
GetName(),orig.name(),copy.name());
2931 return local->fStreamer;
2975 if (!
name || !
name[0])
return nullptr;
2977 if (strstr(
name,
"(anonymous)"))
return nullptr;
2978 if (strncmp(
name,
"class ",6)==0)
name += 6;
2979 if (strncmp(
name,
"struct ",7)==0)
name += 7;
2981 if (!
gROOT->GetListOfClasses())
return nullptr;
3036 if (!cl && !load)
return nullptr;
3038 TClass *loadedcl = (dict)();
3048 std::string normalizedName;
3057 if (normalizedName !=
name) {
3058 cl = (
TClass*)
gROOT->GetListOfClasses()->FindObject(normalizedName.c_str());
3069 normalizedName = cl->
GetName();
3070 checkTable = load && (normalizedName !=
name);
3073 if (!load)
return nullptr;
3099 TClass *loadedcl =
nullptr;
3110 if (!loadedcl && !ispair && !ispairbase) {
3111 if (
TDataType* theDataType =
gROOT->GetType(normalizedName.c_str())){
3113 auto underlyingTypeName = theDataType->GetTypeName();
3116 if (underlyingTypeDict){
3117 loadedcl = underlyingTypeDict();
3123 if (loadedcl)
return loadedcl;
3127 if (loadedcl)
return loadedcl;
3134 if (hint_pair_offset && hint_pair_size) {
3142 static const size_t slen = strlen(
"pair");
3143 static const char *associativeContainer[] = {
"map",
"unordered_map",
"multimap",
3144 "unordered_multimap",
"set",
"unordered_set",
"multiset",
"unordered_multiset" };
3145 for(
auto contname : associativeContainer) {
3146 std::string collname = contname;
3147 collname.append( normalizedName.c_str() + slen );
3154 cl =
p->GetValueClass();
3167 std::string::size_type posLess = normalizedName.find(
'<');
3168 if (posLess != std::string::npos) {
3175 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());
3177 if (normalizedName.length()) {
3187 auto ci =
gInterpreter->ClassInfo_Factory(normalizedName.c_str());
3189 auto method =
gInterpreter->MethodInfo_Factory(funcDecl);
3195 funcPtr(
nullptr, 0,
nullptr, &res);
3207 std::string alternative;
3208 gInterpreter->GetInterpreterTypeName(normalizedName.c_str(), alternative,
kTRUE);
3209 if (alternative.empty())
3211 const char *altname = alternative.c_str();
3212 if (strncmp(altname,
"std::", 5) == 0) {
3217 if (altname != normalizedName && strcmp(altname,
name) != 0) {
3244 if (!
gROOT->GetListOfClasses())
3252 if (cl && cl->
IsLoaded())
return cl;
3278 if (!load)
return nullptr;
3288 TIter next(
gROOT->GetListOfClassGenerators());
3300 if (!autoload_old) {
3307 cl =
GetClass(typeinfo, load, hint_pair_offset, hint_pair_size);
3313 if (hint_pair_offset) {
3318 free(demangled_name);
3342 if (!
gROOT->GetListOfClasses())
return nullptr;
3363 if (!load)
return nullptr;
3365 TClass *loadedcl =
nullptr;
3366 if (cl) loadedcl =
gROOT->LoadClass(cl->
GetName(),silent);
3367 else loadedcl =
gROOT->LoadClass(
name,silent);
3369 if (loadedcl)
return loadedcl;
3394 if (!
gROOT->GetListOfClasses())
return 0;
3399 if (iter.first == iter.second)
return false;
3400 std::vector<TClass*>::iterator vectIt = classes.begin();
3402 vectIt = classes.insert(vectIt, it->second);
3430 || datamember ==
nullptr)
return nullptr;
3433 const char *start_name = datamember;
3434 while (*start_name ==
'*') ++start_name;
3439 if (
const char *
s = strchr(start_name,
'[')){
3469 if (strchr(
name,
'[')==
nullptr) {
3511 std::string givenName(
name);
3514 std::string::size_type firstBracket = givenName.find_first_of(
"[");
3515 if (firstBracket != std::string::npos) {
3517 std::string nameNoDim(givenName.substr(0, firstBracket));
3521 std::string objName(obj->
GetName());
3522 std::string::size_type pos = objName.find_first_of(
"[");
3524 if (pos != std::string::npos) {
3526 if (objName == nameNoDim) {
3535 std::ostringstream ptrname;
3536 ptrname <<
"*" << givenName;
3543 std::string::size_type firstDot = givenName.find_first_of(
".");
3544 if (firstDot == std::string::npos) {
3555 std::string::size_type lastDot = givenName.find_last_of(
".");
3556 std::ostringstream starname;
3557 starname << givenName.substr(0, lastDot) <<
".*" << givenName.substr(lastDot + 1);
3573 std::string::size_type bracket = starname.str().find_first_of(
"[");
3574 if (bracket != std::string::npos) {
3583 std::string firstDotName(givenName.substr(firstDot + 1));
3626 if (!
fBase.load()) {
3647 Fatal(
"GetListOfBases",
"gInterpreter not initialized");
3650 if (!
fBase.load()) {
3676 auto temp =
fEnums.load();
3678 if (requestListLoading) {
3693 if (!requestListLoading) {
3748 if (!(*data).IsLoaded())
3751 }
else if (load) (*data).Load();
3765 }
else if (!load &&
fData)
3806 if (
gDebug>0)
Info(
"GetListOfMethods",
"Header Parsing - Asking for all the methods of class %s: this can involve parsing.",
GetName());
3839 if (
gDebug>0)
Info(
"GetListOfAllPublicMethods",
"Header Parsing - Asking for all the methods of class %s: this can involve parsing.",
GetName());
3869 while ((baseClass = (
TBaseClass *) nextBase())) {
3877 while ((method = (
TMethod*)next())) {
3883 if (
m &&
m->GetNargs() == method->
GetNargs())
3908 return cl->IsLoaded();
3936 TIter nextMemb(ldm);
3947 TClass* dmTClass =
nullptr;
3967 for (
int i = 0; i < 2; i++) {
3983 if (
this == sCIString)
return;
3995 auto checkDicts = [&](
const string &clName){
4002 if (cl && !cl->HasDictionary()) {
4003 cl->GetMissingDictionariesWithRecursionCheck(
result, visited, recurse);
4007 const auto &elements = splitType.
fElements;
4008 const auto &templName = elements[0];
4011 if (templName ==
"pair") {
4019 if (templName ==
"unique_ptr" || templName ==
"array") {
4020 checkDicts(elements[1]);
4027 if (templName ==
"tuple") {
4030 const auto nTemplArgs = elements.size() - 1;
4032 for (
auto iTemplArg = 1U; iTemplArg < nTemplArgs; ++iTemplArg) {
4033 checkDicts(elements[iTemplArg]);
4079 if (
result.FindObject(
this))
return;
4082 if (
this == sCIString)
return;
4091 if (strncmp(
fName,
"unique_ptr<", 11) == 0 || strncmp(
fName,
"array<", 6) == 0 || strncmp(
fName,
"tuple<", 6) == 0) {
4144 while ((acl = (
TClass*)nextClass())) {
4145 if (acl == newcl)
continue;
4150 info->
Update(
this, newcl);
4162 Warning(
"ResetClassInfo(Long_t tagnum)",
"Call to deprecated interface (does nothing)");
4211 (*fUsingData).Unload();
4215 (*fMethod).Unload();
4249 if (options==
nullptr || options[0]==0)
return;
4251 if (strstr(options,
"streamerinfo")!=
nullptr) {
4255 std::map<std::string, TObjArray*>::iterator it;
4256 std::map<std::string, TObjArray*>::iterator end = (*fConversionStreamerInfo).end();
4257 for( it = (*fConversionStreamerInfo).begin(); it != end; ++it ) {
4258 it->second->ls(options);
4284 TClass *classPtr =
nullptr;
4285 TIter next(methodList);
4287 while ((method = (
TMethod*) next())) {
4289 if (classPtr != method->
GetClass()) {
4297 TIter nextarg(margsList);
4298 while ((methodArg = (
TMethodArg*)nextarg())) {
4348 if(
fMethod.compare_exchange_strong(expected, temp.get()) ) {
4384 m =
c->GetMethodAllAny(method);
4406 Fatal(
"GetMethod",
"gInterpreter not initialized");
4412 if (!decl)
return nullptr;
4419 "\nDid not find matching TMethod <%s> with \"%s\" %sfor %s",
4420 method,params,objectIsConst ?
"const " :
"",
GetName());
4430 return static_cast<TMethod *
>(method);
4434 if (
TFunction* method = base->FindClassOrBaseMethodWithId(declId))
4435 return static_cast<TMethod *
>(method);
4452 Fatal(
"GetMethodWithPrototype",
"gInterpreter not initialized");
4456 objectIsConst,
mode);
4458 if (!decl)
return nullptr;
4461 Error(
"GetMethodWithPrototype",
4462 "\nDid not find matching TMethod <%s> with \"%s\" %sfor %s",
4463 method,
proto,objectIsConst ?
"const " :
"",
GetName());
4478 if (faddr == (
Longptr_t)
m->InterfaceMethod())
4497 Fatal(
"GetClassMethod",
"gInterpreter not initialized");
4503 if (!decl)
return nullptr;
4523 Fatal(
"GetClassMethodWithPrototype",
"gInterpreter not initialized");
4530 if (!decl)
return nullptr;
4629 Error(
"GetStreamerInfo",
"class: %s, attempting to access a wrong version: %d",
GetName(), version);
4648 TMmallocDescTemp setreset;
4657 sinfo->
Build(silent);
4702 newname +=
"@@emulated";
4727 for (
Int_t i = -1; sinfo ==
nullptr && i < ninfos; ++i)
4740 Error(
"GetStreamerInfoAbstractEmulated",
"could not create TVirtualStreamerInfo");
4765 newname +=
"@@emulated";
4780 if (!sinfo && (checksum !=
fCheckSum)) {
4790 for (
Int_t i = -1; sinfo ==
nullptr && i < ninfos; ++i)
4803 Error(
"GetStreamerInfoAbstractEmulated",
"could not create TVirtualStreamerInfo");
4850 Error(
"IgnoreTObjectStreamer",
"Must be called before the creation of StreamerInfo");
4876 if (cl ==
this)
return kTRUE;
4886 if (!clbase)
return kFALSE;
4905 if (cl ==
this)
return obj;
4968 auto obj =
NewObject(defConstructor, quiet);
4969 if (obj.GetPtr() && obj.GetAllocator()) {
4973 return obj.GetPtr();
4995 Error(
"New",
"cannot create object of class %s",
GetName());