55 if (
gROOT->GetListOfClasses()->FindObject(
name) ||
61 const auto lastPos = strrchr(
name,
':');
62 if (lastPos !=
nullptr) {
64 const auto enName = lastPos + 1;
65 const auto scopeNameSize = ((
Long64_t)lastPos - (
Long64_t)
name) /
sizeof(
decltype(*lastPos)) - 1;
67 char *scopeName =
new char[scopeNameSize + 1];
69 char scopeName[scopeNameSize + 1];
71 strncpy(scopeName,
name, scopeNameSize);
72 scopeName[scopeNameSize] =
'\0';
75 if(
auto scope =
dynamic_cast<TClass*
>(
gROOT->GetListOfClasses()->FindObject(scopeName))){
81 if (
auto listOfEnums = (
TListOfEnums*)scope->GetListOfEnums())
82 theEnum = listOfEnums->THashList::FindObject(enName);
92 return nullptr != theEnum;
#define R__COLLECTION_READ_GUARD()
R__EXTERN TVirtualMutex * gInterpreterMutex
static bool NameExistsElsewhere(const char *name)
#define R__LOCKGUARD(mutex)
static TProtoClass * GetProtoNorm(const char *cname)
Given the class normalized name returns the TClassProto object for the class.
static DictFuncPtr_t GetDictNorm(const char *cname)
Given the normalized class name returns the Dictionary() function of a class (uses hash of name).
TClass instances represent classes, structs and namespaces in the ROOT type system.
Basic data type descriptor (datatype information is obtained from CINT).
static void AddBuiltins(TCollection *types)
Create the TDataType objects for builtins.
TObject * FindObject(const char *name) const
Find object using its name.
THashTable implements a hash table to store TObject's.
void Add(TObject *obj)
Add object to the hash table.
TObject * FindObject(const char *name) const
Find object using its name.
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
A collection of TDataType designed to hold the typedef information and numerical type information.
TDataType * FindType(const char *name) const
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.