30#include <unordered_set>
31#include <unordered_map>
36#define TWin32SendClass char
70 namespace TMetaUtils {
71 class TNormalizedCtxt;
72 class TClingLookupHelper;
84 const char* canonicalName);
86 const char* canonicalName);
130 return strcmp(
a,
b) < 0;
145 std::unique_ptr<ROOT::TVirtualRWMutex::State>
fState;
152 operator bool()
const {
return (
bool)
fState; }
173 TCling(
const char*
name,
const char* title,
const char*
const argv[]);
226 const char** headers,
227 const char** includePaths,
228 const char* payloadCode,
229 const char* fwdDeclsCode,
230 void (*triggerFunc)(),
232 const char** classesHeaders,
233 Bool_t lateRegistration =
false,
234 Bool_t hasCxxModule =
false);
239 void SetGetline(
const char * (*getlineFunc)(
const char* prompt),
240 void (*histaddFunc)(
const char*
line));
273 virtual std::string
ToString(
const char*
type,
void *obj);
282 void GetFunctionOverloads(ClassInfo_t *cl,
const char *funcname, std::vector<DeclId_t>& res)
const;
288 void Execute(
const char*
function,
const char* params,
int* error = 0);
303 const char*
TypeName(
const char* typeDesc);
318 virtual int DisplayClass(FILE* fout,
const char*
name,
int base,
int start)
const;
320 virtual void*
FindSym(
const char* entry)
const;
326 virtual int LoadFile(
const char* path)
const;
328 virtual const char*
MapCppName(
const char*)
const;
336 virtual int UnloadFile(
const char* path)
const;
339 std::vector<std::string>&);
356 virtual void CallFunc_Exec(CallFunc_t* func,
void* address)
const;
380 virtual void CallFunc_SetFunc(CallFunc_t* func, ClassInfo_t* info,
const char* method,
const char* params,
bool objectIsConst,
Long_t*
Offset)
const;
405 virtual void ClassInfo_Init(ClassInfo_t* info,
const char* funcname)
const;
418 virtual void*
ClassInfo_New(ClassInfo_t* info,
int n,
void* arena)
const;
419 virtual void*
ClassInfo_New(ClassInfo_t* info,
void* arena)
const;
433 ClassInfo_t* base)
const;
521 virtual void TypeInfo_Init(TypeInfo_t* tinfo,
const char* funcname)
const;
546 void HandleNewDecl(
const void* DV,
bool isDeserialized, std::set<TClass*>& modifiedClasses);
550 void LibraryLoaded(
const void* dyLibHandle,
const char* canonicalName);
551 void LibraryUnloaded(
const void* dyLibHandle,
const char* canonicalName);
569 bool Append(
const std::string &str);
588 bool LoadPCM(
const std::string &pcmFileNameFullPath);
590 int ReadRootmapFile(
const char *rootmapfile, TUniqueString* uniqueString =
nullptr);
unsigned long long ULong64_t
TClass *(* DictFuncPtr_t)()
void TCling__LibraryLoaded(const void *dyLibHandle, const char *canonicalName)
void TCling__LibraryUnloaded(const void *dyLibHandle, const char *canonicalName)
void TCling__TransactionRollback(const cling::Transaction &)
void TCling__UpdateListsOnCommitted(const cling::Transaction &, cling::Interpreter *)
const clang::Decl * TCling__GetObjectDecl(TObject *obj)
void TCling__UpdateListsOnUnloaded(const cling::Transaction &)
TObject * TCling__GetObjectAddress(const char *Name, void *&LookupCtx)
TClass instances represent classes, structs and namespaces in the ROOT type system.
~SuspendAutoloadingRAII()
SuspendAutoloadingRAII(TCling *tcling)
TUniqueString(const TUniqueString &)=delete
bool Append(const std::string &str)
Append string to the storage if not added already.
std::hash< std::string > fHashFunc
std::set< size_t > fLinesHashSet
This class defines an interface to the cling C++ interpreter.
virtual const char * MethodArgInfo_DefaultValue(MethodArgInfo_t *marginfo) const
virtual std::string CallFunc_GetWrapperCode(CallFunc_t *func) const
virtual void FuncTempInfo_Name(FuncTempInfo_t *, TString &name) const
Return the name of this function template.
virtual void FuncTempInfo_Title(FuncTempInfo_t *, TString &name) const
Return the comments associates with this function template.
virtual int TypedefInfo_Next(TypedefInfo_t *tinfo) const
virtual bool DiagnoseIfInterpreterException(const std::exception &e) const
virtual bool ClassInfo_IsValid(ClassInfo_t *info) const
virtual bool ClassInfo_IsScopedEnum(ClassInfo_t *info) const
Long_t Calc(const char *line, EErrorCode *error=0)
Directly execute an executable statement (e.g.
Bool_t HasPCMForLibrary(const char *libname) const
Return true if ROOT has cxxmodules pcm for a given library name.
virtual MethodInfo_t * MethodInfo_FactoryCopy(MethodInfo_t *minfo) const
bool LoadPCM(const std::string &pcmFileNameFullPath)
Tries to load a PCM; returns true on success.
virtual const char * TypeInfo_Name(TypeInfo_t *) const
DeclId_t GetFunction(ClassInfo_t *cl, const char *funcname)
Return pointer to cling interface function for a method of a class with a certain name.
bool LibraryLoadingFailed(const std::string &, const std::string &, bool, bool)
virtual bool ClassInfo_HasMethod(ClassInfo_t *info, const char *name) const
std::vector< void * > fRegisterModuleDyLibs
virtual MethodInfo_t * CallFunc_FactoryMethod(CallFunc_t *func) const
virtual bool MethodInfo_IsValid(MethodInfo_t *minfo) const
virtual const char * DataMemberInfo_TypeTrueName(DataMemberInfo_t *dminfo) const
void CreateListOfDataMembers(TClass *cl) const
Create list of pointers to data members for TClass cl.
void UnRegisterTClassUpdate(const TClass *oldcl)
If the dictionary is loaded, we can remove the class from the list (otherwise the class might be load...
void HandleNewDecl(const void *DV, bool isDeserialized, std::set< TClass * > &modifiedClasses)
virtual const char * MethodInfo_TypeName(MethodInfo_t *minfo) const
virtual Long_t TypedefInfo_Property(TypedefInfo_t *tinfo) const
virtual void MethodArgInfo_Delete(MethodArgInfo_t *marginfo) const
Bool_t IsAutoLoadNamespaceCandidate(const char *name)
virtual void LoadFunctionTemplates(TClass *cl) const
Create list of pointers to function templates for TClass cl.
virtual CallFunc_t * CallFunc_Factory() const
virtual TypedefInfo_t * TypedefInfo_FactoryCopy(TypedefInfo_t *tinfo) const
std::vector< const char * > fCurExecutingMacros
void UpdateListsOnCommitted(const cling::Transaction &T)
virtual void SetAllocunlockfunc(void(*)()) const
[Place holder for Mutex Unlock] Provide the interpreter with a way to release a lock used to protect ...
virtual Long_t ClassInfo_Tagnum(ClassInfo_t *info) const
void UpdateListOfTypes()
No op: see TClingCallbacks (used to update the list of types)
virtual DeclId_t GetDataMemberAtAddr(const void *addr) const
Return pointer to cling DeclId for a data member with a given name.
virtual int DataMemberInfo_ArrayDim(DataMemberInfo_t *dminfo) const
virtual bool ClassInfo_IsBase(ClassInfo_t *info, const char *name) const
virtual int BaseClassInfo_Next(BaseClassInfo_t *bcinfo) const
virtual void GenericError(const char *error) const
Let the interpreter issue a generic error, and set its error state.
virtual std::string MethodArgInfo_TypeNormalizedName(MethodArgInfo_t *marginfo) const
virtual const char * ClassInfo_TmpltName(ClassInfo_t *info) const
virtual TEnum * CreateEnum(void *VD, TClass *cl) const
virtual EReturnType MethodCallReturnType(TFunction *func) const
virtual int UnloadFile(const char *path) const
virtual int Evaluate(const char *, TInterpreterValue &)
Get the interpreter value corresponding to the statement.
TObject * GetObjectAddress(const char *Name, void *&LookupCtx)
If the interpreter encounters Name, check whether that is an object ROOT could retrieve.
virtual Long_t TypeInfo_Property(TypeInfo_t *tinfo) const
DeclId_t GetFunctionWithPrototype(ClassInfo_t *cl, const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Return pointer to cling interface function for a method of a class with a certain prototype,...
void EndOfLineAction()
It calls a "fantom" method to synchronize user keyboard input and ROOT prompt line.
DeclId_t GetFunctionWithValues(ClassInfo_t *cl, const char *method, const char *params, Bool_t objectIsConst=kFALSE)
Return pointer to cling DeclId for a method of a class with a certain prototype, i....
void UpdateListOfLoadedSharedLibraries()
void RegisterModule(const char *modulename, const char **headers, const char **includePaths, const char *payloadCode, const char *fwdDeclsCode, void(*triggerFunc)(), const FwdDeclArgsToKeepCollection_t &fwdDeclsArgToSkip, const char **classesHeaders, Bool_t lateRegistration=false, Bool_t hasCxxModule=false)
Inject the module named "modulename" into cling; load all headers.
virtual const char * DataMemberInfo_ValidArrayIndex(DataMemberInfo_t *dminfo) const
void InitRootmapFile(const char *name)
Create a resource table and read the (possibly) three resource files, i.e $ROOTSYS/etc/system<name> (...
void CreateListOfMethodArgs(TFunction *m) const
Create list of pointers to method arguments for TMethod m.
virtual void TypedefInfo_Init(TypedefInfo_t *tinfo, const char *name) const
virtual Long_t MethodInfo_ExtraProperty(MethodInfo_t *minfo) const
virtual ~TCling()
Destroy the interpreter interface.
void AddFriendToClass(clang::FunctionDecl *, clang::CXXRecordDecl *) const
Inject function as a friend into klass.
std::vector< MutexStateAndRecurseCount > fInitialMutex
Bool_t fCxxModulesEnabled
void RefreshClassInfo(TClass *cl, const clang::NamedDecl *def, bool alias)
Internal function. Actually do the update of the ClassInfo when seeing.
void ExecuteWithArgsAndReturn(TMethod *method, void *address, const void *args[]=0, int nargs=0, void *ret=0) const
virtual void FuncTempInfo_Delete(FuncTempInfo_t *) const
Delete the FuncTempInfo_t.
Bool_t SetSuspendAutoParsing(Bool_t value)
Suspend the Autoparsing of headers.
virtual DataMemberInfo_t * DataMemberInfo_FactoryCopy(DataMemberInfo_t *dminfo) const
virtual CallFuncIFacePtr_t CallFunc_IFacePtr(CallFunc_t *func) const
virtual void CallFunc_ExecWithReturn(CallFunc_t *func, void *address, void *ret) const
virtual MethodArgInfo_t * MethodArgInfo_Factory() const
virtual void DataMemberInfo_Delete(DataMemberInfo_t *dminfo) const
void ApplyToInterpreterMutex(void *delta)
Re-apply the lock count delta that TCling__ResetInterpreterMutex() caused.
void * LazyFunctionCreatorAutoload(const std::string &mangled_name)
Autoload a library based on a missing symbol.
virtual int LoadFile(const char *path) const
Load a source file or library called path into the interpreter.
void CodeComplete(const std::string &, size_t &, std::vector< std::string > &)
The call to Cling's tab complition.
virtual int SetClassAutoloading(int) const
Enable/Disable the Autoloading of libraries.
virtual Long_t FuncTempInfo_Property(FuncTempInfo_t *) const
Return the property of the function template.
virtual TypeInfo_t * MethodInfo_Type(MethodInfo_t *minfo) const
virtual const char * MethodArgInfo_TypeName(MethodArgInfo_t *marginfo) const
Bool_t HandleNewTransaction(const cling::Transaction &T)
Helper function to increase the internal Cling count of transactions that change the AST.
virtual bool DataMemberInfo_IsValid(DataMemberInfo_t *dminfo) const
int ReadRootmapFile(const char *rootmapfile, TUniqueString *uniqueString=nullptr)
Read and parse a rootmapfile in its new format, and return 0 in case of success, -1 if the file has a...
Bool_t IsLoaded(const char *filename) const
Return true if the file has already been loaded by cint.
const char * GetSharedLibs()
Return the list of shared libraries loaded into the process.
virtual const char * GetTopLevelMacroName() const
Return the file name of the current un-included interpreted file.
std::map< SpecialObjectLookupCtx_t, SpecialObjectMap_t > fSpecialObjectMaps
virtual DeclId_t GetDataMemberWithValue(const void *ptrvalue) const
NOT IMPLEMENTED.
virtual bool MethodArgInfo_IsValid(MethodArgInfo_t *marginfo) const
Int_t ReloadAllSharedLibraryMaps()
Reload the library map entries coming from all the loaded shared libraries, after first unloading the...
virtual void SetErrmsgcallback(void *p) const
Set a callback to receive error messages.
virtual std::string ToString(const char *type, void *obj)
virtual const char * MethodInfo_Title(MethodInfo_t *minfo) const
virtual Long_t ClassInfo_GetBaseOffset(ClassInfo_t *fromDerived, ClassInfo_t *toBase, void *address, bool isDerivedObject) const
virtual int DataMemberInfo_TypeSize(DataMemberInfo_t *dminfo) const
virtual ClassInfo_t * ClassInfo_Factory(Bool_t all=kTRUE) const
virtual const char * MethodInfo_GetMangledName(MethodInfo_t *minfo) const
virtual bool CallFunc_IsValid(CallFunc_t *func) const
virtual const char * BaseClassInfo_TmpltName(BaseClassInfo_t *bcinfo) const
virtual void SetAlloclockfunc(void(*)()) const
[Place holder for Mutex Lock] Provide the interpreter with a way to acquire a lock used to protect cr...
virtual void MethodInfo_CreateSignature(MethodInfo_t *minfo, TString &signature) const
void SnapshotMutexState(ROOT::TVirtualRWMutex *mtx)
virtual Bool_t ClassInfo_Contains(ClassInfo_t *info, DeclId_t declid) const
Return true if the entity pointed to by 'declid' is declared in the context described by 'info'.
std::set< size_t > fPayloads
virtual const char * ClassInfo_Name(ClassInfo_t *info) const
Int_t UnloadLibraryMap(const char *library)
Unload library map entries coming from the specified library.
virtual ClassInfo_t * BaseClassInfo_ClassInfo(BaseClassInfo_t *) const
TObjArray * fRootmapFiles
virtual void CallFunc_Delete(CallFunc_t *func) const
virtual Long_t ClassInfo_ClassProperty(ClassInfo_t *info) const
virtual bool ClassInfo_IsLoaded(ClassInfo_t *info) const
std::vector< std::pair< TClass *, DictFuncPtr_t > > fClassesToUpdate
virtual int ClassInfo_GetMethodNArg(ClassInfo_t *info, const char *method, const char *proto, Bool_t objectIsConst=false, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch) const
Int_t DeleteGlobal(void *obj)
Delete obj from Cling symbol table so it cannot be accessed anymore.
virtual const char * GetCurrentMacroName() const
Return the file name of the currently interpreted file, included or not.
const ROOT::TMetaUtils::TNormalizedCtxt & GetNormalizedContext() const
virtual void TypeInfo_Delete(TypeInfo_t *tinfo) const
virtual Bool_t LoadText(const char *text) const
Load the declarations from text into the interpreter.
std::set< TClass * > fModTClasses
void GetInterpreterTypeName(const char *name, std::string &output, Bool_t full=kFALSE)
The 'name' is known to the interpreter, this function returns the internal version of this name (usua...
void * RewindInterpreterMutex()
Reset the interpreter lock to the state it had before interpreter-related calls happened.
virtual Long_t BaseClassInfo_Offset(BaseClassInfo_t *toBaseClassInfo, void *address, bool isDerivedObject) const
TCling(const char *name, const char *title)
virtual int GetSecurityError() const
Interface to cling function.
virtual UInt_t FuncTempInfo_TemplateMinReqArgs(FuncTempInfo_t *) const
Return the number of required template arguments of the function template described by ft_info.
void ResetGlobals()
Reset in Cling the list of global variables to the state saved by the last call to TCling::SaveGlobal...
virtual const char * ClassInfo_Title(ClassInfo_t *info) const
virtual Long_t BaseClassInfo_Property(BaseClassInfo_t *bcinfo) const
virtual FuncTempInfo_t * FuncTempInfo_Factory(DeclId_t declid) const
Construct a FuncTempInfo_t.
void * GetInterfaceMethod(TClass *cl, const char *method, const char *params, Bool_t objectIsConst=kFALSE)
Return pointer to cling interface function for a method of a class with parameters params (params is ...
virtual void ClassInfo_Destruct(ClassInfo_t *info, void *arena) const
virtual const char * BaseClassInfo_FullName(BaseClassInfo_t *bcinfo) const
virtual bool ClassInfo_IsEnum(const char *name) const
Long_t ProcessLine(const char *line, EErrorCode *error=0)
virtual void GetFunctionName(const clang::FunctionDecl *decl, std::string &name) const
virtual void TypedefInfo_Delete(TypedefInfo_t *tinfo) const
void SetGetline(const char *(*getlineFunc)(const char *prompt), void(*histaddFunc)(const char *line))
Set a getline function to call when input is needed.
void UnloadClassMembers(TClass *cl, const clang::DeclContext *DC)
Helper function to go through the members of a class or namespace and unload them.
void RewindDictionary()
Rewind Cling dictionary to the point where it was before executing the current macro.
virtual const char * MapCppName(const char *) const
Interface to cling function.
static void UpdateClassInfoWork(const char *name)
virtual Long_t FuncTempInfo_ExtraProperty(FuncTempInfo_t *) const
Return the property not already defined in Property See TDictionary's EFunctionProperty.
void PrintIntro()
No-op; see TRint instead.
virtual CallFunc_t * CallFunc_FactoryCopy(CallFunc_t *func) const
virtual const char * DataMemberInfo_Name(DataMemberInfo_t *dminfo) const
Bool_t Declare(const char *code)
Declare code to the interpreter, without any of the interpreter actions that could trigger a re-inter...
Int_t DeleteVariable(const char *name)
Undeclare obj called name.
virtual int ClassInfo_Next(ClassInfo_t *info) const
static void * fgSetOfSpecials
void AddIncludePath(const char *path)
Add the given path to the list of directories in which the interpreter looks for include files.
void Execute(TMethod *, TObjArray *, int *=0)
Execute method on this object with parameters stored in the TObjArray.
virtual void CallFunc_SetArgArray(CallFunc_t *func, Long_t *paramArr, Int_t nparam) const
virtual const char * MethodInfo_Name(MethodInfo_t *minfo) const
void ClearFileBusy()
Reset the interpreter internal state in case a previous action was not correctly terminated.
virtual const char * MethodArgInfo_Name(MethodArgInfo_t *marginfo) const
virtual Long_t ClassInfo_Property(ClassInfo_t *info) const
ROOT::TMetaUtils::TNormalizedCtxt * fNormalizedCtxt
virtual int MethodInfo_Next(MethodInfo_t *minfo) const
const char * TypeName(const char *typeDesc)
Return the absolute type of typeDesc.
unsigned long long GetInterpreterStateMarker() const
void SaveContext()
Save the current Cling state.
std::set< TClass * > & GetModTClasses()
virtual bool TypeInfo_IsValid(TypeInfo_t *tinfo) const
Int_t AutoLoad(const char *classname, Bool_t knowDictNotLoaded=kFALSE)
Load library containing the specified class.
TClingCallbacks * fClingCallbacks
TString GetMangledNameWithPrototype(TClass *cl, const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Return the cling mangled name for a method of a class with a certain prototype, i....
void RegisterTClassUpdate(TClass *oldcl, DictFuncPtr_t dict)
Register classes that already existed prior to their dictionary loading and that already had a ClassI...
virtual Long_t DataMemberInfo_Property(DataMemberInfo_t *dminfo) const
void UpdateListOfGlobalFunctions()
No op: see TClingCallbacks (used to update the list of global functions)
Bool_t IsAutoParsingSuspended() const
virtual const char * MethodInfo_GetPrototype(MethodInfo_t *minfo) const
virtual bool ClassInfo_IsValidMethod(ClassInfo_t *info, const char *method, const char *proto, Long_t *offset, ROOT::EFunctionMatchMode=ROOT::kConversionMatch) const
virtual void * ClassInfo_New(ClassInfo_t *info) const
virtual void TypeInfo_Init(TypeInfo_t *tinfo, const char *funcname) const
Bool_t SetErrorMessages(Bool_t enable=kTRUE)
If error messages are disabled, the interpreter should suppress its failures and warning messages fro...
virtual const char * DataMemberInfo_Title(DataMemberInfo_t *dminfo) const
void TransactionRollback(const cling::Transaction &T)
virtual EDataType ClassInfo_GetUnderlyingType(ClassInfo_t *info) const
virtual void CallFunc_Init(CallFunc_t *func) const
virtual UInt_t FuncTempInfo_TemplateNargs(FuncTempInfo_t *) const
Return the maximum number of template arguments of the function template described by ft_info.
TString GetMangledName(TClass *cl, const char *method, const char *params, Bool_t objectIsConst=kFALSE)
Return the cling mangled name for a method of a class with parameters params (params is a string of a...
virtual void SetTempLevel(int val) const
Create / close a scope for temporaries.
void SetProcessLineLock(Bool_t lock=kTRUE)
virtual DeclId_t GetDataMember(ClassInfo_t *cl, const char *name) const
Return pointer to cling Decl of global/static variable that is located at the address given by addr.
void RegisterTemporary(const TInterpreterValue &value)
virtual void LoadEnums(TListOfEnums &cl) const
Create list of pointers to enums for TClass cl.
virtual void CallFunc_SetArg(CallFunc_t *func, Long_t param) const
virtual Long_t GetExecByteCode() const
This routines used to return the address of the internal wrapper function (of the interpreter) that w...
static constexpr const char * kNullArgv[]
virtual void * MethodInfo_InterfaceMethod(MethodInfo_t *minfo) const
Int_t UnloadAllSharedLibraryMaps()
Unload the library map entries coming from all the loaded shared libraries.
virtual void CallFunc_IgnoreExtraArgs(CallFunc_t *func, bool ignore) const
void * SetAutoLoadCallBack(void *cb)
std::vector< cling::Value > * fTemporaries
virtual Long_t MethodInfo_Property(MethodInfo_t *minfo) const
virtual std::unique_ptr< TInterpreterValue > MakeInterpreterValue() const
virtual Long_t DataMemberInfo_Offset(DataMemberInfo_t *dminfo) const
void LibraryLoaded(const void *dyLibHandle, const char *canonicalName)
virtual TypedefInfo_t * TypedefInfo_Factory() const
void UpdateListOfGlobals()
No op: see TClingCallbacks (used to update the list of globals)
void ClearStack()
Delete existing temporary values.
void * SpecialObjectLookupCtx_t
std::map< const cling::Transaction *, size_t > fTransactionHeadersMap
virtual int SetClassAutoparsing(int)
Enable/Disable the Autoparsing of headers.
Bool_t fHeaderParsingOnDemand
Int_t RescanLibraryMap()
Scan again along the dynamic path for library maps.
cling::Interpreter * fInterpreter
virtual int DataMemberInfo_Next(DataMemberInfo_t *dminfo) const
void Reset()
Pressing Ctrl+C should forward here.
Int_t Load(const char *filenam, Bool_t system=kFALSE)
Load a library file in cling's memory.
void InspectMembers(TMemberInspector &, const void *obj, const TClass *cl, Bool_t isTransient)
Visit all members over members, recursing over base classes.
std::hash< std::string > fStringHashFunction
const char * GetIncludePath()
Refresh the list of include paths known to the interpreter and return it with -I prepended.
virtual void ClassInfo_DeleteArray(ClassInfo_t *info, void *arena, bool dtorOnly) const
Long_t ExecuteMacro(const char *filename, EErrorCode *error=0)
Execute a cling macro.
virtual DeclId_t GetEnum(TClass *cl, const char *name) const
Return pointer to cling Decl of global/static variable that is located at the address given by addr.
void GetFunctionOverloads(ClassInfo_t *cl, const char *funcname, std::vector< DeclId_t > &res) const
Insert overloads of name in cl to res.
virtual void CallFunc_Exec(CallFunc_t *func, void *address) const
std::unordered_map< std::string, TObject * > SpecialObjectMap_t
const char * GetSharedLibDeps(const char *lib)
Get the list a libraries on which the specified lib depends.
virtual int DisplayIncludePath(FILE *fout) const
Interface to cling function.
void RegisterLoadedSharedLibrary(const char *name)
Register a new shared library name with the interpreter; add it to fSharedLibs.
virtual void UpdateEnumConstants(TEnum *enumObj, TClass *cl) const
void SaveGlobalsContext()
Save the current Cling state of global objects.
std::unordered_set< const clang::NamespaceDecl * > fNSFromRootmaps
virtual Long_t MethodArgInfo_Property(MethodArgInfo_t *marginfo) const
virtual const char * GetSTLIncludePath() const
Return the directory containing CINT's stl cintdlls.
Int_t LoadLibraryMap(const char *rootmapfile=0)
Load map between class and library.
virtual std::string MethodInfo_TypeNormalizedName(MethodInfo_t *minfo) const
void Execute(const char *function, const char *params, int *error=0)
Execute a global function with arguments params.
virtual const char * ClassInfo_FullName(ClassInfo_t *info) const
TClass * GenerateTClass(const char *classname, Bool_t emulation, Bool_t silent=kFALSE)
Generate a TClass for the given class.
virtual int TypeInfo_Size(TypeInfo_t *tinfo) const
virtual int MethodArgInfo_Next(MethodArgInfo_t *marginfo) const
ROOT::TMetaUtils::TClingLookupHelper * fLookupHelper
virtual bool ClassInfo_HasDefaultConstructor(ClassInfo_t *info) const
virtual const char * TypedefInfo_TrueName(TypedefInfo_t *tinfo) const
Bool_t fIsAutoParsingSuspended
TClass * GetClass(const std::type_info &typeinfo, Bool_t load) const
Demangle the name (from the typeinfo) and then request the class via the usual name based interface (...
DeclId_t GetDeclId(const llvm::GlobalValue *gv) const
Return pointer to cling DeclId for a global value.
Long_t ProcessLineAsynch(const char *line, EErrorCode *error=0)
Let cling process a command line asynch.
virtual std::vector< std::string > GetUsingNamespaces(ClassInfo_t *cl) const
Get the scopes representing using declarations of namespace.
TCling & operator=(const TCling &)
Int_t SetClassSharedLibs(const char *cls, const char *libs)
Register the autoloading information for a class.
virtual void ClassInfo_Init(ClassInfo_t *info, const char *funcname) const
virtual TypeInfo_t * TypeInfo_FactoryCopy(TypeInfo_t *) const
Bool_t CheckClassTemplate(const char *name)
Return true if there is a class template by the given name ...
TObjArray * GetRootMapFiles() const
void * fPrevLoadedDynLibInfo
void UpdateListOfDataMembers(TClass *cl) const
Update the list of pointers to data members for TClass cl This is now a nop.
virtual void SetDeclAttr(DeclId_t, const char *)
virtual Long_t DataMemberInfo_TypeProperty(DataMemberInfo_t *dminfo) const
virtual const char * DataMemberInfo_TypeName(DataMemberInfo_t *dminfo) const
virtual void CallFunc_SetArgs(CallFunc_t *func, const char *param) const
virtual const char * BaseClassInfo_Name(BaseClassInfo_t *bcinfo) const
virtual void MethodInfo_Delete(MethodInfo_t *minfo) const
Interface to cling function.
virtual const char * TypeInfo_TrueName(TypeInfo_t *tinfo) const
std::set< const char * > fParsedPayloadsAddresses
ECheckClassInfo CheckClassInfo(const char *name, Bool_t autoload, Bool_t isClassOrNamespaceOnly=kFALSE)
Checks if an entity with the specified name is defined in Cling.
void EnableAutoLoading()
Enable the automatic loading of shared libraries when a class is used that is stored in a not yet loa...
static void UpdateClassInfo(char *name, Long_t tagnum)
No op: see TClingCallbacks.
virtual void BaseClassInfo_Delete(BaseClassInfo_t *bcinfo) const
void ResetGlobalVar(void *obj)
Reset the Cling 'user' global objects/variables state to the state saved by the last call to TCling::...
Bool_t IsLibraryLoaded(const char *libname) const
TEnv * GetMapfile() const
virtual void Initialize()
Initialize the interpreter, once TROOT::fInterpreter is set.
virtual void * FindSym(const char *entry) const
Interface to cling function.
virtual Long_t CallFunc_ExecInt(CallFunc_t *func, void *address) const
virtual int DataMemberInfo_MaxIndex(DataMemberInfo_t *dminfo, Int_t dim) const
void SetClassInfo(TClass *cl, Bool_t reload=kFALSE)
Set pointer to the TClingClassInfo in TClass.
Long_t ProcessLineSynch(const char *line, EErrorCode *error=0)
Let cling process a command line synchronously, i.e we are waiting it will be finished.
virtual int TypeInfo_RefType(TypeInfo_t *) const
void LoadMacro(const char *filename, EErrorCode *error=0)
Load a macro file in cling's memory.
cling::Interpreter * GetInterpreterImpl()
std::set< size_t > fLookedUpClasses
virtual void CallFunc_ResetArg(CallFunc_t *func) const
virtual Long64_t CallFunc_ExecInt64(CallFunc_t *func, void *address) const
virtual Long_t BaseClassInfo_Tagnum(BaseClassInfo_t *bcinfo) const
void ResetAll()
Reset the Cling state to its initial state.
virtual void ClassInfo_Delete(ClassInfo_t *info) const
virtual DataMemberInfo_t * DataMemberInfo_Factory(ClassInfo_t *clinfo=0) const
virtual Double_t CallFunc_ExecDouble(CallFunc_t *func, void *address) const
UInt_t AutoParseImplRecurse(const char *cls, bool topLevel)
Helper routine for TCling::AutoParse implementing the actual call to the parser and looping over temp...
virtual const char * TypedefInfo_Title(TypedefInfo_t *tinfo) const
void CreateListOfBaseClasses(TClass *cl) const
Create list of pointers to base class(es) for TClass cl.
void RecursiveRemove(TObject *obj)
Delete object from cling symbol table so it can not be used anymore.
virtual MethodArgInfo_t * MethodArgInfo_FactoryCopy(MethodArgInfo_t *marginfo) const
void UpdateListsOnUnloaded(const cling::Transaction &T)
void UpdateClassInfoWithDecl(const clang::NamedDecl *ND)
Internal function. Inform a TClass about its new TagDecl or NamespaceDecl.
virtual const char * ClassInfo_FileName(ClassInfo_t *info) const
virtual void CallFunc_ExecWithArgsAndReturn(CallFunc_t *func, void *address, const void *args[]=0, int nargs=0, void *ret=0) const
DeclId_t GetFunctionTemplate(ClassInfo_t *cl, const char *funcname)
Return pointer to cling interface function for a method of a class with a certain name.
virtual int MethodInfo_NArg(MethodInfo_t *minfo) const
virtual FuncTempInfo_t * FuncTempInfo_FactoryCopy(FuncTempInfo_t *) const
Construct a FuncTempInfo_t.
virtual int TypedefInfo_Size(TypedefInfo_t *tinfo) const
virtual const char * TypedefInfo_Name(TypedefInfo_t *tinfo) const
virtual void CallFunc_SetFuncProto(CallFunc_t *func, ClassInfo_t *info, const char *method, const char *proto, Long_t *Offset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch) const
Interface to cling function.
virtual int DisplayClass(FILE *fout, const char *name, int base, int start) const
const char * GetClassSharedLibs(const char *cls)
Get the list of shared libraries containing the code for class cls.
void * GetAutoLoadCallBack() const
Bool_t IsErrorMessagesEnabled() const
If error messages are disabled, the interpreter should suppress its failures and warning messages fro...
ULong64_t fTransactionCount
virtual Bool_t FuncTempInfo_IsValid(FuncTempInfo_t *) const
Check validity of a FuncTempInfo_t.
virtual BaseClassInfo_t * BaseClassInfo_Factory(ClassInfo_t *info) const
virtual bool TypedefInfo_IsValid(TypedefInfo_t *tinfo) const
virtual MethodInfo_t * MethodInfo_Factory() const
Int_t GetExitCode() const
Int_t AutoParse(const char *cls)
Parse the headers relative to the class Returns 1 in case of success, 0 in case of failure.
virtual EReturnType MethodInfo_MethodCallReturnType(MethodInfo_t *minfo) const
void * GetInterfaceMethodWithPrototype(TClass *cl, const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Return pointer to cling interface function for a method of a class with a certain prototype,...
virtual TypeInfo_t * TypeInfo_Factory() const
std::map< size_t, std::vector< const char * > > fClassesHeadersMap
virtual int MethodInfo_NDefaultArg(MethodInfo_t *minfo) const
Int_t GenerateDictionary(const char *classes, const char *includes="", const char *options=0)
Generate the dictionary for the C++ classes listed in the first argument (in a semi-colon separated l...
virtual void CallFunc_SetFunc(CallFunc_t *func, ClassInfo_t *info, const char *method, const char *params, Long_t *Offset) const
void CreateListOfMethods(TClass *cl) const
Create list of pointers to methods for TClass cl.
void UpdateListOfMethods(TClass *cl) const
Update the list of pointers to method for TClass cl This is now a nop.
cling::MetaProcessor * fMetaProcessor
virtual int ClassInfo_Size(ClassInfo_t *info) const
static void UpdateAllCanvases()
Update all canvases at end the terminal input command.
Bool_t IsProcessLineLocked() const
void LibraryUnloaded(const void *dyLibHandle, const char *canonicalName)
The TEnum class implements the enum type.
The TEnv class reads config files, by default named .rootrc.
Global functions class (global functions are obtained from CINT).
THashTable implements a hash table to store TObject's.
This class defines an abstract interface to a generic command line interpreter.
std::vector< std::pair< std::string, int > > FwdDeclArgsToKeepCollection_t
TDictionary::DeclId_t DeclId_t
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
Abstract base class for accessing the data-members of a class.
Each ROOT class (see TClass) has a linked list of methods.
Mother of all ROOT objects.
Type
enumeration specifying the integration types.
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Namespace for new ROOT classes and functions.
RooCmdArg Offset(Bool_t flag=kTRUE)
bool operator()(const char *a, const char *b) const
std::unique_ptr< ROOT::TVirtualRWMutex::State > fState
State of gCoreMutex when the first interpreter-related function was invoked.
Int_t fRecurseCount
Interpreter-related functions will push the "entry" lock state to *this.
static void output(int code)