Logo ROOT  
Reference Guide
Go to the documentation of this file.
1 // @(#)root/meta:$Id$
2 // Author: Axel Naumann, 2011-10-19
4 /*************************************************************************
5  * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
13 #ifndef ROOT_TCling
14 #define ROOT_TCling
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TCling //
19 // //
20 // This class defines an interface to the cling C++ interpreter. //
21 // //
22 // Cling is a full ANSI compliant C++ interpreter based on //
23 // clang/LLVM technology. //
24 // //
25 //////////////////////////////////////////////////////////////////////////
27 #include "TInterpreter.h"
29 #include <map>
30 #include <memory>
31 #include <set>
32 #include <tuple>
33 #include <unordered_map>
34 #include <unordered_set>
35 #include <vector>
37 #ifndef WIN32
38 #define TWin32SendClass char
39 #endif
41 namespace llvm {
42  class GlobalValue;
43  class StringRef;
44 }
46 namespace clang {
47  class CXXRecordDecl;
48  class Decl;
49  class DeclContext;
50  class EnumDecl;
51  class FunctionDecl;
52  class NamedDecl;
53  class NamespaceDecl;
54  class TagDecl;
55  class Type;
56  class QualType;
57 }
58 namespace cling {
59  class Interpreter;
60  class MetaProcessor;
61  class Transaction;
62  class Value;
63 }
65 class TClingCallbacks;
66 class TEnv;
67 class TFile;
68 class THashTable;
69 class TInterpreterValue;
70 class TMethod;
71 class TObjArray;
72 class TListOfDataMembers;
73 class TListOfFunctions;
75 class TListOfEnums;
77 namespace ROOT {
78  namespace TMetaUtils {
79  class TNormalizedCtxt;
80  class TClingLookupHelper;
81  }
82 }
84 extern "C" {
85  void TCling__UpdateListsOnCommitted(const cling::Transaction&,
86  cling::Interpreter*);
87  void TCling__UpdateListsOnUnloaded(const cling::Transaction&);
88  void TCling__InvalidateGlobal(const clang::Decl*);
89  void TCling__TransactionRollback(const cling::Transaction&);
90  TObject* TCling__GetObjectAddress(const char *Name, void *&LookupCtx);
91  const clang::Decl* TCling__GetObjectDecl(TObject *obj);
92  void TCling__LibraryLoaded(const void* dyLibHandle,
93  const char* canonicalName);
94  void TCling__LibraryUnloaded(const void* dyLibHandle,
95  const char* canonicalName);
96  void TCling__RegisterRdictForLoadPCM(const std::string &pcmFileNameFullPath, llvm::StringRef *pcmContent);
97 }
99 class TCling final : public TInterpreter {
100 private: // Static Data Members
102  static void* fgSetOfSpecials; // set of TObjects used in CINT variables
104 private: // Data Members
106  Int_t fMore; // The brace indent level for the cint command line processor.
107  Int_t fExitCode; // Value passed to exit() in interpreter.
108  char fPrompt[64]; // Command line prompt string.
109  //cling::DictPosition fDictPos; // dictionary context after initialization is complete.
110  //cling::DictPosition fDictPosGlobals; // dictionary context after ResetGlobals().
111  TString fSharedLibs; // Shared libraries loaded by G__loadfile().
112  Int_t fGlobalsListSerial;// Last time we refreshed the ROOT list of globals.
113  TString fIncludePath; // Interpreter include path.
114  TString fRootmapLoadPath; // Dynamic load path for rootmap files.
115  TEnv* fMapfile; // Association of classes to libraries.
116  std::vector<std::string> fAutoLoadLibStorage; // A storage to return a const char* from GetClassSharedLibsForModule.
117  std::map<size_t,std::vector<const char*>> fClassesHeadersMap; // Map of classes hashes and headers associated
118  std::map<const cling::Transaction*,size_t> fTransactionHeadersMap; // Map which transaction contains which autoparse.
119  std::set<size_t> fLookedUpClasses; // Set of classes for which headers were looked up already
120  std::set<size_t> fPayloads; // Set of payloads
121  std::set<const char*> fParsedPayloadsAddresses; // Set of payloads which were parsed
122  std::hash<std::string> fStringHashFunction; // A simple hashing function
123  std::unordered_set<const clang::NamespaceDecl*> fNSFromRootmaps; // Collection of namespaces fwd declared in the rootmaps
124  TObjArray* fRootmapFiles; // Loaded rootmap files.
125  Bool_t fLockProcessLine; // True if ProcessLine should lock gInterpreterMutex.
126  Bool_t fCxxModulesEnabled;// True if C++ modules was enabled
128  std::unique_ptr<cling::Interpreter> fInterpreter; // The interpreter.
129  std::unique_ptr<cling::MetaProcessor> fMetaProcessor; // The metaprocessor.
131  std::vector<cling::Value> *fTemporaries; // Stack of temporaries
132  ROOT::TMetaUtils::TNormalizedCtxt *fNormalizedCtxt; // Which typedef to avoid stripping.
133  ROOT::TMetaUtils::TClingLookupHelper *fLookupHelper; // lookup helper used by TClassEdit
135  void* fPrevLoadedDynLibInfo; // Internal info to mark the last loaded libray.
136  std::vector<void*> fRegisterModuleDyLibs; // Stack of libraries currently running RegisterModule
137  TClingCallbacks* fClingCallbacks; // cling::Interpreter owns it.
138  struct CharPtrCmp_t {
139  bool operator()(const char* a, const char *b) const {
140  return strcmp(a, b) < 0;
141  }
142  };
143  std::set<TClass*> fModTClasses;
144  std::vector<std::pair<TClass*,DictFuncPtr_t> > fClassesToUpdate;
146  ULong64_t fTransactionCount; // Cling counter for commited or unloaded transactions which changed the AST.
147  std::vector<const char*> fCurExecutingMacros;
150  typedef std::unordered_map<std::string, TObject*> SpecialObjectMap_t;
151  std::map<SpecialObjectLookupCtx_t, SpecialObjectMap_t> fSpecialObjectMaps;
154  /// State of gCoreMutex when the first interpreter-related function was invoked.
155  std::unique_ptr<ROOT::TVirtualRWMutex::State> fState;
157  /// Interpreter-related functions will push the "entry" lock state to *this.
158  /// Recursive calls will do that, too - but we must only forget about the lock
159  /// state once this recursion count went to 0.
162  operator bool() const { return (bool)fState; }
163  };
165  std::vector<MutexStateAndRecurseCount> fInitialMutex{1};
167  DeclId_t GetDeclId(const llvm::GlobalValue *gv) const;
169  static Int_t DeepAutoLoadImpl(const char *cls);
170  static Int_t ShallowAutoLoadImpl(const char *cls);
175  UInt_t AutoParseImplRecurse(const char *cls, bool topLevel);
176  constexpr static const char* kNullArgv[] = {nullptr};
178  bool fIsShuttingDown = false;
180 protected:
183 public: // Public Interface
185  virtual ~TCling();
186  TCling(const char* name, const char* title, const char* const argv[]);
187  TCling(const char* name, const char* title): TCling(name, title, kNullArgv) {}
189  void AddIncludePath(const char* path);
190  void *GetAutoLoadCallBack() const { return fAutoLoadCallBack; }
191  void *SetAutoLoadCallBack(void* cb) { void* prev = fAutoLoadCallBack; fAutoLoadCallBack = cb; return prev; }
192  Int_t AutoLoad(const char *classname, Bool_t knowDictNotLoaded = kFALSE);
193  Int_t AutoLoad(const std::type_info& typeinfo, Bool_t knowDictNotLoaded = kFALSE);
194  Int_t AutoParse(const char* cls);
195  void* LazyFunctionCreatorAutoload(const std::string& mangled_name);
196  bool LibraryLoadingFailed(const std::string&, const std::string&, bool, bool);
197  Bool_t IsAutoLoadNamespaceCandidate(const clang::NamespaceDecl* nsDecl);
198  void ClearFileBusy();
199  void ClearStack(); // Delete existing temporary values
200  Bool_t Declare(const char* code);
201  void EndOfLineAction();
202  TClass *GetClass(const std::type_info& typeinfo, Bool_t load) const;
203  Int_t GetExitCode() const { return fExitCode; }
204  TEnv* GetMapfile() const { return fMapfile; }
205  Int_t GetMore() const { return fMore; }
206  TClass *GenerateTClass(const char *classname, Bool_t emulation, Bool_t silent = kFALSE);
207  TClass *GenerateTClass(ClassInfo_t *classinfo, Bool_t silent = kFALSE);
208  Int_t GenerateDictionary(const char* classes, const char* includes = "", const char* options = 0);
209  char* GetPrompt() { return fPrompt; }
210  const char* GetSharedLibs();
211  const char* GetClassSharedLibs(const char* cls);
212  const char* GetSharedLibDeps(const char* lib, bool tryDyld = false);
213  const char* GetIncludePath();
214  virtual const char* GetSTLIncludePath() const;
216  unsigned long long GetInterpreterStateMarker() const { return fTransactionCount;}
217  virtual void Initialize();
218  virtual void ShutDown();
219  void InspectMembers(TMemberInspector&, const void* obj, const TClass* cl, Bool_t isTransient);
220  Bool_t IsLoaded(const char* filename) const;
221  Bool_t IsLibraryLoaded(const char* libname) const;
222  Bool_t HasPCMForLibrary(const char *libname) const;
223  Int_t Load(const char* filenam, Bool_t system = kFALSE);
224  void LoadMacro(const char* filename, EErrorCode* error = 0);
225  Int_t LoadLibraryMap(const char* rootmapfile = 0);
229  Int_t UnloadLibraryMap(const char* library);
230  Long_t ProcessLine(const char* line, EErrorCode* error = 0);
231  Long_t ProcessLineAsynch(const char* line, EErrorCode* error = 0);
232  Long_t ProcessLineSynch(const char* line, EErrorCode* error = 0);
233  void PrintIntro();
234  bool RegisterPrebuiltModulePath(const std::string& FullPath,
235  const std::string& ModuleMapName = "module.modulemap") const;
236  void RegisterModule(const char* modulename,
237  const char** headers,
238  const char** includePaths,
239  const char* payloadCode,
240  const char* fwdDeclsCode,
241  void (*triggerFunc)(),
242  const FwdDeclArgsToKeepCollection_t& fwdDeclsArgToSkip,
243  const char** classesHeaders,
244  Bool_t lateRegistration = false,
245  Bool_t hasCxxModule = false);
246  void RegisterTClassUpdate(TClass *oldcl,DictFuncPtr_t dict);
247  void UnRegisterTClassUpdate(const TClass *oldcl);
249  Int_t SetClassSharedLibs(const char *cls, const char *libs);
250  void SetGetline(const char * (*getlineFunc)(const char* prompt),
251  void (*histaddFunc)(const char* line));
252  void Reset();
253  void ResetAll();
254  void ResetGlobals();
255  void ResetGlobalVar(void* obj);
256  void RewindDictionary();
257  Int_t DeleteGlobal(void* obj);
258  Int_t DeleteVariable(const char *name);
259  void SaveContext();
260  void SaveGlobalsContext();
261  void UpdateListOfGlobals();
263  void UpdateListOfTypes();
264  void SetClassInfo(TClass* cl, Bool_t reload = kFALSE);
266  ECheckClassInfo CheckClassInfo(const char *name, Bool_t autoload, Bool_t isClassOrNamespaceOnly = kFALSE);
268  Bool_t CheckClassTemplate(const char *name);
269  Long_t Calc(const char* line, EErrorCode* error = 0);
270  void CreateListOfBaseClasses(TClass* cl) const;
271  void CreateListOfDataMembers(TClass* cl) const;
272  void CreateListOfMethods(TClass* cl) const;
273  void CreateListOfMethodArgs(TFunction* m) const;
274  void UpdateListOfMethods(TClass* cl) const;
275  void UpdateListOfDataMembers(TClass* cl) const;
277  virtual DeclId_t GetDataMember(ClassInfo_t *cl, const char *name) const;
278  virtual DeclId_t GetDataMemberAtAddr(const void *addr) const;
279  virtual DeclId_t GetDataMemberWithValue(const void *ptrvalue) const;
280  virtual DeclId_t GetEnum(TClass *cl, const char *name) const;
281  virtual TEnum* CreateEnum(void *VD, TClass *cl) const;
282  virtual void UpdateEnumConstants(TEnum* enumObj, TClass* cl) const;
283  virtual void LoadEnums(TListOfEnums& cl) const;
284  virtual std::string ToString(const char* type, void *obj);
285  TString GetMangledName(TClass* cl, const char* method, const char* params, Bool_t objectIsConst = kFALSE);
286  TString GetMangledNameWithPrototype(TClass* cl, const char* method, const char* proto, Bool_t objectIsConst = kFALSE, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch);
287  void* GetInterfaceMethod(TClass* cl, const char* method, const char* params, Bool_t objectIsConst = kFALSE);
288  void* GetInterfaceMethodWithPrototype(TClass* cl, const char* method, const char* proto, Bool_t objectIsConst = kFALSE, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch);
289  DeclId_t GetFunction(ClassInfo_t *cl, const char *funcname);
290  DeclId_t GetFunctionWithPrototype(ClassInfo_t *cl, const char* method, const char* proto, Bool_t objectIsConst = kFALSE, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch);
291  DeclId_t GetFunctionWithValues(ClassInfo_t *cl, const char* method, const char* params, Bool_t objectIsConst = kFALSE);
292  DeclId_t GetFunctionTemplate(ClassInfo_t *cl, const char *funcname);
293  void GetFunctionOverloads(ClassInfo_t *cl, const char *funcname, std::vector<DeclId_t>& res) const;
294  virtual void LoadFunctionTemplates(TClass* cl) const;
296  virtual std::vector<std::string> GetUsingNamespaces(ClassInfo_t *cl) const;
298  void GetInterpreterTypeName(const char* name, std::string &output, Bool_t full = kFALSE);
299  void Execute(const char* function, const char* params, int* error = 0);
300  void Execute(TObject* obj, TClass* cl, const char* method, const char* params, int* error = 0);
301  void Execute(TObject* obj, TClass* cl, const char* method, const char* params, Bool_t objectIsConst, int* error = 0);
302  void Execute(TObject* obj, TClass* cl, TMethod* method, TObjArray* params, int* error = 0);
303  void ExecuteWithArgsAndReturn(TMethod* method, void* address, const void* args[] = 0, int nargs = 0, void* ret= 0) const;
304  Long_t ExecuteMacro(const char* filename, EErrorCode* error = 0);
305  void RecursiveRemove(TObject* obj);
309  return fLockProcessLine;
310  }
312  fLockProcessLine = lock;
313  }
314  const char* TypeName(const char* typeDesc);
317  void ForgetMutexState();
319  void ApplyToInterpreterMutex(void* delta);
320  void *RewindInterpreterMutex();
322  static void UpdateClassInfo(char* name, Long_t tagnum);
323  static void UpdateClassInfoWork(const char* name);
324  void RefreshClassInfo(TClass *cl, const clang::NamedDecl *def, bool alias);
325  void UpdateClassInfoWithDecl(const clang::NamedDecl* ND);
326  static void UpdateAllCanvases();
328  // Misc
329  virtual int DisplayClass(FILE* fout, const char* name, int base, int start) const;
330  virtual int DisplayIncludePath(FILE* fout) const;
331  virtual void* FindSym(const char* entry) const;
332  virtual void GenericError(const char* error) const;
333  virtual Long_t GetExecByteCode() const;
334  virtual const char* GetTopLevelMacroName() const;
335  virtual const char* GetCurrentMacroName() const;
336  virtual int GetSecurityError() const;
337  virtual int LoadFile(const char* path) const;
338  virtual Bool_t LoadText(const char* text) const;
339  virtual const char* MapCppName(const char*) const;
340  virtual void SetAlloclockfunc(void (*)()) const;
341  virtual void SetAllocunlockfunc(void (*)()) const;
342  virtual int SetClassAutoLoading(int) const;
343  virtual int SetClassAutoparsing(int) ;
345  virtual void SetErrmsgcallback(void* p) const;
346  virtual void SetTempLevel(int val) const;
347  virtual int UnloadFile(const char* path) const;
349  void CodeComplete(const std::string&, size_t&,
350  std::vector<std::string>&);
351  virtual int Evaluate(const char*, TInterpreterValue&);
352  virtual std::unique_ptr<TInterpreterValue> MakeInterpreterValue() const;
353  void RegisterTemporary(const TInterpreterValue& value);
354  void RegisterTemporary(const cling::Value& value);
356  TObject* GetObjectAddress(const char *Name, void *&LookupCtx);
359  // core/meta helper functions.
360  virtual EReturnType MethodCallReturnType(TFunction *func) const;
361  virtual void GetFunctionName(const clang::Decl *decl, std::string &name) const;
362  virtual bool DiagnoseIfInterpreterException(const std::exception &e) const;
364  // CallFunc interface
365  virtual DeclId_t GetDeclId(CallFunc_t *info) const;
366  virtual void CallFunc_Delete(CallFunc_t* func) const;
367  virtual void CallFunc_Exec(CallFunc_t* func, void* address) const;
368  virtual void CallFunc_Exec(CallFunc_t* func, void* address, TInterpreterValue& val) const;
369  virtual void CallFunc_ExecWithReturn(CallFunc_t* func, void* address, void* ret) const;
370  virtual void CallFunc_ExecWithArgsAndReturn(CallFunc_t* func, void* address, const void* args[] = 0, int nargs = 0, void* ret = 0) const;
371  virtual Long_t CallFunc_ExecInt(CallFunc_t* func, void* address) const;
372  virtual Long64_t CallFunc_ExecInt64(CallFunc_t* func, void* address) const;
373  virtual Double_t CallFunc_ExecDouble(CallFunc_t* func, void* address) const;
374  virtual CallFunc_t* CallFunc_Factory() const;
375  virtual CallFunc_t* CallFunc_FactoryCopy(CallFunc_t* func) const;
376  virtual MethodInfo_t* CallFunc_FactoryMethod(CallFunc_t* func) const;
377  virtual void CallFunc_IgnoreExtraArgs(CallFunc_t* func, bool ignore) const;
378  virtual void CallFunc_Init(CallFunc_t* func) const;
379  virtual bool CallFunc_IsValid(CallFunc_t* func) const;
380  virtual CallFuncIFacePtr_t CallFunc_IFacePtr(CallFunc_t * func) const;
381  virtual void CallFunc_ResetArg(CallFunc_t* func) const;
382  virtual void CallFunc_SetArg(CallFunc_t* func, Long_t param) const;
383  virtual void CallFunc_SetArg(CallFunc_t* func, ULong_t param) const;
384  virtual void CallFunc_SetArg(CallFunc_t* func, Float_t param) const;
385  virtual void CallFunc_SetArg(CallFunc_t* func, Double_t param) const;
386  virtual void CallFunc_SetArg(CallFunc_t* func, Long64_t param) const;
387  virtual void CallFunc_SetArg(CallFunc_t* func, ULong64_t param) const;
388  virtual void CallFunc_SetArgArray(CallFunc_t* func, Long_t* paramArr, Int_t nparam) const;
389  virtual void CallFunc_SetArgs(CallFunc_t* func, const char* param) const;
390  virtual void CallFunc_SetFunc(CallFunc_t* func, ClassInfo_t* info, const char* method, const char* params, Long_t* Offset) const;
391  virtual void CallFunc_SetFunc(CallFunc_t* func, ClassInfo_t* info, const char* method, const char* params, bool objectIsConst, Long_t* Offset) const;
392  virtual void CallFunc_SetFunc(CallFunc_t* func, MethodInfo_t* info) const;
393  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;
394  virtual void CallFunc_SetFuncProto(CallFunc_t* func, ClassInfo_t* info, const char* method, const char* proto, bool objectIsConst, Long_t* Offset, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) const;
395  virtual void CallFunc_SetFuncProto(CallFunc_t* func, ClassInfo_t* info, const char* method, const std::vector<TypeInfo_t*> &proto, Long_t* Offset, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) const;
396  virtual void CallFunc_SetFuncProto(CallFunc_t* func, ClassInfo_t* info, const char* method, const std::vector<TypeInfo_t*> &proto, bool objectIsConst, Long_t* Offset, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) const;
398  virtual std::string CallFunc_GetWrapperCode(CallFunc_t *func) const;
400  // ClassInfo interface
401  virtual DeclId_t GetDeclId(ClassInfo_t *info) const;
402  virtual Bool_t ClassInfo_Contains(ClassInfo_t *info, DeclId_t declid) const;
403  virtual Long_t ClassInfo_ClassProperty(ClassInfo_t* info) const;
404  virtual void ClassInfo_Delete(ClassInfo_t* info) const;
405  virtual void ClassInfo_Delete(ClassInfo_t* info, void* arena) const;
406  virtual void ClassInfo_DeleteArray(ClassInfo_t* info, void* arena, bool dtorOnly) const;
407  virtual void ClassInfo_Destruct(ClassInfo_t* info, void* arena) const;
408  virtual ClassInfo_t* ClassInfo_Factory(Bool_t all = kTRUE) const;
409  virtual ClassInfo_t* ClassInfo_Factory(ClassInfo_t* cl) const;
410  virtual ClassInfo_t* ClassInfo_Factory(const char* name) const;
411  virtual ClassInfo_t* ClassInfo_Factory(DeclId_t declid) const;
412  virtual Long_t ClassInfo_GetBaseOffset(ClassInfo_t* fromDerived, ClassInfo_t* toBase, void * address, bool isDerivedObject) const;
413  virtual int ClassInfo_GetMethodNArg(ClassInfo_t* info, const char* method, const char* proto, Bool_t objectIsConst = false, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) const;
414  virtual bool ClassInfo_HasDefaultConstructor(ClassInfo_t* info, Bool_t testio = kFALSE) const;
415  virtual bool ClassInfo_HasMethod(ClassInfo_t* info, const char* name) const;
416  virtual void ClassInfo_Init(ClassInfo_t* info, const char* funcname) const;
417  virtual void ClassInfo_Init(ClassInfo_t* info, int tagnum) const;
418  virtual bool ClassInfo_IsBase(ClassInfo_t* info, const char* name) const;
419  virtual bool ClassInfo_IsEnum(const char* name) const;
420  virtual bool ClassInfo_IsScopedEnum(ClassInfo_t* info) const;
421  virtual EDataType ClassInfo_GetUnderlyingType(ClassInfo_t* info) const;
422  virtual bool ClassInfo_IsLoaded(ClassInfo_t* info) const;
423  virtual bool ClassInfo_IsValid(ClassInfo_t* info) const;
424  virtual bool ClassInfo_IsValidMethod(ClassInfo_t* info, const char* method, const char* proto, Long_t* offset, ROOT::EFunctionMatchMode /* mode */ = ROOT::kConversionMatch) const;
425  virtual bool ClassInfo_IsValidMethod(ClassInfo_t* info, const char* method, const char* proto, Bool_t objectIsConst, Long_t* offset, ROOT::EFunctionMatchMode /* mode */ = ROOT::kConversionMatch) const;
426  virtual int ClassInfo_Next(ClassInfo_t* info) const;
427  virtual void* ClassInfo_New(ClassInfo_t* info) const;
428  virtual void* ClassInfo_New(ClassInfo_t* info, int n) const;
429  virtual void* ClassInfo_New(ClassInfo_t* info, int n, void* arena) const;
430  virtual void* ClassInfo_New(ClassInfo_t* info, void* arena) const;
431  virtual Long_t ClassInfo_Property(ClassInfo_t* info) const;
432  virtual int ClassInfo_Size(ClassInfo_t* info) const;
433  virtual Long_t ClassInfo_Tagnum(ClassInfo_t* info) const;
434  virtual const char* ClassInfo_FileName(ClassInfo_t* info) const;
435  virtual const char* ClassInfo_FullName(ClassInfo_t* info) const;
436  virtual const char* ClassInfo_Name(ClassInfo_t* info) const;
437  virtual const char* ClassInfo_Title(ClassInfo_t* info) const;
438  virtual const char* ClassInfo_TmpltName(ClassInfo_t* info) const;
440  // BaseClassInfo interface
441  virtual void BaseClassInfo_Delete(BaseClassInfo_t* bcinfo) const;
442  virtual BaseClassInfo_t* BaseClassInfo_Factory(ClassInfo_t* info) const;
443  virtual BaseClassInfo_t* BaseClassInfo_Factory(ClassInfo_t* derived,
444  ClassInfo_t* base) const;
445  virtual int BaseClassInfo_Next(BaseClassInfo_t* bcinfo) const;
446  virtual int BaseClassInfo_Next(BaseClassInfo_t* bcinfo, int onlyDirect) const;
447  virtual Long_t BaseClassInfo_Offset(BaseClassInfo_t* toBaseClassInfo, void * address, bool isDerivedObject) const;
448  virtual Long_t BaseClassInfo_Property(BaseClassInfo_t* bcinfo) const;
449  virtual Long_t BaseClassInfo_Tagnum(BaseClassInfo_t* bcinfo) const;
450  virtual ClassInfo_t*BaseClassInfo_ClassInfo(BaseClassInfo_t * /* bcinfo */) const;
451  virtual const char* BaseClassInfo_FullName(BaseClassInfo_t* bcinfo) const;
452  virtual const char* BaseClassInfo_Name(BaseClassInfo_t* bcinfo) const;
453  virtual const char* BaseClassInfo_TmpltName(BaseClassInfo_t* bcinfo) const;
455  // DataMemberInfo interface
456  virtual DeclId_t GetDeclId(DataMemberInfo_t *info) const;
457  virtual int DataMemberInfo_ArrayDim(DataMemberInfo_t* dminfo) const;
458  virtual void DataMemberInfo_Delete(DataMemberInfo_t* dminfo) const;
459  virtual DataMemberInfo_t* DataMemberInfo_Factory(ClassInfo_t* clinfo, TDictionary::EMemberSelection selection) const;
460  virtual DataMemberInfo_t *DataMemberInfo_Factory(DeclId_t declid, ClassInfo_t* clinfo) const;
461  virtual DataMemberInfo_t* DataMemberInfo_FactoryCopy(DataMemberInfo_t* dminfo) const;
462  virtual bool DataMemberInfo_IsValid(DataMemberInfo_t* dminfo) const;
463  virtual int DataMemberInfo_MaxIndex(DataMemberInfo_t* dminfo, Int_t dim) const;
464  virtual int DataMemberInfo_Next(DataMemberInfo_t* dminfo) const;
465  virtual Long_t DataMemberInfo_Offset(DataMemberInfo_t* dminfo) const;
466  virtual Long_t DataMemberInfo_Property(DataMemberInfo_t* dminfo) const;
467  virtual Long_t DataMemberInfo_TypeProperty(DataMemberInfo_t* dminfo) const;
468  virtual int DataMemberInfo_TypeSize(DataMemberInfo_t* dminfo) const;
469  virtual const char* DataMemberInfo_TypeName(DataMemberInfo_t* dminfo) const;
470  virtual const char* DataMemberInfo_TypeTrueName(DataMemberInfo_t* dminfo) const;
471  virtual const char* DataMemberInfo_Name(DataMemberInfo_t* dminfo) const;
472  virtual const char* DataMemberInfo_Title(DataMemberInfo_t* dminfo) const;
473  virtual const char* DataMemberInfo_ValidArrayIndex(DataMemberInfo_t* dminfo) const;
474  virtual void SetDeclAttr(DeclId_t, const char* /* attribute */);
477  // Function Template interface
478  virtual DeclId_t GetDeclId(FuncTempInfo_t *info) const;
479  virtual void FuncTempInfo_Delete(FuncTempInfo_t * /* ft_info */) const;
480  virtual FuncTempInfo_t *FuncTempInfo_Factory(DeclId_t declid) const;
481  virtual FuncTempInfo_t *FuncTempInfo_FactoryCopy(FuncTempInfo_t * /* ft_info */) const;
482  virtual Bool_t FuncTempInfo_IsValid(FuncTempInfo_t * /* ft_info */) const;
483  virtual UInt_t FuncTempInfo_TemplateNargs(FuncTempInfo_t * /* ft_info */) const;
484  virtual UInt_t FuncTempInfo_TemplateMinReqArgs(FuncTempInfo_t * /* ft_info */) const;
485  virtual Long_t FuncTempInfo_Property(FuncTempInfo_t * /* ft_info */) const;
486  virtual Long_t FuncTempInfo_ExtraProperty(FuncTempInfo_t * /* ft_info */) const;
487  virtual void FuncTempInfo_Name(FuncTempInfo_t * /* ft_info */, TString& name) const;
488  virtual void FuncTempInfo_Title(FuncTempInfo_t * /* ft_info */, TString& name) const;
490  // MethodInfo interface
491  virtual DeclId_t GetDeclId(MethodInfo_t *info) const;
492  virtual void MethodInfo_CreateSignature(MethodInfo_t* minfo, TString& signature) const;
493  virtual void MethodInfo_Delete(MethodInfo_t* minfo) const;
494  virtual MethodInfo_t* MethodInfo_Factory() const;
495  virtual MethodInfo_t* MethodInfo_Factory(ClassInfo_t *clinfo) const;
496  virtual MethodInfo_t *MethodInfo_Factory(DeclId_t declid) const;
497  virtual MethodInfo_t* MethodInfo_FactoryCopy(MethodInfo_t* minfo) const;
498  virtual void* MethodInfo_InterfaceMethod(MethodInfo_t* minfo) const;
499  virtual bool MethodInfo_IsValid(MethodInfo_t* minfo) const;
500  virtual int MethodInfo_NArg(MethodInfo_t* minfo) const;
501  virtual int MethodInfo_NDefaultArg(MethodInfo_t* minfo) const;
502  virtual int MethodInfo_Next(MethodInfo_t* minfo) const;
503  virtual Long_t MethodInfo_Property(MethodInfo_t* minfo) const;
504  virtual Long_t MethodInfo_ExtraProperty(MethodInfo_t* minfo) const;
505  virtual TypeInfo_t* MethodInfo_Type(MethodInfo_t* minfo) const;
506  virtual EReturnType MethodInfo_MethodCallReturnType(MethodInfo_t* minfo) const;
507  virtual const char* MethodInfo_GetMangledName(MethodInfo_t* minfo) const;
508  virtual const char* MethodInfo_GetPrototype(MethodInfo_t* minfo) const;
509  virtual const char* MethodInfo_Name(MethodInfo_t* minfo) const;
510  virtual const char* MethodInfo_TypeName(MethodInfo_t* minfo) const;
511  virtual std::string MethodInfo_TypeNormalizedName(MethodInfo_t* minfo) const;
512  virtual const char* MethodInfo_Title(MethodInfo_t* minfo) const;
514  // MethodArgInfo interface
515  virtual void MethodArgInfo_Delete(MethodArgInfo_t* marginfo) const;
516  virtual MethodArgInfo_t* MethodArgInfo_Factory() const;
517  virtual MethodArgInfo_t* MethodArgInfo_Factory(MethodInfo_t *minfo) const;
518  virtual MethodArgInfo_t* MethodArgInfo_FactoryCopy(MethodArgInfo_t* marginfo) const;
519  virtual bool MethodArgInfo_IsValid(MethodArgInfo_t* marginfo) const;
520  virtual int MethodArgInfo_Next(MethodArgInfo_t* marginfo) const;
521  virtual Long_t MethodArgInfo_Property(MethodArgInfo_t* marginfo) const;
522  virtual const char* MethodArgInfo_DefaultValue(MethodArgInfo_t* marginfo) const;
523  virtual const char* MethodArgInfo_Name(MethodArgInfo_t* marginfo) const;
524  virtual const char* MethodArgInfo_TypeName(MethodArgInfo_t* marginfo) const;
525  virtual std::string MethodArgInfo_TypeNormalizedName(MethodArgInfo_t *marginfo) const;
527  // TypeInfo interface
528  virtual void TypeInfo_Delete(TypeInfo_t* tinfo) const;
529  virtual TypeInfo_t* TypeInfo_Factory() const;
530  virtual TypeInfo_t *TypeInfo_Factory(const char* name) const;
531  virtual TypeInfo_t* TypeInfo_FactoryCopy(TypeInfo_t* /* tinfo */) const;
532  virtual void TypeInfo_Init(TypeInfo_t* tinfo, const char* funcname) const;
533  virtual bool TypeInfo_IsValid(TypeInfo_t* tinfo) const;
534  virtual const char* TypeInfo_Name(TypeInfo_t* /* info */) const;
535  virtual Long_t TypeInfo_Property(TypeInfo_t* tinfo) const;
536  virtual int TypeInfo_RefType(TypeInfo_t* /* tinfo */) const;
537  virtual int TypeInfo_Size(TypeInfo_t* tinfo) const;
538  virtual const char* TypeInfo_TrueName(TypeInfo_t* tinfo) const;
540  // TypedefInfo interface
541  virtual DeclId_t GetDeclId(TypedefInfo_t *info) const;
542  virtual void TypedefInfo_Delete(TypedefInfo_t* tinfo) const;
543  virtual TypedefInfo_t* TypedefInfo_Factory() const;
544  virtual TypedefInfo_t* TypedefInfo_Factory(const char* name) const;
545  virtual TypedefInfo_t* TypedefInfo_FactoryCopy(TypedefInfo_t* tinfo) const;
546  virtual void TypedefInfo_Init(TypedefInfo_t* tinfo, const char* name) const;
547  virtual bool TypedefInfo_IsValid(TypedefInfo_t* tinfo) const;
548  virtual int TypedefInfo_Next(TypedefInfo_t* tinfo) const;
549  virtual Long_t TypedefInfo_Property(TypedefInfo_t* tinfo) const;
550  virtual int TypedefInfo_Size(TypedefInfo_t* tinfo) const;
551  virtual const char* TypedefInfo_TrueName(TypedefInfo_t* tinfo) const;
552  virtual const char* TypedefInfo_Name(TypedefInfo_t* tinfo) const;
553  virtual const char* TypedefInfo_Title(TypedefInfo_t* tinfo) const;
555  std::set<TClass*>& GetModTClasses() { return fModTClasses; }
557  void HandleNewDecl(const void* DV, bool isDeserialized, std::set<TClass*>& modifiedClasses);
558  void UpdateListsOnCommitted(const cling::Transaction &T);
559  void UpdateListsOnUnloaded(const cling::Transaction &T);
560  void InvalidateGlobal(const clang::Decl *D);
561  void TransactionRollback(const cling::Transaction &T);
562  void LibraryLoaded(const void* dyLibHandle, const char* canonicalName);
563  void LibraryUnloaded(const void* dyLibHandle, const char* canonicalName);
565 private: // Private Utility Functions and Classes
566  template <typename List, typename Object>
567  static void RemoveAndInvalidateObject(List &L, Object *O) {
568  // Invalidate stored information by setting the `xxxInfo_t' to nullptr.
569  if (O && O->IsValid())
570  L.Unload(O), O->Update(nullptr);
571  }
573  void InvalidateCachedDecl(const std::tuple<TListOfDataMembers*,
576  TListOfEnums*> &Lists, const clang::Decl *D);
579  TCling *fTCling = nullptr;
580  bool fOldValue;
582  public:
585  };
588  public:
589  TUniqueString() = delete;
590  TUniqueString(const TUniqueString &) = delete;
591  TUniqueString(Long64_t size);
592  const char *Data();
593  bool Append(const std::string &str);
594  private:
595  std::string fContent;
596  std::set<size_t> fLinesHashSet;
597  std::hash<std::string> fHashFunc;
598  };
600  TCling();
601  TCling(const TCling&); // NOT IMPLEMENTED
602  TCling& operator=(const TCling&); // NOT IMPLEMENTED
604  void Execute(TMethod*, TObjArray*, int* /*error*/ = 0)
605  {
606  }
609  void RegisterLoadedSharedLibrary(const char* name);
610  void AddFriendToClass(clang::FunctionDecl*, clang::CXXRecordDecl*) const;
612  std::map<std::string, llvm::StringRef> fPendingRdicts;
613  void RegisterRdictForLoadPCM(const std::string &pcmFileNameFullPath, llvm::StringRef *pcmContent);
614  void LoadPCM(std::string pcmFileNameFullPath);
615  void LoadPCMImpl(TFile &pcmFile);
617  void InitRootmapFile(const char *name);
618  int ReadRootmapFile(const char *rootmapfile, TUniqueString* uniqueString = nullptr);
619  Bool_t HandleNewTransaction(const cling::Transaction &T);
620  bool IsClassAutoLoadingEnabled() const;
621  void ProcessClassesToUpdate();
622  cling::Interpreter *GetInterpreterImpl() const { return fInterpreter.get(); }
623  cling::MetaProcessor *GetMetaProcessorImpl() const { return fMetaProcessor.get(); }
625  friend void TCling__RegisterRdictForLoadPCM(const std::string &pcmFileNameFullPath, llvm::StringRef *pcmContent);
626  friend cling::Interpreter* TCling__GetInterpreter();
627 };
629 #endif
const char * GetIncludePath()
Refresh the list of include paths known to the interpreter and return it with -I prepended.
Definition: TCling.cxx:7217
virtual TypeInfo_t * TypeInfo_Factory() const
Definition: TCling.cxx:9149
RooCmdArg Offset(Bool_t flag=kTRUE)
Bool_t IsLibraryLoaded(const char *libname) const
Definition: TCling.cxx:3002
virtual const char * TypeInfo_Name(TypeInfo_t *) const
Definition: TCling.cxx:9189
virtual Bool_t FuncTempInfo_IsValid(FuncTempInfo_t *) const
Check validity of a FuncTempInfo_t.
Definition: TCling.cxx:8658
virtual DeclId_t GetDataMemberAtAddr(const void *addr) const
Return pointer to cling DeclId for a data member with a given name.
Definition: TCling.cxx:4729
TObject * GetObjectAddress(const char *Name, void *&LookupCtx)
If the interpreter encounters Name, check whether that is an object ROOT could retrieve.
Definition: TCling.cxx:7534
virtual Long_t ClassInfo_Tagnum(ClassInfo_t *info) const
Definition: TCling.cxx:8228
virtual int DataMemberInfo_ArrayDim(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8404
A collection of TDataMember objects designed for fast access given a DeclId_t and for keep track of T...
The TEnum class implements the enum type.
Definition: TEnum.h:33
This class defines an abstract interface to a generic command line interpreter.
Definition: TInterpreter.h:61
An array of TObjects.
Definition: TObjArray.h:37
TCling & operator=(const TCling &)
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 ...
Definition: TCling.cxx:4786
virtual void * MethodInfo_InterfaceMethod(MethodInfo_t *minfo) const
Definition: TCling.cxx:8869
virtual void GetFunctionName(const clang::Decl *decl, std::string &name) const
Definition: TCling.cxx:8582
virtual const char * ClassInfo_FullName(ClassInfo_t *info) const
Definition: TCling.cxx:8244
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.e.
Definition: TCling.cxx:4912
void InvalidateGlobal(const clang::Decl *D)
Invalidate cached TCling information for the given global declaration.
Definition: TCling.cxx:6733
void TransactionRollback(const cling::Transaction &T)
Definition: TCling.cxx:6808
Kinds of members to include in lists.
Definition: TDictionary.h:214
void * SpecialObjectLookupCtx_t
Definition: TCling.h:149
virtual const char * BaseClassInfo_FullName(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:8373
Definition: TString.h:845
virtual std::unique_ptr< TInterpreterValue > MakeInterpreterValue() const
Definition: TCling.cxx:7483
void LibraryLoaded(const void *dyLibHandle, const char *canonicalName)
Definition: TCling.cxx:6831
long long Long64_t
Definition: RtypesCore.h:71
Bool_t HandleNewTransaction(const cling::Transaction &T)
Helper function to increase the internal Cling count of transactions that change the AST...
Definition: TCling.cxx:3481
virtual void LoadEnums(TListOfEnums &cl) const
Create list of pointers to enums for TClass cl.
Definition: TCling.cxx:4179
virtual std::string MethodInfo_TypeNormalizedName(MethodInfo_t *minfo) const
Definition: TCling.cxx:8967
DeclId_t GetDeclId(const llvm::GlobalValue *gv) const
Return pointer to cling DeclId for a global value.
Definition: TCling.cxx:4651
virtual Long_t DataMemberInfo_Offset(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8470
auto * m
Definition: textangle.C:8
virtual Double_t CallFunc_ExecDouble(CallFunc_t *func, void *address) const
Definition: TCling.cxx:7721
virtual void CallFunc_ResetArg(CallFunc_t *func) const
Definition: TCling.cxx:7786
virtual Long_t MethodInfo_ExtraProperty(MethodInfo_t *minfo) const
Definition: TCling.cxx:8917
std::string fContent
Definition: TCling.h:595
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn&#39;t allow to forward declare tb...
Definition: StringConv.hxx:21
std::map< SpecialObjectLookupCtx_t, SpecialObjectMap_t > fSpecialObjectMaps
Definition: TCling.h:151
virtual int UnloadFile(const char *path) const
Definition: TCling.cxx:7470
TLine * line
void RegisterLoadedSharedLibrary(const char *name)
Register a new shared library name with the interpreter; add it to fSharedLibs.
Definition: TCling.cxx:3258
void TCling__UpdateListsOnUnloaded(const cling::Transaction &)
Definition: TCling.cxx:573
float Float_t
Definition: RtypesCore.h:55
virtual bool ClassInfo_IsScopedEnum(ClassInfo_t *info) const
Definition: TCling.cxx:8122
void UpdateListsOnCommitted(const cling::Transaction &T)
Definition: TCling.cxx:6622
TDictionary::DeclId_t DeclId_t
Definition: TInterpreter.h:284
virtual void ClassInfo_Init(ClassInfo_t *info, const char *funcname) const
Definition: TCling.cxx:8089
A collection of TFunction objects designed for fast access given a DeclId_t and for keep track of TFu...
double T(double x)
Definition: ChebyshevPol.h:34
void RegisterRdictForLoadPCM(const std::string &pcmFileNameFullPath, llvm::StringRef *pcmContent)
Register Rdict data for future loading by LoadPCM;.
Definition: TCling.cxx:1622
virtual const char * MethodArgInfo_DefaultValue(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:9105
std::unordered_map< std::string, TObject * > SpecialObjectMap_t
Definition: TCling.h:150
virtual UInt_t FuncTempInfo_TemplateMinReqArgs(FuncTempInfo_t *) const
Return the number of required template arguments of the function template described by ft_info...
Definition: TCling.cxx:8681
void CreateListOfBaseClasses(TClass *cl) const
Create list of pointers to base class(es) for TClass cl.
Definition: TCling.cxx:4155
TClass * GenerateTClass(const char *classname, Bool_t emulation, Bool_t silent=kFALSE)
Generate a TClass for the given class.
Definition: TCling.cxx:4330
SuspendAutoLoadingRAII(TCling *tcling)
Definition: TCling.h:583
void UpdateListOfGlobals()
No op: see TClingCallbacks (used to update the list of globals)
Definition: TCling.cxx:3701
virtual MethodInfo_t * MethodInfo_FactoryCopy(MethodInfo_t *minfo) const
Definition: TCling.cxx:8862
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:53
void UpdateListOfGlobalFunctions()
No op: see TClingCallbacks (used to update the list of global functions)
Definition: TCling.cxx:3708
void SaveContext()
Save the current Cling state.
Definition: TCling.cxx:3675
virtual const char * MethodInfo_Name(MethodInfo_t *minfo) const
Definition: TCling.cxx:8951
virtual bool ClassInfo_IsValid(ClassInfo_t *info) const
Definition: TCling.cxx:8148
virtual std::string ToString(const char *type, void *obj)
Definition: TCling.cxx:1043
const char * GetClassSharedLibs(const char *cls)
Get the list of shared libraries containing the code for class cls.
Definition: TCling.cxx:6949
virtual FuncTempInfo_t * FuncTempInfo_Factory(DeclId_t declid) const
Construct a FuncTempInfo_t.
Definition: TCling.cxx:8636
std::vector< MutexStateAndRecurseCount > fInitialMutex
Definition: TCling.h:165
TCling(const char *name, const char *title)
Definition: TCling.h:187
Bool_t IsErrorMessagesEnabled() const
If error messages are disabled, the interpreter should suppress its failures and warning messages fro...
Definition: TCling.cxx:7189
virtual int TypedefInfo_Next(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:9283
virtual const char * MapCppName(const char *) const
Interface to cling function.
Definition: TCling.cxx:7367
Int_t Load(const char *filenam, Bool_t system=kFALSE)
Load a library file in cling&#39;s memory.
Definition: TCling.cxx:3341
virtual Long_t ClassInfo_Property(ClassInfo_t *info) const
Definition: TCling.cxx:8212
The TEnv class reads config files, by default named .rootrc.
Definition: TEnv.h:125
Basic string class.
Definition: TString.h:131
virtual int MethodInfo_NDefaultArg(MethodInfo_t *minfo) const
Definition: TCling.cxx:8893
ROOT::TMetaUtils::TNormalizedCtxt * fNormalizedCtxt
Definition: TCling.h:132
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...
Definition: TCling.cxx:4741
virtual const char * MethodArgInfo_TypeName(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:9121
int Int_t
Definition: RtypesCore.h:43
bool Bool_t
Definition: RtypesCore.h:61
virtual void CallFunc_SetArgArray(CallFunc_t *func, Long_t *paramArr, Int_t nparam) const
Definition: TCling.cxx:7842
std::vector< std::pair< std::string, int > > FwdDeclArgsToKeepCollection_t
Definition: TInterpreter.h:134
void ForgetMutexState()
Definition: TCling.cxx:9346
Int_t fExitCode
Definition: TCling.h:107
virtual Long_t TypeInfo_Property(TypeInfo_t *tinfo) const
Definition: TCling.cxx:9197
void * fPrevLoadedDynLibInfo
Definition: TCling.h:135
virtual void GenericError(const char *error) const
Let the interpreter issue a generic error, and set its error state.
Definition: TCling.cxx:7303
virtual const char * ClassInfo_Title(ClassInfo_t *info) const
Definition: TCling.cxx:8262
virtual DataMemberInfo_t * DataMemberInfo_Factory(ClassInfo_t *clinfo, TDictionary::EMemberSelection selection) const
Definition: TCling.cxx:8419
virtual void TypeInfo_Delete(TypeInfo_t *tinfo) const
Definition: TCling.cxx:9142
virtual void SetTempLevel(int val) const
Create / close a scope for temporaries.
Definition: TCling.cxx:7464
virtual bool ClassInfo_HasMethod(ClassInfo_t *info, const char *name) const
Definition: TCling.cxx:8081
Int_t DeleteVariable(const char *name)
Undeclare obj called name.
Definition: TCling.cxx:3614
static constexpr const char * kNullArgv[]
Definition: TCling.h:176
virtual int SetClassAutoparsing(int)
Enable/Disable the Autoparsing of headers.
Definition: TCling.cxx:7429
virtual ClassInfo_t * ClassInfo_Factory(Bool_t all=kTRUE) const
Definition: TCling.cxx:8035
virtual bool DataMemberInfo_IsValid(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8446
Abstract base class for accessing the data-members of a class.
Bool_t IsLoaded(const char *filename) const
Return true if the file has already been loaded by cint.
Definition: TCling.cxx:3036
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.e.
Definition: TCling.cxx:4768
std::vector< cling::Value > * fTemporaries
Definition: TCling.h:131
virtual void MethodInfo_CreateSignature(MethodInfo_t *minfo, TString &signature) const
Definition: TCling.cxx:8829
virtual ~TCling()
Destroy the interpreter interface.
Definition: TCling.cxx:1562
virtual void FuncTempInfo_Delete(FuncTempInfo_t *) const
Delete the FuncTempInfo_t.
Definition: TCling.cxx:8627
virtual const char * TypeInfo_TrueName(TypeInfo_t *tinfo) const
Definition: TCling.cxx:9221
virtual BaseClassInfo_t * BaseClassInfo_Factory(ClassInfo_t *info) const
Definition: TCling.cxx:8292
virtual const char * TypedefInfo_TrueName(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:9307
virtual void SetDeclAttr(DeclId_t, const char *)
Definition: TCling.cxx:8545
virtual const char * TypedefInfo_Title(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:9323
virtual void BaseClassInfo_Delete(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:8285
void Execute(const char *function, const char *params, int *error=0)
Execute a global function with arguments params.
Definition: TCling.cxx:5012
const char * Name
Definition: TXMLSetup.cxx:66
virtual Bool_t ClassInfo_Contains(ClassInfo_t *info, DeclId_t declid) const
Return true if the entity pointed to by &#39;declid&#39; is declared in the context described by &#39;info&#39;...
Definition: TCling.cxx:7951
virtual bool ClassInfo_IsLoaded(ClassInfo_t *info) const
Definition: TCling.cxx:8140
const clang::Decl * TCling__GetObjectDecl(TObject *obj)
Definition: TCling.cxx:608
virtual TypeInfo_t * MethodInfo_Type(MethodInfo_t *minfo) const
Definition: TCling.cxx:8925
virtual Long_t BaseClassInfo_Property(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:8349
std::set< size_t > fPayloads
Definition: TCling.h:120
std::unique_ptr< cling::Interpreter > fInterpreter
Definition: TCling.h:128
void TCling__InvalidateGlobal(const clang::Decl *)
Definition: TCling.cxx:578
virtual const char * DataMemberInfo_Title(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8526
std::vector< const char * > fCurExecutingMacros
Definition: TCling.h:147
virtual void SetAllocunlockfunc(void(*)()) const
[Place holder for Mutex Unlock] Provide the interpreter with a way to release a lock used to protect ...
Definition: TCling.cxx:7390
virtual int TypeInfo_Size(TypeInfo_t *tinfo) const
Definition: TCling.cxx:9213
virtual int DataMemberInfo_TypeSize(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8494
virtual TypedefInfo_t * TypedefInfo_FactoryCopy(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:9258
virtual Long64_t CallFunc_ExecInt64(CallFunc_t *func, void *address) const
Definition: TCling.cxx:7713
Int_t UnloadLibraryMap(const char *library)
Unload library map entries coming from the specified library.
Definition: TCling.cxx:5782
ECheckClassInfo CheckClassInfo(const char *name, Bool_t autoload, Bool_t isClassOrNamespaceOnly=kFALSE)
Checks if an entity with the specified name is defined in Cling.
Definition: TCling.cxx:3963
void ExecuteWithArgsAndReturn(TMethod *method, void *address, const void *args[]=0, int nargs=0, void *ret=0) const
Definition: TCling.cxx:5164
virtual void SetErrmsgcallback(void *p) const
Set a callback to receive error messages.
Definition: TCling.cxx:7450
void ClearStack()
Delete existing temporary values.
Definition: TCling.cxx:2949
virtual Long_t DataMemberInfo_Property(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8478
cling::MetaProcessor * GetMetaProcessorImpl() const
Definition: TCling.h:623
void ResetAll()
Reset the Cling state to its initial state.
Definition: TCling.cxx:3540
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...
Definition: TCling.cxx:5315
virtual bool MethodArgInfo_IsValid(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:9081
virtual MethodArgInfo_t * MethodArgInfo_FactoryCopy(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:9073
THashTable implements a hash table to store TObject&#39;s.
Definition: THashTable.h:35
virtual TEnum * CreateEnum(void *VD, TClass *cl) const
Definition: TCling.cxx:473
virtual bool TypeInfo_IsValid(TypeInfo_t *tinfo) const
Definition: TCling.cxx:9181
virtual const char * DataMemberInfo_TypeName(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8502
Bool_t Declare(const char *code)
Declare code to the interpreter, without any of the interpreter actions that could trigger a re-inter...
Definition: TCling.cxx:2962
bool LibraryLoadingFailed(const std::string &, const std::string &, bool, bool)
Definition: TCling.cxx:6331
std::hash< std::string > fHashFunc
Definition: TCling.h:597
std::map< const cling::Transaction *, size_t > fTransactionHeadersMap
Definition: TCling.h:118
virtual void MethodArgInfo_Delete(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:9050
virtual Long_t MethodArgInfo_Property(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:9097
void GetInterpreterTypeName(const char *name, std::string &output, Bool_t full=kFALSE)
The &#39;name&#39; is known to the interpreter, this function returns the internal version of this name (usua...
Definition: TCling.cxx:4979
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.
Definition: TCling.cxx:7885
virtual void TypedefInfo_Init(TypedefInfo_t *tinfo, const char *name) const
Definition: TCling.cxx:9265
virtual DataMemberInfo_t * DataMemberInfo_FactoryCopy(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8438
void Object()
Definition: Object.C:6
virtual Long_t MethodInfo_Property(MethodInfo_t *minfo) const
Definition: TCling.cxx:8909
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...
Definition: TCling.cxx:4889
virtual ClassInfo_t * BaseClassInfo_ClassInfo(BaseClassInfo_t *) const
Definition: TCling.cxx:8357
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...
Definition: TCling.cxx:4934
void ClearFileBusy()
Reset the interpreter internal state in case a previous action was not correctly terminated.
Definition: TCling.cxx:2941
static void UpdateClassInfo(char *name, Long_t tagnum)
No op: see TClingCallbacks.
Definition: TCling.cxx:6596
void SetProcessLineLock(Bool_t lock=kTRUE)
Definition: TCling.h:311
TString fSharedLibs
Definition: TCling.h:111
bool Append(const std::string &str)
Append string to the storage if not added already.
Definition: TCling.cxx:1034
static void RemoveAndInvalidateObject(List &L, Object *O)
Definition: TCling.h:567
virtual Long_t BaseClassInfo_Tagnum(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:8365
TEnv * fMapfile
Definition: TCling.h:115
Definition: TDictionary.h:159
virtual std::string CallFunc_GetWrapperCode(CallFunc_t *func) const
Definition: TCling.cxx:7932
virtual Long_t TypedefInfo_Property(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:9291
bool operator()(const char *a, const char *b) const
Definition: TCling.h:139
ULong64_t fTransactionCount
Definition: TCling.h:146
void Execute(TMethod *, TObjArray *, int *=0)
Execute method on this object with parameters stored in the TObjArray.
Definition: TCling.h:604
void TCling__TransactionRollback(const cling::Transaction &)
Definition: TCling.cxx:583
void UpdateClassInfoWithDecl(const clang::NamedDecl *ND)
Internal function. Inform a TClass about its new TagDecl or NamespaceDecl.
Definition: TCling.cxx:6538
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...
Definition: TCling.cxx:4808
virtual int DisplayClass(FILE *fout, const char *name, int base, int start) const
Definition: TCling.cxx:7257
Int_t GetExitCode() const
Definition: TCling.h:203
void UpdateListOfMethods(TClass *cl) const
Update the list of pointers to method for TClass cl This is now a nop.
Definition: TCling.cxx:4291
Long_t ProcessLine(const char *line, EErrorCode *error=0)
Definition: TCling.cxx:2370
virtual EDataType ClassInfo_GetUnderlyingType(ClassInfo_t *info) const
Definition: TCling.cxx:8131
virtual int DataMemberInfo_MaxIndex(DataMemberInfo_t *dminfo, Int_t dim) const
Definition: TCling.cxx:8454
unsigned long long GetInterpreterStateMarker() const
Definition: TCling.h:216
This class defines an interface to the cling C++ interpreter.
Definition: TCling.h:99
TClass *(* DictFuncPtr_t)()
Definition: Rtypes.h:78
virtual const char * DataMemberInfo_Name(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8518
virtual int GetSecurityError() const
Interface to cling function.
Definition: TCling.cxx:7333
Int_t UnloadAllSharedLibraryMaps()
Unload the library map entries coming from all the loaded shared libraries.
Definition: TCling.cxx:5764
const ROOT::TMetaUtils::TNormalizedCtxt & GetNormalizedContext() const
Definition: TCling.h:355
Bool_t HasPCMForLibrary(const char *libname) const
Return true if ROOT has cxxmodules pcm for a given library name.
Definition: TCling.cxx:3011
void InitRootmapFile(const char *name)
Create a resource table and read the (possibly) three resource files, i.e $ROOTSYS/etc/system<name> (...
Definition: TCling.cxx:5436
virtual Long_t CallFunc_ExecInt(CallFunc_t *func, void *address) const
Definition: TCling.cxx:7705
void InspectMembers(TMemberInspector &, const void *obj, const TClass *cl, Bool_t isTransient)
Visit all members over members, recursing over base classes.
Definition: TCling.cxx:2557
Bool_t fCxxModulesEnabled
Definition: TCling.h:126
std::set< size_t > fLinesHashSet
Definition: TCling.h:596
virtual const char * TypedefInfo_Name(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:9315
virtual void CallFunc_SetArg(CallFunc_t *func, Long_t param) const
Definition: TCling.cxx:7794
void * GetAutoLoadCallBack() const
Definition: TCling.h:190
virtual DeclId_t GetDataMemberWithValue(const void *ptrvalue) const
Definition: TCling.cxx:4720
void PrintIntro()
No-op; see TRint instead.
Definition: TCling.cxx:2534
TString fRootmapLoadPath
Definition: TCling.h:114
virtual const char * DataMemberInfo_TypeTrueName(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8510
virtual bool ClassInfo_IsBase(ClassInfo_t *info, const char *name) const
Definition: TCling.cxx:8107
virtual TypedefInfo_t * TypedefInfo_Factory() const
Definition: TCling.cxx:9242
void UpdateListOfTypes()
No op: see TClingCallbacks (used to update the list of types)
Definition: TCling.cxx:3715
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...
Definition: TCling.cxx:4503
virtual bool ClassInfo_HasDefaultConstructor(ClassInfo_t *info, Bool_t testio=kFALSE) const
Definition: TCling.cxx:8073
UInt_t AutoParseImplRecurse(const char *cls, bool topLevel)
Helper routine for TCling::AutoParse implementing the actual call to the parser and looping over temp...
Definition: TCling.cxx:6144
virtual Bool_t LoadText(const char *text) const
Load the declarations from text into the interpreter.
Definition: TCling.cxx:7359
void ApplyToInterpreterMutex(void *delta)
Re-apply the lock count delta that TCling__ResetInterpreterMutex() caused.
Definition: TCling.cxx:9362
std::vector< std::string > fAutoLoadLibStorage
Definition: TCling.h:116
virtual std::vector< std::string > GetUsingNamespaces(ClassInfo_t *cl) const
Get the scopes representing using declarations of namespace.
Definition: TCling.cxx:4262
virtual int BaseClassInfo_Next(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:8312
std::vector< void * > fRegisterModuleDyLibs
Definition: TCling.h:136
Int_t AutoParse(const char *cls)
Parse the headers relative to the class Returns 1 in case of success, 0 in case of failure...
Definition: TCling.cxx:6286
void * RewindInterpreterMutex()
Reset the interpreter lock to the state it had before interpreter-related calls happened.
Definition: TCling.cxx:9379
virtual bool MethodInfo_IsValid(MethodInfo_t *minfo) const
Definition: TCling.cxx:8877
virtual TypeInfo_t * TypeInfo_FactoryCopy(TypeInfo_t *) const
Definition: TCling.cxx:9165
cling::Interpreter * GetInterpreterImpl() const
Definition: TCling.h:622
virtual const char * MethodInfo_GetPrototype(MethodInfo_t *minfo) const
Definition: TCling.cxx:8943
virtual const char * GetTopLevelMacroName() const
Return the file name of the current un-included interpreted file.
Definition: TCling.cxx:5195
virtual MethodArgInfo_t * MethodArgInfo_Factory() const
Definition: TCling.cxx:9057
auto * a
Definition: textangle.C:12
std::set< TClass * > & GetModTClasses()
Definition: TCling.h:555
virtual void CallFunc_SetFunc(CallFunc_t *func, ClassInfo_t *info, const char *method, const char *params, Long_t *Offset) const
Definition: TCling.cxx:7858
virtual CallFunc_t * CallFunc_FactoryCopy(CallFunc_t *func) const
Definition: TCling.cxx:7737
Bool_t IsAutoLoadNamespaceCandidate(const clang::NamespaceDecl *nsDecl)
Definition: TCling.cxx:6487
virtual const char * BaseClassInfo_TmpltName(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:8391
virtual Long_t ClassInfo_ClassProperty(ClassInfo_t *info) const
Definition: TCling.cxx:7996
void RefreshClassInfo(TClass *cl, const clang::NamedDecl *def, bool alias)
Internal function. Actually do the update of the ClassInfo when seeing.
Definition: TCling.cxx:6495
static void UpdateAllCanvases()
Update all canvases at end the terminal input command.
Definition: TCling.cxx:6611
virtual const char * MethodInfo_GetMangledName(MethodInfo_t *minfo) const
Definition: TCling.cxx:8933
void ProcessClassesToUpdate()
Definition: TCling.cxx:1921
virtual void * FindSym(const char *entry) const
Interface to cling function.
Definition: TCling.cxx:7295
void TCling__UpdateListsOnCommitted(const cling::Transaction &, cling::Interpreter *)
Definition: TCling.cxx:568
virtual int MethodInfo_NArg(MethodInfo_t *minfo) const
Definition: TCling.cxx:8885
virtual const char * GetSTLIncludePath() const
Return the directory containing CINT&#39;s stl cintdlls.
Definition: TCling.cxx:7248
Bool_t SetErrorMessages(Bool_t enable=kTRUE)
If error messages are disabled, the interpreter should suppress its failures and warning messages fro...
Definition: TCling.cxx:7203
void SaveGlobalsContext()
Save the current Cling state of global objects.
Definition: TCling.cxx:3688
unsigned int UInt_t
Definition: RtypesCore.h:44
virtual Long_t BaseClassInfo_Offset(BaseClassInfo_t *toBaseClassInfo, void *address, bool isDerivedObject) const
Definition: TCling.cxx:8328
void UpdateListOfLoadedSharedLibraries()
Definition: TCling.cxx:3198
virtual Long_t ClassInfo_GetBaseOffset(ClassInfo_t *fromDerived, ClassInfo_t *toBase, void *address, bool isDerivedObject) const
Definition: TCling.cxx:8336
Long_t Calc(const char *line, EErrorCode *error=0)
Directly execute an executable statement (e.g.
Definition: TCling.cxx:3411
virtual void ShutDown()
Definition: TCling.cxx:1599
Int_t RescanLibraryMap()
Scan again along the dynamic path for library maps.
Definition: TCling.cxx:5691
virtual MethodInfo_t * MethodInfo_Factory() const
Definition: TCling.cxx:8837
void LoadPCM(std::string pcmFileNameFullPath)
Tries to load a rdict PCM, issues diagnostics if it fails.
Definition: TCling.cxx:1755
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
virtual Long_t FuncTempInfo_Property(FuncTempInfo_t *) const
Return the property of the function template.
Definition: TCling.cxx:8691
void * LazyFunctionCreatorAutoload(const std::string &mangled_name)
Autoload a library based on a missing symbol.
Definition: TCling.cxx:6392
bool IsClassAutoLoadingEnabled() const
Returns if class AutoLoading is currently enabled.
Definition: TCling.cxx:7398
Long_t ExecuteMacro(const char *filename, EErrorCode *error=0)
Execute a cling macro.
Definition: TCling.cxx:5182
virtual void Initialize()
Initialize the interpreter, once TROOT::fInterpreter is set.
Definition: TCling.cxx:1580
Bool_t CheckClassTemplate(const char *name)
Return true if there is a class template by the given name ...
Definition: TCling.cxx:4135
virtual const char * ClassInfo_TmpltName(ClassInfo_t *info) const
Definition: TCling.cxx:8270
friend cling::Interpreter * TCling__GetInterpreter()
virtual int ClassInfo_Size(ClassInfo_t *info) const
Definition: TCling.cxx:8220
virtual bool TypedefInfo_IsValid(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:9275
enumeration specifying the integration types.
Bool_t fLockProcessLine
Definition: TCling.h:125
virtual void UpdateEnumConstants(TEnum *enumObj, TClass *cl) const
Definition: TCling.cxx:425
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...
Definition: TCling.cxx:4551
virtual Long_t GetExecByteCode() const
This routines used to return the address of the internal wrapper function (of the interpreter) that w...
Definition: TCling.cxx:7325
const Bool_t kFALSE
Definition: RtypesCore.h:90
virtual int LoadFile(const char *path) const
Load a source file or library called path into the interpreter.
Definition: TCling.cxx:7346
std::unordered_set< const clang::NamespaceDecl * > fNSFromRootmaps
Definition: TCling.h:123
std::set< TClass * > fModTClasses
Definition: TCling.h:143
void UpdateListOfDataMembers(TClass *cl) const
Update the list of pointers to data members for TClass cl This is now a nop.
Definition: TCling.cxx:4300
void EndOfLineAction()
It calls a "fantom" method to synchronize user keyboard input and ROOT prompt line.
Definition: TCling.cxx:2985
virtual int MethodArgInfo_Next(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:9089
virtual int SetClassAutoLoading(int) const
Enable/Disable the AutoLoading of libraries.
Definition: TCling.cxx:7411
long Long_t
Definition: RtypesCore.h:52
void SetClassInfo(TClass *cl, Bool_t reload=kFALSE)
Set pointer to the TClingClassInfo in TClass.
Definition: TCling.cxx:3834
virtual void FuncTempInfo_Title(FuncTempInfo_t *, TString &name) const
Return the comments associates with this function template.
Definition: TCling.cxx:8790
bool RegisterPrebuiltModulePath(const std::string &FullPath, const std::string &ModuleMapName="module.modulemap") const
Definition: TCling.cxx:1843
virtual void LoadFunctionTemplates(TClass *cl) const
Create list of pointers to function templates for TClass cl.
Definition: TCling.cxx:4226
void CreateListOfDataMembers(TClass *cl) const
Create list of pointers to data members for TClass cl.
Definition: TCling.cxx:4273
void UpdateListsOnUnloaded(const cling::Transaction &T)
Invalidate stored TCling state for declarations included in transaction ‘T’.
Definition: TCling.cxx:6706
virtual const char * DataMemberInfo_ValidArrayIndex(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8534
void CreateListOfMethods(TClass *cl) const
Create list of pointers to methods for TClass cl.
Definition: TCling.cxx:4282
virtual const char * BaseClassInfo_Name(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:8383
std::set< size_t > fLookedUpClasses
Definition: TCling.h:119
virtual void TypedefInfo_Delete(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:9235
void TCling__LibraryLoaded(const void *dyLibHandle, const char *canonicalName)
double Double_t
Definition: RtypesCore.h:57
static constexpr double L
virtual int MethodInfo_Next(MethodInfo_t *minfo) const
Definition: TCling.cxx:8901
TText * text
virtual int ClassInfo_GetMethodNArg(ClassInfo_t *info, const char *method, const char *proto, Bool_t objectIsConst=false, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch) const
Definition: TCling.cxx:8065
void RegisterTClassUpdate(TClass *oldcl, DictFuncPtr_t dict)
Register classes that already existed prior to their dictionary loading and that already had a ClassI...
Definition: TCling.cxx:2301
int type
Definition: TGX11.cxx:120
void ResetGlobalVar(void *obj)
Reset the Cling &#39;user&#39; global objects/variables state to the state saved by the last call to TCling::...
Definition: TCling.cxx:3570
unsigned long long ULong64_t
Definition: RtypesCore.h:72
Print a TSeq at the prompt:
Definition: TDatime.h:115
virtual CallFuncIFacePtr_t CallFunc_IFacePtr(CallFunc_t *func) const
Definition: TCling.cxx:7778
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...
Definition: TCling.cxx:4956
unsigned long ULong_t
Definition: RtypesCore.h:53
Bool_t IsProcessLineLocked() const
Definition: TCling.h:308
void Reset()
Pressing Ctrl+C should forward here.
Definition: TCling.cxx:3524
Int_t LoadLibraryMap(const char *rootmapfile=0)
Load map between class and library.
Definition: TCling.cxx:5507
std::unique_ptr< cling::MetaProcessor > fMetaProcessor
Definition: TCling.h:129
TObjArray * fRootmapFiles
Definition: TCling.h:124
void TCling__LibraryUnloaded(const void *dyLibHandle, const char *canonicalName)
void * fAutoLoadCallBack
Definition: TCling.h:145
std::set< const char * > fParsedPayloadsAddresses
Definition: TCling.h:121
ROOT::TMetaUtils::TClingLookupHelper * fLookupHelper
Definition: TCling.h:133
Definition: TDataType.h:28
virtual void CallFunc_SetArgs(CallFunc_t *func, const char *param) const
Definition: TCling.cxx:7850
TClingCallbacks * fClingCallbacks
Definition: TCling.h:137
Int_t AutoLoad(const char *classname, Bool_t knowDictNotLoaded=kFALSE)
Load library containing the specified class.
Definition: TCling.cxx:6029
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
Definition: TRolke.cxx:630
virtual Long_t FuncTempInfo_ExtraProperty(FuncTempInfo_t *) const
Return the property not already defined in Property See TDictionary&#39;s EFunctionProperty.
Definition: TCling.cxx:8751
void SetGetline(const char *(*getlineFunc)(const char *prompt), void(*histaddFunc)(const char *line))
Set a getline function to call when input is needed.
Definition: TCling.cxx:3464
virtual void CallFunc_IgnoreExtraArgs(CallFunc_t *func, bool ignore) const
Definition: TCling.cxx:7752
virtual EReturnType MethodCallReturnType(TFunction *func) const
Definition: TCling.cxx:8986
TObject * TCling__GetObjectAddress(const char *Name, void *&LookupCtx)
Definition: TCling.cxx:604
char fPrompt[64]
Definition: TCling.h:108
virtual bool ClassInfo_IsEnum(const char *name) const
Definition: TCling.cxx:8115
std::map< std::string, llvm::StringRef > fPendingRdicts
Definition: TCling.h:612
Int_t ReloadAllSharedLibraryMaps()
Reload the library map entries coming from all the loaded shared libraries, after first unloading the...
Definition: TCling.cxx:5703
void GetFunctionOverloads(ClassInfo_t *cl, const char *funcname, std::vector< DeclId_t > &res) const
Insert overloads of name in cl to res.
Definition: TCling.cxx:4827
void HandleNewDecl(const void *DV, bool isDeserialized, std::set< TClass *> &modifiedClasses)
Definition: TCling.cxx:500
void RecursiveRemove(TObject *obj)
Delete object from cling symbol table so it can not be used anymore.
Definition: TCling.cxx:3499
void UnRegisterTClassUpdate(const TClass *oldcl)
If the dictionary is loaded, we can remove the class from the list (otherwise the class might be load...
Definition: TCling.cxx:2310
TString fIncludePath
Definition: TCling.h:113
virtual bool DiagnoseIfInterpreterException(const std::exception &e) const
Definition: TCling.cxx:2359
Mother of all ROOT objects.
Definition: TObject.h:37
void RegisterTemporary(const TInterpreterValue &value)
Definition: TCling.cxx:7507
virtual FuncTempInfo_t * FuncTempInfo_FactoryCopy(FuncTempInfo_t *) const
Construct a FuncTempInfo_t.
Definition: TCling.cxx:8647
Global functions class (global functions are obtained from CINT).
Definition: TFunction.h:28
virtual const char * GetCurrentMacroName() const
Return the file name of the currently interpreted file, included or not.
Definition: TCling.cxx:5242
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 (...
Definition: TCling.cxx:5876
virtual const char * MethodArgInfo_Name(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:9113
void SnapshotMutexState(ROOT::TVirtualRWMutex *mtx)
Definition: TCling.cxx:9331
const char * GetSharedLibDeps(const char *lib, bool tryDyld=false)
Get the list a libraries on which the specified lib depends.
Definition: TCling.cxx:7136
virtual int DataMemberInfo_Next(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8462
virtual void TypeInfo_Init(TypeInfo_t *tinfo, const char *funcname) const
Definition: TCling.cxx:9172
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.
Definition: TCling.cxx:1951
void AddFriendToClass(clang::FunctionDecl *, clang::CXXRecordDecl *) const
Inject function as a friend into klass.
Definition: TCling.cxx:7587
virtual bool ClassInfo_IsValidMethod(ClassInfo_t *info, const char *method, const char *proto, Long_t *offset, ROOT::EFunctionMatchMode=ROOT::kConversionMatch) const
Definition: TCling.cxx:8156
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
Definition: TListOfEnums.h:32
const char * Data()
Definition: TCling.cxx:1026
virtual void ClassInfo_DeleteArray(ClassInfo_t *info, void *arena, bool dtorOnly) const
Definition: TCling.cxx:8019
virtual const char * MethodInfo_Title(MethodInfo_t *minfo) const
Definition: TCling.cxx:8978
virtual std::string MethodArgInfo_TypeNormalizedName(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:9129
Bool_t fHeaderParsingOnDemand
Definition: TCling.h:172
Int_t fGlobalsListSerial
Definition: TCling.h:112
virtual int ClassInfo_Next(ClassInfo_t *info) const
Definition: TCling.cxx:8172
virtual void CallFunc_Init(CallFunc_t *func) const
Definition: TCling.cxx:7760
virtual void * ClassInfo_New(ClassInfo_t *info) const
Definition: TCling.cxx:8180
Each ROOT class (see TClass) has a linked list of methods.
Definition: TMethod.h:38
std::vector< std::pair< TClass *, DictFuncPtr_t > > fClassesToUpdate
Definition: TCling.h:144
virtual Long_t DataMemberInfo_TypeProperty(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8486
virtual void CallFunc_ExecWithArgsAndReturn(CallFunc_t *func, void *address, const void *args[]=0, int nargs=0, void *ret=0) const
Definition: TCling.cxx:7694
static void * fgSetOfSpecials
Definition: TCling.h:102
virtual EReturnType MethodInfo_MethodCallReturnType(MethodInfo_t *minfo) const
Definition: TCling.cxx:8997
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
Int_t SetClassSharedLibs(const char *cls, const char *libs)
Register the AutoLoading information for a class.
Definition: TCling.cxx:5844
friend void TCling__RegisterRdictForLoadPCM(const std::string &pcmFileNameFullPath, llvm::StringRef *pcmContent)
Definition: TCling.cxx:592
virtual UInt_t FuncTempInfo_TemplateNargs(FuncTempInfo_t *) const
Return the maximum number of template arguments of the function template described by ft_info...
Definition: TCling.cxx:8670
const char * proto
Definition: civetweb.c:16604
virtual void MethodInfo_Delete(MethodInfo_t *minfo) const
Interface to cling function.
Definition: TCling.cxx:8822
Bool_t SetSuspendAutoParsing(Bool_t value)
Suspend the Autoparsing of headers.
Definition: TCling.cxx:7440
Bool_t IsAutoParsingSuspended() const
Definition: TCling.h:344
Int_t fMore
Definition: TCling.h:106
virtual void CallFunc_Exec(CallFunc_t *func, void *address) const
Definition: TCling.cxx:7670
virtual int Evaluate(const char *, TInterpreterValue &)
Get the interpreter value corresponding to the statement.
Definition: TCling.cxx:7498
TEnv * GetMapfile() const
Definition: TCling.h:204
virtual void ClassInfo_Destruct(ClassInfo_t *info, void *arena) const
Definition: TCling.cxx:8027
Int_t GetMore() const
Definition: TCling.h:205
virtual void CallFunc_Delete(CallFunc_t *func) const
Definition: TCling.cxx:7663
virtual int TypedefInfo_Size(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:9299
Bool_t fIsAutoParsingSuspended
Definition: TCling.h:173
static void UpdateClassInfoWork(const char *name)
Definition: TCling.cxx:6602
void TCling__RegisterRdictForLoadPCM(const std::string &pcmFileNameFullPath, llvm::StringRef *pcmContent)
Definition: TCling.cxx:592
virtual void SetAlloclockfunc(void(*)()) const
[Place holder for Mutex Lock] Provide the interpreter with a way to acquire a lock used to protect cr...
Definition: TCling.cxx:7380
A collection of TFunction objects designed for fast access given a DeclId_t and for keep track of TFu...
std::hash< std::string > fStringHashFunction
Definition: TCling.h:122
std::unique_ptr< ROOT::TVirtualRWMutex::State > fState
State of gCoreMutex when the first interpreter-related function was invoked.
Definition: TCling.h:155
virtual const char * ClassInfo_Name(ClassInfo_t *info) const
Definition: TCling.cxx:8254
void * SetAutoLoadCallBack(void *cb)
Definition: TCling.h:191
const char * GetSharedLibs()
Return the list of shared libraries loaded into the process.
Definition: TCling.cxx:6846
TObjArray * GetRootMapFiles() const
Definition: TCling.h:215
void CodeComplete(const std::string &, size_t &, std::vector< std::string > &)
The call to Cling&#39;s tab complition.
Definition: TCling.cxx:7490
virtual bool CallFunc_IsValid(CallFunc_t *func) const
Definition: TCling.cxx:7769
Int_t fRecurseCount
Interpreter-related functions will push the "entry" lock state to *this.
Definition: TCling.h:160
Long_t ProcessLineAsynch(const char *line, EErrorCode *error=0)
Let cling process a command line asynch.
Definition: TCling.cxx:3386
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...
Definition: TCling.cxx:4611
static void output(int code)
Definition: gifencode.c:226
virtual void FuncTempInfo_Name(FuncTempInfo_t *, TString &name) const
Return the name of this function template.
Definition: TCling.cxx:8777
virtual const char * MethodInfo_TypeName(MethodInfo_t *minfo) const
Definition: TCling.cxx:8959
bool fIsShuttingDown
Definition: TCling.h:178
void InvalidateCachedDecl(const std::tuple< TListOfDataMembers *, TListOfFunctions *, TListOfFunctionTemplates *, TListOfEnums *> &Lists, const clang::Decl *D)
Invalidate cached TCling information for the given declaration, and removed it from the appropriate o...
Definition: TCling.cxx:6748
virtual int DisplayIncludePath(FILE *fout) const
Interface to cling function.
Definition: TCling.cxx:7266
virtual const char * ClassInfo_FileName(ClassInfo_t *info) const
Definition: TCling.cxx:8236
const Bool_t kTRUE
Definition: RtypesCore.h:89
void LoadMacro(const char *filename, EErrorCode *error=0)
Load a macro file in cling&#39;s memory.
Definition: TCling.cxx:3378
const char * TypeName(const char *typeDesc)
Return the absolute type of typeDesc.
Definition: TCling.cxx:5257
virtual MethodInfo_t * CallFunc_FactoryMethod(CallFunc_t *func) const
Definition: TCling.cxx:7744
void LibraryUnloaded(const void *dyLibHandle, const char *canonicalName)
Definition: TCling.cxx:6838
char * GetPrompt()
Definition: TCling.h:209
const Int_t n
Definition: legend1.C:16
void RewindDictionary()
Rewind Cling dictionary to the point where it was before executing the current macro.
Definition: TCling.cxx:3585
virtual CallFunc_t * CallFunc_Factory() const
Definition: TCling.cxx:7729
void AddIncludePath(const char *path)
Add the given path to the list of directories in which the interpreter looks for include files...
Definition: TCling.cxx:2543
static Int_t ShallowAutoLoadImpl(const char *cls)
Definition: TCling.cxx:5922
Int_t DeleteGlobal(void *obj)
Delete obj from Cling symbol table so it cannot be accessed anymore.
Definition: TCling.cxx:3599
void ResetGlobals()
Reset in Cling the list of global variables to the state saved by the last call to TCling::SaveGlobal...
Definition: TCling.cxx:3556
char name[80]
Definition: TGX11.cxx:109
void LoadPCMImpl(TFile &pcmFile)
Tries to load a PCM from TFile; returns true on success.
Definition: TCling.cxx:1640
virtual int TypeInfo_RefType(TypeInfo_t *) const
Definition: TCling.cxx:9205
virtual void CallFunc_ExecWithReturn(CallFunc_t *func, void *address, void *ret) const
Definition: TCling.cxx:7686
static Int_t DeepAutoLoadImpl(const char *cls)
Definition: TCling.cxx:5968
const char * Value
Definition: TXMLSetup.cxx:72
void CreateListOfMethodArgs(TFunction *m) const
Create list of pointers to method arguments for TMethod m.
Definition: TCling.cxx:4307
virtual void ClassInfo_Delete(ClassInfo_t *info) const
Definition: TCling.cxx:8004
std::map< size_t, std::vector< const char * > > fClassesHeadersMap
Definition: TCling.h:117
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.
Definition: TCling.cxx:3395
virtual void DataMemberInfo_Delete(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8412