Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TCling.h
Go to the documentation of this file.
1// @(#)root/meta:$Id$
2// Author: Axel Naumann, 2011-10-19
3
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 *************************************************************************/
11
12
13#ifndef ROOT_TCling
14#define ROOT_TCling
15
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//////////////////////////////////////////////////////////////////////////
26
27#include "TInterpreter.h"
28
29#include <map>
30#include <memory>
31#include <set>
32#include <tuple>
33#include <unordered_map>
34#include <unordered_set>
35#include <vector>
36#include <string>
37#include <utility>
38
39#ifndef WIN32
40#define TWin32SendClass char
41#endif
42
43namespace llvm {
44 class GlobalValue;
45 class StringRef;
46}
47
48namespace clang {
49 class CXXRecordDecl;
50 class Decl;
51 class DeclContext;
52 class EnumDecl;
53 class FunctionDecl;
54 class IdentifierIterator;
55 class NamedDecl;
56 class NamespaceDecl;
57 class TagDecl;
58 class Type;
59 class QualType;
60}
61namespace cling {
62 class Interpreter;
63 class MetaProcessor;
64 class Transaction;
65 class Value;
66}
67
68class TClingCallbacks;
69class TEnv;
70class TFile;
71class THashTable;
73class TMethod;
74class TObjArray;
78class TListOfEnums;
79
80namespace ROOT {
81 namespace TMetaUtils {
82 class TNormalizedCtxt;
83 class TClingLookupHelper;
84 }
85}
86
87extern "C" {
88 void TCling__UpdateListsOnCommitted(const cling::Transaction&,
89 cling::Interpreter*);
90 void TCling__UpdateListsOnUnloaded(const cling::Transaction&);
91 void TCling__InvalidateGlobal(const clang::Decl*);
92 void TCling__TransactionRollback(const cling::Transaction&);
93 TObject* TCling__GetObjectAddress(const char *Name, void *&LookupCtx);
94 const clang::Decl* TCling__GetObjectDecl(TObject *obj);
95 void TCling__LibraryLoaded(const void* dyLibHandle,
96 const char* canonicalName);
97 void TCling__LibraryUnloaded(const void* dyLibHandle,
98 const char* canonicalName);
99 void TCling__RegisterRdictForLoadPCM(const std::string &pcmFileNameFullPath, llvm::StringRef *pcmContent);
100}
101
102class TCling final : public TInterpreter {
103private: // Static Data Members
104
105 static void* fgSetOfSpecials; // set of TObjects used in CINT variables
106
107private: // Data Members
108
109 Int_t fExitCode; // Value passed to exit() in interpreter.
110 char fPrompt[64]; // Command line prompt string.
111 //cling::DictPosition fDictPos; // dictionary context after initialization is complete.
112 //cling::DictPosition fDictPosGlobals; // dictionary context after ResetGlobals().
113 TString fSharedLibs; // Shared libraries loaded by G__loadfile().
114 Int_t fGlobalsListSerial;// Last time we refreshed the ROOT list of globals.
115 TString fIncludePath; // Interpreter include path.
116 TString fRootmapLoadPath; // Dynamic load path for rootmap files.
117 TEnv* fMapfile; // Association of classes to libraries.
118 std::vector<std::string> fAutoLoadLibStorage; // A storage to return a const char* from GetClassSharedLibsForModule.
119 std::map<size_t,std::vector<const char*>> fClassesHeadersMap; // Map of classes hashes and headers associated
120 std::map<const cling::Transaction*,size_t> fTransactionHeadersMap; // Map which transaction contains which autoparse.
121 std::set<size_t> fLookedUpClasses; // Set of classes for which headers were looked up already
122 std::set<size_t> fPayloads; // Set of payloads
123 std::set<const char*> fParsedPayloadsAddresses; // Set of payloads which were parsed
124 std::hash<std::string> fStringHashFunction; // A simple hashing function
125 std::unordered_set<const clang::NamespaceDecl*> fNSFromRootmaps; // Collection of namespaces fwd declared in the rootmaps
126 TObjArray* fRootmapFiles; // Loaded rootmap files.
127 Bool_t fLockProcessLine; // True if ProcessLine should lock gInterpreterMutex.
128 Bool_t fCxxModulesEnabled;// True if C++ modules was enabled
129
130 std::unique_ptr<cling::Interpreter> fInterpreter; // The interpreter.
131 std::unique_ptr<cling::MetaProcessor> fMetaProcessor; // The metaprocessor.
132
133 std::vector<cling::Value> *fTemporaries; // Stack of temporaries
134 ROOT::TMetaUtils::TNormalizedCtxt *fNormalizedCtxt; // Which typedef to avoid stripping.
135 ROOT::TMetaUtils::TClingLookupHelper *fLookupHelper; // lookup helper used by TClassEdit
136
137 void* fPrevLoadedDynLibInfo; // Internal info to mark the last loaded libray.
138 std::vector<void*> fRegisterModuleDyLibs; // Stack of libraries currently running RegisterModule
139 TClingCallbacks* fClingCallbacks; // cling::Interpreter owns it.
141 bool operator()(const char* a, const char *b) const {
142 return strcmp(a, b) < 0;
143 }
144 };
145 std::set<TClass*> fModTClasses;
146 std::vector<std::pair<TClass*,DictFuncPtr_t> > fClassesToUpdate;
148 ULong64_t fTransactionCount; // Cling counter for commited or unloaded transactions which changed the AST.
149 std::vector<const char*> fCurExecutingMacros;
150
152 typedef std::unordered_map<std::string, TObject*> SpecialObjectMap_t;
153 std::map<SpecialObjectLookupCtx_t, SpecialObjectMap_t> fSpecialObjectMaps;
154
156 /// State of gCoreMutex when the first interpreter-related function was invoked.
157 std::unique_ptr<ROOT::TVirtualRWMutex::State> fState;
158
159 /// Interpreter-related functions will push the "entry" lock state to *this.
160 /// Recursive calls will do that, too - but we must only forget about the lock
161 /// state once this recursion count went to 0.
163
164 operator bool() const { return (bool)fState; }
165 };
166
169
171 std::unique_ptr<StateDelta> fDelta;
172 };
173
175
176 DeclId_t GetDeclId(const llvm::GlobalValue *gv) const;
177
178 static Int_t DeepAutoLoadImpl(const char *cls, std::unordered_set<std::string> &visited, bool nameIsNormalized);
179 static Int_t ShallowAutoLoadImpl(const char *cls);
180
183
184 UInt_t AutoParseImplRecurse(const char *cls, bool topLevel);
185 constexpr static const char* kNullArgv[] = {nullptr};
186
187 bool fIsShuttingDown = false;
188
189protected:
191
192public: // Public Interface
193
194 virtual ~TCling();
195 TCling(const char* name, const char* title, const char* const argv[], void *interpLibHandle);
196
197 void AddIncludePath(const char* path) final;
198 void *GetAutoLoadCallBack() const final { return fAutoLoadCallBack; }
199 void *SetAutoLoadCallBack(void* cb) final { void* prev = fAutoLoadCallBack; fAutoLoadCallBack = cb; return prev; }
200 Int_t AutoLoad(const char *classname, Bool_t knowDictNotLoaded = kFALSE) final;
201 Int_t AutoLoad(const std::type_info& typeinfo, Bool_t knowDictNotLoaded = kFALSE) final;
202 Int_t AutoParse(const char* cls) final;
203 void* LazyFunctionCreatorAutoload(const std::string& mangled_name);
204 bool LibraryLoadingFailed(const std::string&, const std::string&, bool, bool);
205 Bool_t IsAutoLoadNamespaceCandidate(const clang::NamespaceDecl* nsDecl);
206 void ClearFileBusy() final;
207 void ClearStack() final; // Delete existing temporary values
208 Bool_t Declare(const char* code) final;
209 void EndOfLineAction() final;
210 TClass *GetClass(const std::type_info& typeinfo, Bool_t load) const final;
211 Int_t GetExitCode() const final { return fExitCode; }
212 TEnv* GetMapfile() const final { return fMapfile; }
213 Int_t GetMore() const final;
214 TClass *GenerateTClass(const char *classname, Bool_t emulation, Bool_t silent = kFALSE) final;
215 TClass *GenerateTClass(ClassInfo_t *classinfo, Bool_t silent = kFALSE) final;
216 Int_t GenerateDictionary(const char* classes, const char* includes = "", const char* options = nullptr) final;
217 char* GetPrompt() final { return fPrompt; }
218 const char* GetSharedLibs() final;
219 const char* GetClassSharedLibs(const char* cls) final;
220 const char* GetSharedLibDeps(const char* lib, bool tryDyld = false) final;
221 const char* GetIncludePath() final;
222 virtual const char* GetSTLIncludePath() const final;
223 TObjArray* GetRootMapFiles() const final { return fRootmapFiles; }
224 unsigned long long GetInterpreterStateMarker() const final { return fTransactionCount;}
225 virtual void Initialize() final;
226 virtual void ShutDown() final;
227 void InspectMembers(TMemberInspector&, const void* obj, const TClass* cl, Bool_t isTransient) final;
228 Bool_t IsLoaded(const char* filename) const final;
229 Bool_t IsLibraryLoaded(const char* libname) const final;
230 Bool_t HasPCMForLibrary(const char *libname) const final;
231 Int_t Load(const char* filenam, Bool_t system = kFALSE) final;
232 void LoadMacro(const char* filename, EErrorCode* error = nullptr) final;
233 Int_t LoadLibraryMap(const char* rootmapfile = nullptr) final;
234 Int_t RescanLibraryMap() final;
237 Int_t UnloadLibraryMap(const char* library) final;
238 Longptr_t ProcessLine(const char* line, EErrorCode* error = nullptr) final;
239 Longptr_t ProcessLineAsynch(const char* line, EErrorCode* error = nullptr);
240 Longptr_t ProcessLineSynch(const char* line, EErrorCode* error = nullptr) final;
241 void PrintIntro() final;
242 bool RegisterPrebuiltModulePath(const std::string& FullPath,
243 const std::string& ModuleMapName = "module.modulemap") const final;
244 void RegisterModule(const char* modulename,
245 const char** headers,
246 const char** includePaths,
247 const char* payloadCode,
248 const char* fwdDeclsCode,
249 void (*triggerFunc)(),
250 const FwdDeclArgsToKeepCollection_t& fwdDeclsArgToSkip,
251 const char** classesHeaders,
252 Bool_t lateRegistration = false,
253 Bool_t hasCxxModule = false) final;
254 virtual void AddAvailableIndentifiers(TSeqCollection& Idents) final;
255 void RegisterTClassUpdate(TClass *oldcl,DictFuncPtr_t dict) final;
256 void UnRegisterTClassUpdate(const TClass *oldcl) final;
257
258 Int_t SetClassSharedLibs(const char *cls, const char *libs) final;
259 void SetGetline(const char * (*getlineFunc)(const char* prompt),
260 void (*histaddFunc)(const char* line)) final;
261 void Reset() final;
262 void ResetAll() final;
263 void ResetGlobals() final;
264 void ResetGlobalVar(void* obj) final;
265 void RewindDictionary() final;
266 Int_t DeleteGlobal(void* obj) final;
267 Int_t DeleteVariable(const char *name) final;
268 void SaveContext() final;
269 void SaveGlobalsContext() final;
270 void UpdateListOfGlobals() final;
271 void UpdateListOfGlobalFunctions() final;
272 void UpdateListOfTypes() final;
273 void SetClassInfo(TClass* cl, Bool_t reload = kFALSE) final;
274
275 ECheckClassInfo CheckClassInfo(const char *name, Bool_t autoload, Bool_t isClassOrNamespaceOnly = kFALSE) final;
276
277 Bool_t CheckClassTemplate(const char *name) final;
278 Longptr_t Calc(const char* line, EErrorCode* error = nullptr) final;
279 void CreateListOfBaseClasses(TClass* cl) const final;
280 void CreateListOfDataMembers(TClass* cl) const final;
281 void CreateListOfMethods(TClass* cl) const final;
282 void CreateListOfMethodArgs(TFunction* m) const final;
283 void UpdateListOfMethods(TClass* cl) const final;
284 void UpdateListOfDataMembers(TClass* cl) const;
285
286 DeclId_t GetDataMember(ClassInfo_t *cl, const char *name) const final;
287 DeclId_t GetDataMemberAtAddr(const void *addr) const final;
288 DeclId_t GetDataMemberWithValue(const void *ptrvalue) const final;
289 DeclId_t GetEnum(TClass *cl, const char *name) const final;
290 TEnum* CreateEnum(void *VD, TClass *cl) const final;
291 void UpdateEnumConstants(TEnum* enumObj, TClass* cl) const final;
292 void LoadEnums(TListOfEnums& cl) const final;
293 std::string ToString(const char* type, void *obj) final;
294 TString GetMangledName(TClass* cl, const char* method, const char* params, Bool_t objectIsConst = kFALSE) final;
295 TString GetMangledNameWithPrototype(TClass* cl, const char* method, const char* proto, Bool_t objectIsConst = kFALSE, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) final;
296 void* GetInterfaceMethod(TClass* cl, const char* method, const char* params, Bool_t objectIsConst = kFALSE) final;
297 void* GetInterfaceMethodWithPrototype(TClass* cl, const char* method, const char* proto, Bool_t objectIsConst = kFALSE, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) final;
298 DeclId_t GetFunction(ClassInfo_t *cl, const char *funcname) final;
299 DeclId_t GetFunctionWithPrototype(ClassInfo_t *cl, const char* method, const char* proto, Bool_t objectIsConst = kFALSE, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) final;
300 DeclId_t GetFunctionWithValues(ClassInfo_t *cl, const char* method, const char* params, Bool_t objectIsConst = kFALSE) final;
301 DeclId_t GetFunctionTemplate(ClassInfo_t *cl, const char *funcname) final;
302 void GetFunctionOverloads(ClassInfo_t *cl, const char *funcname, std::vector<DeclId_t>& res) const final;
303 virtual void LoadFunctionTemplates(TClass* cl) const final;
304
305 std::vector<std::string> GetUsingNamespaces(ClassInfo_t *cl) const final;
306
307 void GetInterpreterTypeName(const char* name, std::string &output, Bool_t full = kFALSE) final;
308 void Execute(const char* function, const char* params, int* error = nullptr) final;
309 void Execute(TObject* obj, TClass* cl, const char* method, const char* params, int* error = nullptr) final;
310 void Execute(TObject* obj, TClass* cl, const char* method, const char* params, Bool_t objectIsConst, int* error = nullptr);
311 void Execute(TObject* obj, TClass* cl, TMethod* method, TObjArray* params, int* error = nullptr) final;
312 void ExecuteWithArgsAndReturn(TMethod* method, void* address, const void* args[] = nullptr, int nargs = 0, void* ret= nullptr) const final;
313 Longptr_t ExecuteMacro(const char* filename, EErrorCode* error = nullptr) final;
314 void RecursiveRemove(TObject* obj) final;
315 Bool_t IsErrorMessagesEnabled() const final;
316 Bool_t SetErrorMessages(Bool_t enable = kTRUE) final;
318 return fLockProcessLine;
319 }
320 void SetProcessLineLock(Bool_t lock = kTRUE) final {
321 fLockProcessLine = lock;
322 }
323 const char* TypeName(const char* typeDesc) final;
324
326 void ForgetMutexState() final;
327
328 void ApplyToInterpreterMutex(void* delta);
330
331 static void UpdateClassInfo(char* name, Long_t tagnum);
332 static void UpdateClassInfoWork(const char* name);
333 void RefreshClassInfo(TClass *cl, const clang::NamedDecl *def, bool alias);
334 void UpdateClassInfoWithDecl(const clang::NamedDecl* ND);
335 static void UpdateAllCanvases();
336
337 // Misc
338 int DisplayClass(FILE* fout, const char* name, int base, int start) const final;
339 int DisplayIncludePath(FILE* fout) const final;
340 void* FindSym(const char* entry) const final;
341 void GenericError(const char* error) const final;
342 Long_t GetExecByteCode() const final;
343 const char* GetTopLevelMacroName() const final;
344 const char* GetCurrentMacroName() const final;
345 int GetSecurityError() const final;
346 int LoadFile(const char* path) const final;
347 Bool_t LoadText(const char* text) const final;
348 const char* MapCppName(const char*) const final;
349 void SetAlloclockfunc(void (*)()) const final;
350 void SetAllocunlockfunc(void (*)()) const final;
351 int SetClassAutoLoading(int) const final;
352 int SetClassAutoparsing(int) final;
354 void SetErrmsgcallback(void* p) const final;
355 void ReportDiagnosticsToErrorHandler(bool enable = true) final;
356 void SetTempLevel(int val) const final;
357 int UnloadFile(const char* path) const final;
358
359 void CodeComplete(const std::string&, size_t&,
360 std::vector<std::string>&) final;
361 int Evaluate(const char*, TInterpreterValue&) final;
362 std::unique_ptr<TInterpreterValue> MakeInterpreterValue() const final;
364 void RegisterTemporary(const cling::Value& value);
365 const ROOT::TMetaUtils::TNormalizedCtxt& GetNormalizedContext() const {return *fNormalizedCtxt;};
366 TObject* GetObjectAddress(const char *Name, void *&LookupCtx);
367
368
369 // core/meta helper functions.
370 EReturnType MethodCallReturnType(TFunction *func) const final;
371 virtual void GetFunctionName(const clang::Decl *decl, std::string &name) const;
372 bool DiagnoseIfInterpreterException(const std::exception &e) const final;
373
374 // CallFunc interface
375 DeclId_t GetDeclId(CallFunc_t *info) const final;
376 void CallFunc_Delete(CallFunc_t* func) const final;
377 void CallFunc_Exec(CallFunc_t* func, void* address) const final;
378 void CallFunc_Exec(CallFunc_t* func, void* address, TInterpreterValue& val) const final;
379 void CallFunc_ExecWithReturn(CallFunc_t* func, void* address, void* ret) const final;
380 void CallFunc_ExecWithArgsAndReturn(CallFunc_t* func, void* address, const void* args[] = nullptr, int nargs = 0, void *ret = nullptr) const final;
381 Longptr_t CallFunc_ExecInt(CallFunc_t* func, void* address) const final;
382 Long64_t CallFunc_ExecInt64(CallFunc_t* func, void* address) const final;
383 Double_t CallFunc_ExecDouble(CallFunc_t* func, void* address) const final;
384 CallFunc_t* CallFunc_Factory() const final;
385 CallFunc_t* CallFunc_FactoryCopy(CallFunc_t* func) const final;
386 MethodInfo_t* CallFunc_FactoryMethod(CallFunc_t* func) const final;
387 void CallFunc_IgnoreExtraArgs(CallFunc_t* func, bool ignore) const final;
388 void CallFunc_Init(CallFunc_t* func) const final;
389 bool CallFunc_IsValid(CallFunc_t* func) const final;
390 CallFuncIFacePtr_t CallFunc_IFacePtr(CallFunc_t * func) const final;
391 void CallFunc_ResetArg(CallFunc_t* func) const final;
392 void CallFunc_SetArg(CallFunc_t* func, Long_t param) const final;
393 void CallFunc_SetArg(CallFunc_t* func, ULong_t param) const final;
394 void CallFunc_SetArg(CallFunc_t* func, Float_t param) const final;
395 void CallFunc_SetArg(CallFunc_t* func, Double_t param) const final;
396 void CallFunc_SetArg(CallFunc_t* func, Long64_t param) const final;
397 void CallFunc_SetArg(CallFunc_t* func, ULong64_t param) const final;
398 void CallFunc_SetArgArray(CallFunc_t* func, Longptr_t* paramArr, Int_t nparam) const final;
399 void CallFunc_SetArgs(CallFunc_t* func, const char* param) const final;
400 void CallFunc_SetFunc(CallFunc_t* func, ClassInfo_t* info, const char* method, const char* params, Longptr_t* Offset) const final;
401 void CallFunc_SetFunc(CallFunc_t* func, ClassInfo_t* info, const char* method, const char* params, bool objectIsConst, Longptr_t* Offset) const final;
402 void CallFunc_SetFunc(CallFunc_t* func, MethodInfo_t* info) const final;
403 void CallFunc_SetFuncProto(CallFunc_t* func, ClassInfo_t* info, const char* method, const char* proto, Longptr_t* Offset, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) const final;
404 void CallFunc_SetFuncProto(CallFunc_t* func, ClassInfo_t* info, const char* method, const char* proto, bool objectIsConst, Longptr_t* Offset, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) const final;
405 void CallFunc_SetFuncProto(CallFunc_t* func, ClassInfo_t* info, const char* method, const std::vector<TypeInfo_t*> &proto, Longptr_t* Offset, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) const final;
406 void CallFunc_SetFuncProto(CallFunc_t* func, ClassInfo_t* info, const char* method, const std::vector<TypeInfo_t*> &proto, bool objectIsConst, Longptr_t* Offset, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) const final;
407
408 std::string CallFunc_GetWrapperCode(CallFunc_t *func) const final;
409
410 // ClassInfo interface
411 DeclId_t GetDeclId(ClassInfo_t *info) const final;
412 Bool_t ClassInfo_Contains(ClassInfo_t *info, DeclId_t declid) const final;
413 Long_t ClassInfo_ClassProperty(ClassInfo_t* info) const final;
414 void ClassInfo_Delete(ClassInfo_t* info) const final;
415 void ClassInfo_Delete(ClassInfo_t* info, void* arena) const final;
416 void ClassInfo_DeleteArray(ClassInfo_t* info, void* arena, bool dtorOnly) const final;
417 void ClassInfo_Destruct(ClassInfo_t* info, void* arena) const final;
418 ClassInfo_t* ClassInfo_Factory(Bool_t all = kTRUE) const final;
419 ClassInfo_t* ClassInfo_Factory(ClassInfo_t* cl) const final;
420 ClassInfo_t* ClassInfo_Factory(const char* name) const final;
421 ClassInfo_t* ClassInfo_Factory(DeclId_t declid) const final;
422 Longptr_t ClassInfo_GetBaseOffset(ClassInfo_t* fromDerived, ClassInfo_t* toBase, void * address, bool isDerivedObject) const final;
423 int ClassInfo_GetMethodNArg(ClassInfo_t* info, const char* method, const char* proto, Bool_t objectIsConst = false, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) const final;
424 bool ClassInfo_HasDefaultConstructor(ClassInfo_t* info, Bool_t testio = kFALSE) const final;
425 bool ClassInfo_HasMethod(ClassInfo_t* info, const char* name) const final;
426 void ClassInfo_Init(ClassInfo_t* info, const char* funcname) const final;
427 void ClassInfo_Init(ClassInfo_t* info, int tagnum) const final;
428 bool ClassInfo_IsBase(ClassInfo_t* info, const char* name) const final;
429 bool ClassInfo_IsEnum(const char* name) const final;
430 bool ClassInfo_IsScopedEnum(ClassInfo_t* info) const final;
431 EDataType ClassInfo_GetUnderlyingType(ClassInfo_t* info) const final;
432 bool ClassInfo_IsLoaded(ClassInfo_t* info) const final;
433 bool ClassInfo_IsValid(ClassInfo_t* info) const final;
434 bool ClassInfo_IsValidMethod(ClassInfo_t* info, const char* method, const char* proto, Longptr_t* offset, ROOT::EFunctionMatchMode /* mode */ = ROOT::kConversionMatch) const final;
435 bool ClassInfo_IsValidMethod(ClassInfo_t* info, const char* method, const char* proto, Bool_t objectIsConst, Longptr_t* offset, ROOT::EFunctionMatchMode /* mode */ = ROOT::kConversionMatch) const final;
436 int ClassInfo_Next(ClassInfo_t* info) const final;
437 void* ClassInfo_New(ClassInfo_t* info) const final;
438 void* ClassInfo_New(ClassInfo_t* info, int n) const final;
439 void* ClassInfo_New(ClassInfo_t* info, int n, void* arena) const final;
440 void* ClassInfo_New(ClassInfo_t* info, void* arena) const final;
441 Long_t ClassInfo_Property(ClassInfo_t* info) const final;
442 int ClassInfo_Size(ClassInfo_t* info) const final;
443 Longptr_t ClassInfo_Tagnum(ClassInfo_t* info) const final;
444 const char* ClassInfo_FileName(ClassInfo_t* info) const final;
445 const char* ClassInfo_FullName(ClassInfo_t* info) const final;
446 const char* ClassInfo_Name(ClassInfo_t* info) const final;
447 const char* ClassInfo_Title(ClassInfo_t* info) const final;
448 const char* ClassInfo_TmpltName(ClassInfo_t* info) const final;
449
450 // BaseClassInfo interface
451 void BaseClassInfo_Delete(BaseClassInfo_t* bcinfo) const final;
452 BaseClassInfo_t* BaseClassInfo_Factory(ClassInfo_t* info) const final;
453 BaseClassInfo_t* BaseClassInfo_Factory(ClassInfo_t* derived,
454 ClassInfo_t* base) const final;
455 int BaseClassInfo_Next(BaseClassInfo_t* bcinfo) const final;
456 int BaseClassInfo_Next(BaseClassInfo_t* bcinfo, int onlyDirect) const final;
457 Longptr_t BaseClassInfo_Offset(BaseClassInfo_t* toBaseClassInfo, void * address, bool isDerivedObject) const final;
458 Long_t BaseClassInfo_Property(BaseClassInfo_t* bcinfo) const final;
459 Longptr_t BaseClassInfo_Tagnum(BaseClassInfo_t* bcinfo) const final;
460 ClassInfo_t*BaseClassInfo_ClassInfo(BaseClassInfo_t * /* bcinfo */) const final;
461 const char* BaseClassInfo_FullName(BaseClassInfo_t* bcinfo) const final;
462 const char* BaseClassInfo_Name(BaseClassInfo_t* bcinfo) const final;
463 const char* BaseClassInfo_TmpltName(BaseClassInfo_t* bcinfo) const final;
464
465 // DataMemberInfo interface
466 DeclId_t GetDeclId(DataMemberInfo_t *info) const final;
467 int DataMemberInfo_ArrayDim(DataMemberInfo_t* dminfo) const final;
468 void DataMemberInfo_Delete(DataMemberInfo_t* dminfo) const final;
469 DataMemberInfo_t* DataMemberInfo_Factory(ClassInfo_t* clinfo, TDictionary::EMemberSelection selection) const final;
470 DataMemberInfo_t *DataMemberInfo_Factory(DeclId_t declid, ClassInfo_t* clinfo) const final;
471 DataMemberInfo_t* DataMemberInfo_FactoryCopy(DataMemberInfo_t* dminfo) const final;
472 bool DataMemberInfo_IsValid(DataMemberInfo_t* dminfo) const final;
473 int DataMemberInfo_MaxIndex(DataMemberInfo_t* dminfo, Int_t dim) const final;
474 int DataMemberInfo_Next(DataMemberInfo_t* dminfo) const final;
475 Longptr_t DataMemberInfo_Offset(DataMemberInfo_t* dminfo) const final;
476 Long_t DataMemberInfo_Property(DataMemberInfo_t* dminfo) const final;
477 Long_t DataMemberInfo_TypeProperty(DataMemberInfo_t* dminfo) const final;
478 int DataMemberInfo_TypeSize(DataMemberInfo_t* dminfo) const final;
479 const char* DataMemberInfo_TypeName(DataMemberInfo_t* dminfo) const final;
480 const char* DataMemberInfo_TypeTrueName(DataMemberInfo_t* dminfo) const final;
481 const char* DataMemberInfo_Name(DataMemberInfo_t* dminfo) const final;
482 const char* DataMemberInfo_Title(DataMemberInfo_t* dminfo) const final;
483 const char* DataMemberInfo_ValidArrayIndex(DataMemberInfo_t* dminfo) const final;
484 void SetDeclAttr(DeclId_t, const char* /* attribute */) final;
485
486
487 // Function Template interface
488 DeclId_t GetDeclId(FuncTempInfo_t *info) const final;
489 void FuncTempInfo_Delete(FuncTempInfo_t * /* ft_info */) const final;
490 FuncTempInfo_t *FuncTempInfo_Factory(DeclId_t declid) const final;
491 FuncTempInfo_t *FuncTempInfo_FactoryCopy(FuncTempInfo_t * /* ft_info */) const final;
492 Bool_t FuncTempInfo_IsValid(FuncTempInfo_t * /* ft_info */) const final;
493 UInt_t FuncTempInfo_TemplateNargs(FuncTempInfo_t * /* ft_info */) const final;
494 UInt_t FuncTempInfo_TemplateMinReqArgs(FuncTempInfo_t * /* ft_info */) const final;
495 Long_t FuncTempInfo_Property(FuncTempInfo_t * /* ft_info */) const final;
496 Long_t FuncTempInfo_ExtraProperty(FuncTempInfo_t * /* ft_info */) const final;
497 void FuncTempInfo_Name(FuncTempInfo_t * /* ft_info */, TString& name) const final;
498 void FuncTempInfo_Title(FuncTempInfo_t * /* ft_info */, TString& name) const final;
499
500 // MethodInfo interface
501 DeclId_t GetDeclId(MethodInfo_t *info) const final;
502 void MethodInfo_CreateSignature(MethodInfo_t* minfo, TString& signature) const final;
503 void MethodInfo_Delete(MethodInfo_t* minfo) const final;
504 MethodInfo_t* MethodInfo_Factory() const final;
505 MethodInfo_t* MethodInfo_Factory(ClassInfo_t *clinfo) const final;
506 MethodInfo_t *MethodInfo_Factory(DeclId_t declid) const final;
507 MethodInfo_t* MethodInfo_FactoryCopy(MethodInfo_t* minfo) const final;
508 void* MethodInfo_InterfaceMethod(MethodInfo_t* minfo) const final;
509 bool MethodInfo_IsValid(MethodInfo_t* minfo) const final;
510 int MethodInfo_NArg(MethodInfo_t* minfo) const final;
511 int MethodInfo_NDefaultArg(MethodInfo_t* minfo) const final;
512 int MethodInfo_Next(MethodInfo_t* minfo) const final;
513 Long_t MethodInfo_Property(MethodInfo_t* minfo) const final;
514 Long_t MethodInfo_ExtraProperty(MethodInfo_t* minfo) const final;
515 TypeInfo_t* MethodInfo_Type(MethodInfo_t* minfo) const final;
516 EReturnType MethodInfo_MethodCallReturnType(MethodInfo_t* minfo) const final;
517 const char* MethodInfo_GetMangledName(MethodInfo_t* minfo) const final;
518 const char* MethodInfo_GetPrototype(MethodInfo_t* minfo) const final;
519 const char* MethodInfo_Name(MethodInfo_t* minfo) const final;
520 const char* MethodInfo_TypeName(MethodInfo_t* minfo) const final;
521 std::string MethodInfo_TypeNormalizedName(MethodInfo_t* minfo) const final;
522 const char* MethodInfo_Title(MethodInfo_t* minfo) const final;
523
524 // MethodArgInfo interface
525 void MethodArgInfo_Delete(MethodArgInfo_t* marginfo) const final;
526 MethodArgInfo_t* MethodArgInfo_Factory() const final;
527 MethodArgInfo_t* MethodArgInfo_Factory(MethodInfo_t *minfo) const final;
528 MethodArgInfo_t* MethodArgInfo_FactoryCopy(MethodArgInfo_t* marginfo) const final;
529 bool MethodArgInfo_IsValid(MethodArgInfo_t* marginfo) const final;
530 int MethodArgInfo_Next(MethodArgInfo_t* marginfo) const final;
531 Long_t MethodArgInfo_Property(MethodArgInfo_t* marginfo) const final;
532 const char* MethodArgInfo_DefaultValue(MethodArgInfo_t* marginfo) const final;
533 const char* MethodArgInfo_Name(MethodArgInfo_t* marginfo) const final;
534 const char* MethodArgInfo_TypeName(MethodArgInfo_t* marginfo) const final;
535 std::string MethodArgInfo_TypeNormalizedName(MethodArgInfo_t *marginfo) const final;
536
537 // TypeInfo interface
538 void TypeInfo_Delete(TypeInfo_t* tinfo) const final;
539 TypeInfo_t* TypeInfo_Factory() const final;
540 TypeInfo_t *TypeInfo_Factory(const char* name) const final;
541 TypeInfo_t* TypeInfo_FactoryCopy(TypeInfo_t* /* tinfo */) const final;
542 void TypeInfo_Init(TypeInfo_t* tinfo, const char* funcname) const final;
543 bool TypeInfo_IsValid(TypeInfo_t* tinfo) const final;
544 const char* TypeInfo_Name(TypeInfo_t* /* info */) const final;
545 Long_t TypeInfo_Property(TypeInfo_t* tinfo) const final;
546 int TypeInfo_RefType(TypeInfo_t* /* tinfo */) const final;
547 int TypeInfo_Size(TypeInfo_t* tinfo) const final;
548 const char* TypeInfo_TrueName(TypeInfo_t* tinfo) const final;
549
550 // TypedefInfo interface
551 DeclId_t GetDeclId(TypedefInfo_t *info) const final;
552 void TypedefInfo_Delete(TypedefInfo_t* tinfo) const final;
553 TypedefInfo_t* TypedefInfo_Factory() const final;
554 TypedefInfo_t* TypedefInfo_Factory(const char* name) const final;
555 TypedefInfo_t* TypedefInfo_FactoryCopy(TypedefInfo_t* tinfo) const final;
556 void TypedefInfo_Init(TypedefInfo_t* tinfo, const char* name) const final;
557 bool TypedefInfo_IsValid(TypedefInfo_t* tinfo) const final;
558 int TypedefInfo_Next(TypedefInfo_t* tinfo) const final;
559 Long_t TypedefInfo_Property(TypedefInfo_t* tinfo) const final;
560 int TypedefInfo_Size(TypedefInfo_t* tinfo) const final;
561 const char* TypedefInfo_TrueName(TypedefInfo_t* tinfo) const final;
562 const char* TypedefInfo_Name(TypedefInfo_t* tinfo) const final;
563 const char* TypedefInfo_Title(TypedefInfo_t* tinfo) const final;
564
565 std::set<TClass*>& GetModTClasses() { return fModTClasses; }
566
567 void HandleNewDecl(const void* DV, bool isDeserialized, std::set<TClass*>& modifiedClasses);
568 void UpdateListsOnCommitted(const cling::Transaction &T);
569 void UpdateListsOnUnloaded(const cling::Transaction &T);
570 void InvalidateGlobal(const clang::Decl *D);
571 void TransactionRollback(const cling::Transaction &T);
572 void LibraryLoaded(const void* dyLibHandle, const char* canonicalName);
573 void LibraryUnloaded(const void* dyLibHandle, const char* canonicalName);
574
575private: // Private Utility Functions and Classes
576 template <typename List, typename Object>
577 static void RemoveAndInvalidateObject(List &L, Object *O) {
578 // Invalidate stored information by setting the `xxxInfo_t' to nullptr.
579 if (O && O->IsValid())
580 L.Unload(O), O->Update(nullptr);
581 }
582
583 void InvalidateCachedDecl(const std::tuple<TListOfDataMembers*,
586 TListOfEnums*> &Lists, const clang::Decl *D);
587
589 TCling *fTCling = nullptr;
591
592 public:
595 };
596
598 public:
599 TUniqueString() = delete;
600 TUniqueString(const TUniqueString &) = delete;
602 const char *Data();
603 bool Append(const std::string &str);
604 private:
605 std::string fContent;
606 std::set<size_t> fLinesHashSet;
607 std::hash<std::string> fHashFunc;
608 };
609
611 TCling(const TCling&) = delete;
612 TCling& operator=(const TCling&) = delete;
613
614 void Execute(TMethod*, TObjArray*, int* /*error*/ = nullptr) final {}
615
617 void RegisterLoadedSharedLibrary(const char* name);
618 void AddFriendToClass(clang::FunctionDecl*, clang::CXXRecordDecl*) const;
619
620 std::map<std::string, llvm::StringRef> fPendingRdicts;
621 void RegisterRdictForLoadPCM(const std::string &pcmFileNameFullPath, llvm::StringRef *pcmContent);
622 void LoadPCM(std::string pcmFileNameFullPath);
623 void LoadPCMImpl(TFile &pcmFile);
624
625 void InitRootmapFile(const char *name);
626 int ReadRootmapFile(const char *rootmapfile, TUniqueString* uniqueString = nullptr);
627 Bool_t HandleNewTransaction(const cling::Transaction &T);
628 bool IsClassAutoLoadingEnabled() const;
630 cling::Interpreter *GetInterpreterImpl() const { return fInterpreter.get(); }
631 cling::MetaProcessor *GetMetaProcessorImpl() const { return fMetaProcessor.get(); }
632
633 friend void TCling__RegisterRdictForLoadPCM(const std::string &pcmFileNameFullPath, llvm::StringRef *pcmContent);
634 friend cling::Interpreter* TCling__GetInterpreter();
635};
636
637#endif
void Object()
Definition Object.C:6
#define b(i)
Definition RSha256.hxx:100
#define a(i)
Definition RSha256.hxx:99
#define e(i)
Definition RSha256.hxx:103
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
long Longptr_t
Definition RtypesCore.h:82
long Long_t
Definition RtypesCore.h:54
unsigned int UInt_t
Definition RtypesCore.h:46
float Float_t
Definition RtypesCore.h:57
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
double Double_t
Definition RtypesCore.h:59
long long Long64_t
Definition RtypesCore.h:80
unsigned long long ULong64_t
Definition RtypesCore.h:81
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
unsigned long ULong_t
Definition RtypesCore.h:55
TClass *(* DictFuncPtr_t)()
Definition Rtypes.h:80
void TCling__LibraryLoaded(const void *dyLibHandle, const char *canonicalName)
void TCling__LibraryUnloaded(const void *dyLibHandle, const char *canonicalName)
void TCling__TransactionRollback(const cling::Transaction &)
Definition TCling.cxx:577
void TCling__UpdateListsOnCommitted(const cling::Transaction &, cling::Interpreter *)
Definition TCling.cxx:562
void TCling__RegisterRdictForLoadPCM(const std::string &pcmFileNameFullPath, llvm::StringRef *pcmContent)
Definition TCling.cxx:586
const clang::Decl * TCling__GetObjectDecl(TObject *obj)
Definition TCling.cxx:602
void TCling__UpdateListsOnUnloaded(const cling::Transaction &)
Definition TCling.cxx:567
void TCling__InvalidateGlobal(const clang::Decl *)
Definition TCling.cxx:572
TObject * TCling__GetObjectAddress(const char *Name, void *&LookupCtx)
Definition TCling.cxx:598
EDataType
Definition TDataType.h:28
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char text
char name[80]
Definition TGX11.cxx:110
const char * proto
Definition civetweb.c:17502
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
SuspendAutoLoadingRAII(TCling *tcling)
Definition TCling.h:593
TUniqueString(const TUniqueString &)=delete
const char * Data()
Definition TCling.cxx:1013
bool Append(const std::string &str)
Append string to the storage if not added already.
Definition TCling.cxx:1021
std::hash< std::string > fHashFunc
Definition TCling.h:607
std::set< size_t > fLinesHashSet
Definition TCling.h:606
std::string fContent
Definition TCling.h:605
This class defines an interface to the cling C++ interpreter.
Definition TCling.h:102
static Int_t DeepAutoLoadImpl(const char *cls, std::unordered_set< std::string > &visited, bool nameIsNormalized)
Definition TCling.cxx:6164
const char * MethodArgInfo_DefaultValue(MethodArgInfo_t *marginfo) const final
Definition TCling.cxx:9228
bool ClassInfo_IsScopedEnum(ClassInfo_t *info) const final
Definition TCling.cxx:8246
const char * TypeInfo_Name(TypeInfo_t *) const final
Definition TCling.cxx:9312
void * MethodInfo_InterfaceMethod(MethodInfo_t *minfo) const final
Definition TCling.cxx:8992
void LoadEnums(TListOfEnums &cl) const final
Create list of pointers to enums for TClass cl.
Definition TCling.cxx:4356
void UpdateListOfGlobals() final
No op: see TClingCallbacks (used to update the list of globals)
Definition TCling.cxx:3870
bool TypedefInfo_IsValid(TypedefInfo_t *tinfo) const final
Definition TCling.cxx:9398
Int_t AutoLoad(const char *classname, Bool_t knowDictNotLoaded=kFALSE) final
Load library containing the specified class.
Definition TCling.cxx:6225
void * GetAutoLoadCallBack() const final
Definition TCling.h:198
void CallFunc_Init(CallFunc_t *func) const final
Definition TCling.cxx:7884
void SetGetline(const char *(*getlineFunc)(const char *prompt), void(*histaddFunc)(const char *line)) final
Set a getline function to call when input is needed.
Definition TCling.cxx:3633
bool LibraryLoadingFailed(const std::string &, const std::string &, bool, bool)
Definition TCling.cxx:6528
void GenericError(const char *error) const final
Let the interpreter issue a generic error, and set its error state.
Definition TCling.cxx:7405
std::vector< void * > fRegisterModuleDyLibs
Definition TCling.h:138
void CallFunc_ExecWithReturn(CallFunc_t *func, void *address, void *ret) const final
Definition TCling.cxx:7810
TypeInfo_t * MethodInfo_Type(MethodInfo_t *minfo) const final
Definition TCling.cxx:9048
std::vector< std::string > fAutoLoadLibStorage
Definition TCling.h:118
void CallFunc_Delete(CallFunc_t *func) const final
Definition TCling.cxx:7787
Bool_t fLockProcessLine
Definition TCling.h:127
int LoadFile(const char *path) const final
Load a source file or library called path into the interpreter.
Definition TCling.cxx:7448
void ResetAll() final
Reset the Cling state to its initial state.
Definition TCling.cxx:3709
void SetDeclAttr(DeclId_t, const char *) final
Definition TCling.cxx:8669
void HandleNewDecl(const void *DV, bool isDeserialized, std::set< TClass * > &modifiedClasses)
Definition TCling.cxx:494
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:6848
Long_t MethodInfo_Property(MethodInfo_t *minfo) const final
Definition TCling.cxx:9032
virtual void LoadFunctionTemplates(TClass *cl) const final
Create list of pointers to function templates for TClass cl.
Definition TCling.cxx:4403
bool ClassInfo_IsValidMethod(ClassInfo_t *info, const char *method, const char *proto, Longptr_t *offset, ROOT::EFunctionMatchMode=ROOT::kConversionMatch) const final
Definition TCling.cxx:8280
Long_t DataMemberInfo_Property(DataMemberInfo_t *dminfo) const final
Definition TCling.cxx:8602
int SetClassAutoparsing(int) final
Enable/Disable the Autoparsing of headers.
Definition TCling.cxx:7531
std::vector< const char * > fCurExecutingMacros
Definition TCling.h:149
void CreateListOfDataMembers(TClass *cl) const final
Create list of pointers to data members for TClass cl.
Definition TCling.cxx:4450
void RewindDictionary() final
Rewind Cling dictionary to the point where it was before executing the current macro.
Definition TCling.cxx:3754
bool ClassInfo_IsValid(ClassInfo_t *info) const final
Definition TCling.cxx:8272
void UpdateListsOnCommitted(const cling::Transaction &T)
Definition TCling.cxx:6722
int TypeInfo_RefType(TypeInfo_t *) const final
Definition TCling.cxx:9328
void CreateListOfBaseClasses(TClass *cl) const final
Create list of pointers to base class(es) for TClass cl.
Definition TCling.cxx:4332
char * GetPrompt() final
Definition TCling.h:217
ClassInfo_t * ClassInfo_Factory(Bool_t all=kTRUE) const final
Definition TCling.cxx:8159
const char * MethodInfo_Name(MethodInfo_t *minfo) const final
Definition TCling.cxx:9074
BaseClassInfo_t * BaseClassInfo_Factory(ClassInfo_t *info) const final
Definition TCling.cxx:8416
void SetClassInfo(TClass *cl, Bool_t reload=kFALSE) final
Set pointer to the TClingClassInfo in TClass.
Definition TCling.cxx:4003
Bool_t LoadText(const char *text) const final
Load the declarations from text into the interpreter.
Definition TCling.cxx:7461
const char * GetSharedLibDeps(const char *lib, bool tryDyld=false) final
Get the list a libraries on which the specified lib depends.
Definition TCling.cxx:7238
EReturnType MethodInfo_MethodCallReturnType(MethodInfo_t *minfo) const final
Definition TCling.cxx:9120
TObject * GetObjectAddress(const char *Name, void *&LookupCtx)
If the interpreter encounters Name, check whether that is an object ROOT could retrieve.
Definition TCling.cxx:7658
Longptr_t ProcessLineAsynch(const char *line, EErrorCode *error=nullptr)
Let cling process a command line asynch.
Definition TCling.cxx:3545
bool MethodInfo_IsValid(MethodInfo_t *minfo) const final
Definition TCling.cxx:9000
FuncTempInfo_t * FuncTempInfo_Factory(DeclId_t declid) const final
Construct a FuncTempInfo_t.
Definition TCling.cxx:8759
TypeInfo_t * TypeInfo_Factory() const final
Definition TCling.cxx:9272
bool IsClassAutoLoadingEnabled() const
Returns if class AutoLoading is currently enabled.
Definition TCling.cxx:7500
void InvalidateGlobal(const clang::Decl *D)
Invalidate cached TCling information for the given global declaration.
Definition TCling.cxx:6833
int Evaluate(const char *, TInterpreterValue &) final
Get the interpreter value corresponding to the statement.
Definition TCling.cxx:7622
std::unique_ptr< TInterpreterValue > MakeInterpreterValue() const final
Definition TCling.cxx:7607
void UpdateListOfLoadedSharedLibraries()
Definition TCling.cxx:3333
const char * TypedefInfo_Title(TypedefInfo_t *tinfo) const final
Definition TCling.cxx:9446
void CallFunc_SetFuncProto(CallFunc_t *func, ClassInfo_t *info, const char *method, const char *proto, Longptr_t *Offset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch) const final
Interface to cling function.
Definition TCling.cxx:8009
void InitRootmapFile(const char *name)
Create a resource table and read the (possibly) three resource files, i.e.
Definition TCling.cxx:5615
Int_t AutoParse(const char *cls) final
Parse the headers relative to the class Returns 1 in case of success, 0 in case of failure.
Definition TCling.cxx:6483
void LoadPCM(std::string pcmFileNameFullPath)
Tries to load a rdict PCM, issues diagnostics if it fails.
Definition TCling.cxx:1851
void UpdateListOfMethods(TClass *cl) const final
Update the list of pointers to method for TClass cl This is now a nop.
Definition TCling.cxx:4468
virtual ~TCling()
Destroy the interpreter interface.
Definition TCling.cxx:1658
void AddFriendToClass(clang::FunctionDecl *, clang::CXXRecordDecl *) const
Inject function as a friend into klass.
Definition TCling.cxx:7711
void PrintIntro() final
No-op; see TRint instead.
Definition TCling.cxx:2659
Bool_t fCxxModulesEnabled
Definition TCling.h:128
int BaseClassInfo_Next(BaseClassInfo_t *bcinfo) const final
Definition TCling.cxx:8436
void RefreshClassInfo(TClass *cl, const clang::NamedDecl *def, bool alias)
Internal function. Actually do the update of the ClassInfo when seeing.
Definition TCling.cxx:6595
CallFunc_t * CallFunc_FactoryCopy(CallFunc_t *func) const final
Definition TCling.cxx:7861
Double_t CallFunc_ExecDouble(CallFunc_t *func, void *address) const final
Definition TCling.cxx:7845
void CallFunc_ResetArg(CallFunc_t *func) const final
Definition TCling.cxx:7910
const char * GetCurrentMacroName() const final
Return the file name of the currently interpreted file, included or not.
Definition TCling.cxx:5427
Bool_t IsLoaded(const char *filename) const final
Return true if the file has already been loaded by cint.
Definition TCling.cxx:3167
void SaveGlobalsContext() final
Save the current Cling state of global objects.
Definition TCling.cxx:3857
void CallFunc_IgnoreExtraArgs(CallFunc_t *func, bool ignore) const final
Definition TCling.cxx:7876
Int_t fExitCode
Definition TCling.h:109
void ApplyToInterpreterMutex(void *delta)
Re-apply the lock count delta that TCling__ResetInterpreterMutex() caused.
Definition TCling.cxx:9485
void * LazyFunctionCreatorAutoload(const std::string &mangled_name)
Autoload a library based on a missing symbol.
Definition TCling.cxx:6551
Int_t GenerateDictionary(const char *classes, const char *includes="", const char *options=nullptr) final
Generate the dictionary for the C++ classes listed in the first argument (in a semi-colon separated l...
Definition TCling.cxx:4687
Bool_t ClassInfo_Contains(ClassInfo_t *info, DeclId_t declid) const final
Return true if the entity pointed to by 'declid' is declared in the context described by 'info'.
Definition TCling.cxx:8075
Bool_t IsLibraryLoaded(const char *libname) const final
Definition TCling.cxx:3133
Long_t GetExecByteCode() const final
This routines used to return the address of the internal wrapper function (of the interpreter) that w...
Definition TCling.cxx:7427
int DataMemberInfo_ArrayDim(DataMemberInfo_t *dminfo) const final
Definition TCling.cxx:8528
DataMemberInfo_t * DataMemberInfo_FactoryCopy(DataMemberInfo_t *dminfo) const final
Definition TCling.cxx:8562
Bool_t HandleNewTransaction(const cling::Transaction &T)
Helper function to increase the internal Cling count of transactions that change the AST.
Definition TCling.cxx:3650
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:5492
std::map< SpecialObjectLookupCtx_t, SpecialObjectMap_t > fSpecialObjectMaps
Definition TCling.h:153
int ClassInfo_Next(ClassInfo_t *info) const final
Definition TCling.cxx:8296
void SetErrmsgcallback(void *p) const final
Set a callback to receive error messages.
Definition TCling.cxx:7552
bool MethodArgInfo_IsValid(MethodArgInfo_t *marginfo) const final
Definition TCling.cxx:9204
int TypeInfo_Size(TypeInfo_t *tinfo) const final
Definition TCling.cxx:9336
Int_t DeleteGlobal(void *obj) final
Delete obj from Cling symbol table so it cannot be accessed anymore.
Definition TCling.cxx:3768
int GetSecurityError() const final
Interface to cling function.
Definition TCling.cxx:7435
void SetTempLevel(int val) const final
Create / close a scope for temporaries.
Definition TCling.cxx:7588
std::set< size_t > fPayloads
Definition TCling.h:122
UInt_t FuncTempInfo_TemplateNargs(FuncTempInfo_t *) const final
Return the maximum number of template arguments of the function template described by ft_info.
Definition TCling.cxx:8793
DeclId_t GetFunctionWithPrototype(ClassInfo_t *cl, const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch) final
Return pointer to cling interface function for a method of a class with a certain prototype,...
Definition TCling.cxx:5119
TypedefInfo_t * TypedefInfo_Factory() const final
Definition TCling.cxx:9365
TObjArray * fRootmapFiles
Definition TCling.h:126
Longptr_t ProcessLine(const char *line, EErrorCode *error=nullptr) final
Definition TCling.cxx:2493
int ClassInfo_Size(ClassInfo_t *info) const final
Definition TCling.cxx:8344
const char * MethodArgInfo_TypeName(MethodArgInfo_t *marginfo) const final
Definition TCling.cxx:9244
cling::Interpreter * GetInterpreterImpl() const
Definition TCling.h:630
Longptr_t ExecuteMacro(const char *filename, EErrorCode *error=nullptr) final
Execute a cling macro.
Definition TCling.cxx:5367
std::vector< std::pair< TClass *, DictFuncPtr_t > > fClassesToUpdate
Definition TCling.h:146
int DataMemberInfo_Next(DataMemberInfo_t *dminfo) const final
Definition TCling.cxx:8586
const char * TypedefInfo_Name(TypedefInfo_t *tinfo) const final
Definition TCling.cxx:9438
void BaseClassInfo_Delete(BaseClassInfo_t *bcinfo) const final
Definition TCling.cxx:8409
Long_t MethodInfo_ExtraProperty(MethodInfo_t *minfo) const final
Definition TCling.cxx:9040
void LoadMacro(const char *filename, EErrorCode *error=nullptr) final
Load a macro file in cling's memory.
Definition TCling.cxx:3537
const char * GetClassSharedLibs(const char *cls) final
Get the list of shared libraries containing the code for class cls.
Definition TCling.cxx:7049
FuncTempInfo_t * FuncTempInfo_FactoryCopy(FuncTempInfo_t *) const final
Construct a FuncTempInfo_t.
Definition TCling.cxx:8770
int DataMemberInfo_MaxIndex(DataMemberInfo_t *dminfo, Int_t dim) const final
Definition TCling.cxx:8578
Bool_t FuncTempInfo_IsValid(FuncTempInfo_t *) const final
Check validity of a FuncTempInfo_t.
Definition TCling.cxx:8781
void AddIncludePath(const char *path) final
Add a directory to the list of directories in which the interpreter looks for include files.
Definition TCling.cxx:2673
bool ClassInfo_IsBase(ClassInfo_t *info, const char *name) const final
Definition TCling.cxx:8231
void RecursiveRemove(TObject *obj) final
Delete object from cling symbol table so it can not be used anymore.
Definition TCling.cxx:3668
const ROOT::TMetaUtils::TNormalizedCtxt & GetNormalizedContext() const
Definition TCling.h:365
const char * DataMemberInfo_TypeName(DataMemberInfo_t *dminfo) const final
Definition TCling.cxx:8626
DeclId_t GetDataMemberAtAddr(const void *addr) const final
Return pointer to cling DeclId for a data member with a given name.
Definition TCling.cxx:4914
friend cling::Interpreter * TCling__GetInterpreter()
std::set< TClass * > fModTClasses
Definition TCling.h:145
void CallFunc_SetArgArray(CallFunc_t *func, Longptr_t *paramArr, Int_t nparam) const final
Definition TCling.cxx:7966
TEnv * GetMapfile() const final
Definition TCling.h:212
std::string CallFunc_GetWrapperCode(CallFunc_t *func) const final
Definition TCling.cxx:8056
void * RewindInterpreterMutex()
Reset the interpreter lock to the state it had before interpreter-related calls happened.
Definition TCling.cxx:9515
const char * MethodArgInfo_Name(MethodArgInfo_t *marginfo) const final
Definition TCling.cxx:9236
Bool_t HasPCMForLibrary(const char *libname) const final
Return true if ROOT has cxxmodules pcm for a given library name.
Definition TCling.cxx:3142
void TypedefInfo_Init(TypedefInfo_t *tinfo, const char *name) const final
Definition TCling.cxx:9388
const char * DataMemberInfo_Title(DataMemberInfo_t *dminfo) const final
Definition TCling.cxx:8650
Longptr_t CallFunc_ExecInt(CallFunc_t *func, void *address) const final
Definition TCling.cxx:7829
void ClearStack() final
Delete existing temporary values.
Definition TCling.cxx:3080
void SetAlloclockfunc(void(*)()) const final
[Place holder for Mutex Lock] Provide the interpreter with a way to acquire a lock used to protect cr...
Definition TCling.cxx:7482
Bool_t SetErrorMessages(Bool_t enable=kTRUE) final
If error messages are disabled, the interpreter should suppress its failures and warning messages fro...
Definition TCling.cxx:7305
MethodInfo_t * CallFunc_FactoryMethod(CallFunc_t *func) const final
Definition TCling.cxx:7868
TypedefInfo_t * TypedefInfo_FactoryCopy(TypedefInfo_t *tinfo) const final
Definition TCling.cxx:9381
void GetFunctionOverloads(ClassInfo_t *cl, const char *funcname, std::vector< DeclId_t > &res) const final
Insert overloads of name in cl to res.
Definition TCling.cxx:5012
void UnRegisterTClassUpdate(const TClass *oldcl) final
If the dictionary is loaded, we can remove the class from the list (otherwise the class might be load...
Definition TCling.cxx:2433
std::string MethodArgInfo_TypeNormalizedName(MethodArgInfo_t *marginfo) const final
Definition TCling.cxx:9252
DeclId_t GetEnum(TClass *cl, const char *name) const final
Return pointer to cling Decl of global/static variable that is located at the address given by addr.
Definition TCling.cxx:4796
Long_t MethodArgInfo_Property(MethodArgInfo_t *marginfo) const final
Definition TCling.cxx:9220
int TypedefInfo_Size(TypedefInfo_t *tinfo) const final
Definition TCling.cxx:9422
void CallFunc_ExecWithArgsAndReturn(CallFunc_t *func, void *address, const void *args[]=nullptr, int nargs=0, void *ret=nullptr) const final
Definition TCling.cxx:7818
void GetInterpreterTypeName(const char *name, std::string &output, Bool_t full=kFALSE) final
The 'name' is known to the interpreter, this function returns the internal version of this name (usua...
Definition TCling.cxx:5164
Int_t fGlobalsListSerial
Definition TCling.h:114
Bool_t IsAutoParsingSuspended() const final
Definition TCling.h:353
TString fSharedLibs
Definition TCling.h:113
std::map< std::string, llvm::StringRef > fPendingRdicts
Definition TCling.h:620
static void UpdateClassInfoWork(const char *name)
Definition TCling.cxx:6702
Int_t Load(const char *filenam, Bool_t system=kFALSE) final
Load a library file in cling's memory.
Definition TCling.cxx:3500
int TypedefInfo_Next(TypedefInfo_t *tinfo) const final
Definition TCling.cxx:9406
void * GetInterfaceMethod(TClass *cl, const char *method, const char *params, Bool_t objectIsConst=kFALSE) final
Return pointer to cling interface function for a method of a class with parameters params (params is ...
Definition TCling.cxx:4971
void TypeInfo_Init(TypeInfo_t *tinfo, const char *funcname) const final
Definition TCling.cxx:9295
Bool_t SetSuspendAutoParsing(Bool_t value) final
Suspend the Autoparsing of headers.
Definition TCling.cxx:7542
int DataMemberInfo_TypeSize(DataMemberInfo_t *dminfo) const final
Definition TCling.cxx:8618
static void * fgSetOfSpecials
Definition TCling.h:105
const char * ClassInfo_Title(ClassInfo_t *info) const final
Definition TCling.cxx:8386
const char * DataMemberInfo_Name(DataMemberInfo_t *dminfo) const final
Definition TCling.cxx:8642
const char * TypeName(const char *typeDesc) final
Return the absolute type of typeDesc.
Definition TCling.cxx:5442
ROOT::TMetaUtils::TNormalizedCtxt * fNormalizedCtxt
Definition TCling.h:134
void ForgetMutexState() final
Definition TCling.cxx:9469
int MethodInfo_Next(MethodInfo_t *minfo) const final
Definition TCling.cxx:9024
void * SetAutoLoadCallBack(void *cb) final
Definition TCling.h:199
Long_t ClassInfo_ClassProperty(ClassInfo_t *info) const final
Definition TCling.cxx:8120
void MethodInfo_Delete(MethodInfo_t *minfo) const final
Interface to cling function.
Definition TCling.cxx:8945
bool fIsShuttingDown
Definition TCling.h:187
void MethodArgInfo_Delete(MethodArgInfo_t *marginfo) const final
Definition TCling.cxx:9173
DataMemberInfo_t * DataMemberInfo_Factory(ClassInfo_t *clinfo, TDictionary::EMemberSelection selection) const final
Definition TCling.cxx:8543
void ClassInfo_Destruct(ClassInfo_t *info, void *arena) const final
Definition TCling.cxx:8151
TClass * GetClass(const std::type_info &typeinfo, Bool_t load) const final
Demangle the name (from the typeinfo) and then request the class via the usual name based interface (...
Definition TCling.cxx:6070
Int_t UnloadAllSharedLibraryMaps() final
Unload the library map entries coming from all the loaded shared libraries.
Definition TCling.cxx:5958
void ClassInfo_Init(ClassInfo_t *info, const char *funcname) const final
Definition TCling.cxx:8213
std::set< TClass * > & GetModTClasses()
Definition TCling.h:565
ClassInfo_t * BaseClassInfo_ClassInfo(BaseClassInfo_t *) const final
Definition TCling.cxx:8481
TClingCallbacks * fClingCallbacks
Definition TCling.h:139
Long64_t CallFunc_ExecInt64(CallFunc_t *func, void *address) const final
Definition TCling.cxx:7837
Long_t ClassInfo_Property(ClassInfo_t *info) const final
Definition TCling.cxx:8336
Longptr_t ClassInfo_GetBaseOffset(ClassInfo_t *fromDerived, ClassInfo_t *toBase, void *address, bool isDerivedObject) const final
Definition TCling.cxx:8460
void UpdateEnumConstants(TEnum *enumObj, TClass *cl) const final
Definition TCling.cxx:419
void ExecuteWithArgsAndReturn(TMethod *method, void *address, const void *args[]=nullptr, int nargs=0, void *ret=nullptr) const final
Definition TCling.cxx:5349
Bool_t IsErrorMessagesEnabled() const final
If error messages are disabled, the interpreter should suppress its failures and warning messages fro...
Definition TCling.cxx:7291
TString fIncludePath
Definition TCling.h:115
int DisplayIncludePath(FILE *fout) const final
Interface to cling function.
Definition TCling.cxx:7368
void TransactionRollback(const cling::Transaction &T)
Definition TCling.cxx:6908
Long_t FuncTempInfo_Property(FuncTempInfo_t *) const final
Return the property of the function template.
Definition TCling.cxx:8814
TEnum * CreateEnum(void *VD, TClass *cl) const final
Definition TCling.cxx:467
const char * TypeInfo_TrueName(TypeInfo_t *tinfo) const final
Definition TCling.cxx:9344
Int_t UnloadLibraryMap(const char *library) final
Unload library map entries coming from the specified library.
Definition TCling.cxx:5976
void RegisterTemporary(const TInterpreterValue &value)
Definition TCling.cxx:7631
MutexStateAndRecurseCount fInitialMutex
Definition TCling.h:174
const char * GetSharedLibs() final
Return the list of shared libraries loaded into the process.
Definition TCling.cxx:6946
int MethodArgInfo_Next(MethodArgInfo_t *marginfo) const final
Definition TCling.cxx:9212
void SnapshotMutexState(ROOT::TVirtualRWMutex *mtx) final
Definition TCling.cxx:9454
Long_t TypeInfo_Property(TypeInfo_t *tinfo) const final
Definition TCling.cxx:9320
static constexpr const char * kNullArgv[]
Definition TCling.h:185
friend void TCling__RegisterRdictForLoadPCM(const std::string &pcmFileNameFullPath, llvm::StringRef *pcmContent)
Definition TCling.cxx:586
const char * MethodInfo_GetPrototype(MethodInfo_t *minfo) const final
Definition TCling.cxx:9066
UInt_t FuncTempInfo_TemplateMinReqArgs(FuncTempInfo_t *) const final
Return the number of required template arguments of the function template described by ft_info.
Definition TCling.cxx:8804
std::vector< cling::Value > * fTemporaries
Definition TCling.h:133
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) final
Inject the module named "modulename" into cling; load all headers.
Definition TCling.cxx:2050
static Int_t ShallowAutoLoadImpl(const char *cls)
Definition TCling.cxx:6116
void MethodInfo_CreateSignature(MethodInfo_t *minfo, TString &signature) const final
Definition TCling.cxx:8952
Bool_t CheckClassTemplate(const char *name) final
Return true if there is a class template by the given name ...
Definition TCling.cxx:4312
void LibraryLoaded(const void *dyLibHandle, const char *canonicalName)
Definition TCling.cxx:6931
void RegisterTClassUpdate(TClass *oldcl, DictFuncPtr_t dict) final
Register classes that already existed prior to their dictionary loading and that already had a ClassI...
Definition TCling.cxx:2424
TObjArray * GetRootMapFiles() const final
Definition TCling.h:223
bool DataMemberInfo_IsValid(DataMemberInfo_t *dminfo) const final
Definition TCling.cxx:8570
bool ClassInfo_IsEnum(const char *name) const final
Definition TCling.cxx:8239
int MethodInfo_NDefaultArg(MethodInfo_t *minfo) const final
Definition TCling.cxx:9016
void CreateListOfMethods(TClass *cl) const final
Create list of pointers to methods for TClass cl.
Definition TCling.cxx:4459
Int_t RescanLibraryMap() final
Scan again along the dynamic path for library maps.
Definition TCling.cxx:5885
void * SpecialObjectLookupCtx_t
Definition TCling.h:151
std::map< const cling::Transaction *, size_t > fTransactionHeadersMap
Definition TCling.h:120
void ReportDiagnosticsToErrorHandler(bool enable=true) final
Report diagnostics to the ROOT error handler (see TError.h).
Definition TCling.cxx:7561
const char * MethodInfo_GetMangledName(MethodInfo_t *minfo) const final
Definition TCling.cxx:9056
Bool_t fHeaderParsingOnDemand
Definition TCling.h:181
std::hash< std::string > fStringHashFunction
Definition TCling.h:124
TEnv * fMapfile
Definition TCling.h:117
static void RemoveAndInvalidateObject(List &L, Object *O)
Definition TCling.h:577
void * GetInterfaceMethodWithPrototype(TClass *cl, const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch) final
Return pointer to cling interface function for a method of a class with a certain prototype,...
Definition TCling.cxx:5074
void * ClassInfo_New(ClassInfo_t *info) const final
Definition TCling.cxx:8304
int DisplayClass(FILE *fout, const char *name, int base, int start) const final
Definition TCling.cxx:7359
virtual void GetFunctionName(const clang::Decl *decl, std::string &name) const
Definition TCling.cxx:8705
void CreateListOfMethodArgs(TFunction *m) const final
Create list of pointers to method arguments for TMethod m.
Definition TCling.cxx:4484
void Execute(TMethod *, TObjArray *, int *=nullptr) final
Execute method on this object with parameters stored in the TObjArray.
Definition TCling.h:614
virtual const char * GetSTLIncludePath() const final
Return the directory containing CINT's stl cintdlls.
Definition TCling.cxx:7350
MethodArgInfo_t * MethodArgInfo_FactoryCopy(MethodArgInfo_t *marginfo) const final
Definition TCling.cxx:9196
Longptr_t BaseClassInfo_Offset(BaseClassInfo_t *toBaseClassInfo, void *address, bool isDerivedObject) const final
Definition TCling.cxx:8452
std::unordered_map< std::string, TObject * > SpecialObjectMap_t
Definition TCling.h:152
ECheckClassInfo CheckClassInfo(const char *name, Bool_t autoload, Bool_t isClassOrNamespaceOnly=kFALSE) final
Checks if an entity with the specified name is defined in Cling.
Definition TCling.cxx:4140
void * FindSym(const char *entry) const final
Interface to cling function.
Definition TCling.cxx:7397
void RegisterLoadedSharedLibrary(const char *name)
Register a new shared library name with the interpreter; add it to fSharedLibs.
Definition TCling.cxx:3400
void TypeInfo_Delete(TypeInfo_t *tinfo) const final
Definition TCling.cxx:9265
int MethodInfo_NArg(MethodInfo_t *minfo) const final
Definition TCling.cxx:9008
DeclId_t GetDataMemberWithValue(const void *ptrvalue) const final
NOT IMPLEMENTED.
Definition TCling.cxx:4905
std::unordered_set< const clang::NamespaceDecl * > fNSFromRootmaps
Definition TCling.h:125
EReturnType MethodCallReturnType(TFunction *func) const final
Definition TCling.cxx:9109
void ProcessClassesToUpdate()
Definition TCling.cxx:2020
DeclId_t GetFunctionWithValues(ClassInfo_t *cl, const char *method, const char *params, Bool_t objectIsConst=kFALSE) final
Return pointer to cling DeclId for a method of a class with a certain prototype, i....
Definition TCling.cxx:5097
TString GetMangledName(TClass *cl, const char *method, const char *params, Bool_t objectIsConst=kFALSE) final
Return the cling mangled name for a method of a class with parameters params (params is a string of a...
Definition TCling.cxx:4926
const char * MethodInfo_Title(MethodInfo_t *minfo) const final
Definition TCling.cxx:9101
TString fRootmapLoadPath
Definition TCling.h:116
const char * BaseClassInfo_TmpltName(BaseClassInfo_t *bcinfo) const final
Definition TCling.cxx:8515
Bool_t Declare(const char *code) final
Declare code to the interpreter, without any of the interpreter actions that could trigger a re-inter...
Definition TCling.cxx:3093
const char * BaseClassInfo_FullName(BaseClassInfo_t *bcinfo) const final
Definition TCling.cxx:8497
void CallFunc_SetArgs(CallFunc_t *func, const char *param) const final
Definition TCling.cxx:7974
int UnloadFile(const char *path) const final
Definition TCling.cxx:7594
void CallFunc_Exec(CallFunc_t *func, void *address) const final
Definition TCling.cxx:7794
Long_t FuncTempInfo_ExtraProperty(FuncTempInfo_t *) const final
Return the property not already defined in Property See TDictionary's EFunctionProperty.
Definition TCling.cxx:8874
bool CallFunc_IsValid(CallFunc_t *func) const final
Definition TCling.cxx:7893
const char * BaseClassInfo_Name(BaseClassInfo_t *bcinfo) const final
Definition TCling.cxx:8507
ROOT::TMetaUtils::TClingLookupHelper * fLookupHelper
Definition TCling.h:135
const char * DataMemberInfo_ValidArrayIndex(DataMemberInfo_t *dminfo) const final
Definition TCling.cxx:8658
Int_t GetMore() const final
Return whether we are waiting for more input either because the collected input contains unbalanced b...
Definition TCling.cxx:4505
Bool_t fIsAutoParsingSuspended
Definition TCling.h:182
std::string ToString(const char *type, void *obj) final
Definition TCling.cxx:1030
DeclId_t GetDeclId(const llvm::GlobalValue *gv) const
Return pointer to cling DeclId for a global value.
Definition TCling.cxx:4836
void Execute(const char *function, const char *params, int *error=nullptr) final
Execute a global function with arguments params.
Definition TCling.cxx:5197
bool ClassInfo_IsLoaded(ClassInfo_t *info) const final
Definition TCling.cxx:8264
Longptr_t ClassInfo_Tagnum(ClassInfo_t *info) const final
Definition TCling.cxx:8352
Long_t BaseClassInfo_Property(BaseClassInfo_t *bcinfo) const final
Definition TCling.cxx:8473
void CallFunc_SetFunc(CallFunc_t *func, ClassInfo_t *info, const char *method, const char *params, Longptr_t *Offset) const final
Definition TCling.cxx:7982
std::vector< std::string > GetUsingNamespaces(ClassInfo_t *cl) const final
Get the scopes representing using declarations of namespace.
Definition TCling.cxx:4439
const char * ClassInfo_FileName(ClassInfo_t *info) const final
Definition TCling.cxx:8360
void FuncTempInfo_Title(FuncTempInfo_t *, TString &name) const final
Return the comments associates with this function template.
Definition TCling.cxx:8913
const char * ClassInfo_TmpltName(ClassInfo_t *info) const final
Definition TCling.cxx:8394
void SaveContext() final
Save the current Cling state.
Definition TCling.cxx:3844
void LoadPCMImpl(TFile &pcmFile)
Tries to load a PCM from TFile; returns true on success.
Definition TCling.cxx:1736
Bool_t IsAutoLoadNamespaceCandidate(const clang::NamespaceDecl *nsDecl)
Definition TCling.cxx:6587
void ResetGlobals() final
Reset in Cling the list of global variables to the state saved by the last call to TCling::SaveGlobal...
Definition TCling.cxx:3725
void CodeComplete(const std::string &, size_t &, std::vector< std::string > &) final
The call to Cling's tab complition.
Definition TCling.cxx:7614
void ResetGlobalVar(void *obj) final
Reset the Cling 'user' global objects/variables state to the state saved by the last call to TCling::...
Definition TCling.cxx:3739
const char * MapCppName(const char *) const final
Interface to cling function.
Definition TCling.cxx:7469
Longptr_t Calc(const char *line, EErrorCode *error=nullptr) final
Directly execute an executable statement (e.g.
Definition TCling.cxx:3570
Int_t ReloadAllSharedLibraryMaps() final
Reload the library map entries coming from all the loaded shared libraries, after first unloading the...
Definition TCling.cxx:5897
void UpdateListOfGlobalFunctions() final
No op: see TClingCallbacks (used to update the list of global functions)
Definition TCling.cxx:3877
void DataMemberInfo_Delete(DataMemberInfo_t *dminfo) const final
Definition TCling.cxx:8536
char fPrompt[64]
Definition TCling.h:110
const char * GetTopLevelMacroName() const final
Return the file name of the current un-included interpreted file.
Definition TCling.cxx:5380
void * fPrevLoadedDynLibInfo
Definition TCling.h:137
void UpdateListOfDataMembers(TClass *cl) const
Update the list of pointers to data members for TClass cl This is now a nop.
Definition TCling.cxx:4477
void InspectMembers(TMemberInspector &, const void *obj, const TClass *cl, Bool_t isTransient) final
Visit all members over members, recursing over base classes.
Definition TCling.cxx:2688
Int_t SetClassSharedLibs(const char *cls, const char *libs) final
Register the AutoLoading information for a class.
Definition TCling.cxx:6038
MethodInfo_t * MethodInfo_FactoryCopy(MethodInfo_t *minfo) const final
Definition TCling.cxx:8985
std::set< const char * > fParsedPayloadsAddresses
Definition TCling.h:123
CallFuncIFacePtr_t CallFunc_IFacePtr(CallFunc_t *func) const final
Definition TCling.cxx:7902
Int_t GetExitCode() const final
Definition TCling.h:211
MethodArgInfo_t * MethodArgInfo_Factory() const final
Definition TCling.cxx:9180
void SetProcessLineLock(Bool_t lock=kTRUE) final
Definition TCling.h:320
static void UpdateClassInfo(char *name, Long_t tagnum)
No op: see TClingCallbacks.
Definition TCling.cxx:6696
DeclId_t GetFunction(ClassInfo_t *cl, const char *funcname) final
Return pointer to cling interface function for a method of a class with a certain name.
Definition TCling.cxx:4993
void ClassInfo_Delete(ClassInfo_t *info) const final
Definition TCling.cxx:8128
std::unique_ptr< cling::Interpreter > fInterpreter
Definition TCling.h:130
EDataType ClassInfo_GetUnderlyingType(ClassInfo_t *info) const final
Definition TCling.cxx:8255
void FuncTempInfo_Delete(FuncTempInfo_t *) const final
Delete the FuncTempInfo_t.
Definition TCling.cxx:8750
DeclId_t GetFunctionTemplate(ClassInfo_t *cl, const char *funcname) final
Return pointer to cling interface function for a method of a class with a certain name.
Definition TCling.cxx:5141
TCling & operator=(const TCling &)=delete
Int_t DeleteVariable(const char *name) final
Undeclare obj called name.
Definition TCling.cxx:3783
Longptr_t DataMemberInfo_Offset(DataMemberInfo_t *dminfo) const final
Definition TCling.cxx:8594
CallFunc_t * CallFunc_Factory() const final
Definition TCling.cxx:7853
MethodInfo_t * MethodInfo_Factory() const final
Definition TCling.cxx:8960
Long_t DataMemberInfo_TypeProperty(DataMemberInfo_t *dminfo) const final
Definition TCling.cxx:8610
void ClearFileBusy() final
Reset the interpreter internal state in case a previous action was not correctly terminated.
Definition TCling.cxx:3072
cling::MetaProcessor * GetMetaProcessorImpl() const
Definition TCling.h:631
bool DiagnoseIfInterpreterException(const std::exception &e) const final
Definition TCling.cxx:2482
void SetAllocunlockfunc(void(*)()) const final
[Place holder for Mutex Unlock] Provide the interpreter with a way to release a lock used to protect ...
Definition TCling.cxx:7492
std::set< size_t > fLookedUpClasses
Definition TCling.h:121
TCling(const TCling &)=delete
virtual void AddAvailableIndentifiers(TSeqCollection &Idents) final
Definition TCling.cxx:2398
void TypedefInfo_Delete(TypedefInfo_t *tinfo) const final
Definition TCling.cxx:9358
void Reset() final
Pressing Ctrl+C should forward here.
Definition TCling.cxx:3693
const char * TypedefInfo_TrueName(TypedefInfo_t *tinfo) const final
Definition TCling.cxx:9430
int SetClassAutoLoading(int) const final
Enable/Disable the AutoLoading of libraries.
Definition TCling.cxx:7513
const char * ClassInfo_FullName(ClassInfo_t *info) const final
Definition TCling.cxx:8368
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:6341
const char * MethodInfo_TypeName(MethodInfo_t *minfo) const final
Definition TCling.cxx:9082
void CallFunc_SetArg(CallFunc_t *func, Long_t param) const final
Definition TCling.cxx:7918
const char * GetIncludePath() final
Refresh the list of include paths known to the interpreter and return it with -I prepended.
Definition TCling.cxx:7319
void UpdateListsOnUnloaded(const cling::Transaction &T)
Invalidate stored TCling state for declarations included in transaction ‘T’.
Definition TCling.cxx:6806
void UpdateClassInfoWithDecl(const clang::NamedDecl *ND)
Internal function. Inform a TClass about its new TagDecl or NamespaceDecl.
Definition TCling.cxx:6638
Bool_t IsProcessLineLocked() const final
Definition TCling.h:317
virtual void Initialize() final
Initialize the interpreter, once TROOT::fInterpreter is set.
Definition TCling.cxx:1676
int ClassInfo_GetMethodNArg(ClassInfo_t *info, const char *method, const char *proto, Bool_t objectIsConst=false, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch) const final
Definition TCling.cxx:8189
DeclId_t GetDataMember(ClassInfo_t *cl, const char *name) const final
Return pointer to cling Decl of global/static variable that is located at the address given by addr.
Definition TCling.cxx:4735
void * fAutoLoadCallBack
Definition TCling.h:147
void FuncTempInfo_Name(FuncTempInfo_t *, TString &name) const final
Return the name of this function template.
Definition TCling.cxx:8900
std::unique_ptr< cling::MetaProcessor > fMetaProcessor
Definition TCling.h:131
bool TypeInfo_IsValid(TypeInfo_t *tinfo) const final
Definition TCling.cxx:9304
bool RegisterPrebuiltModulePath(const std::string &FullPath, const std::string &ModuleMapName="module.modulemap") const final
Definition TCling.cxx:1946
std::string MethodInfo_TypeNormalizedName(MethodInfo_t *minfo) const final
Definition TCling.cxx:9090
const char * ClassInfo_Name(ClassInfo_t *info) const final
Definition TCling.cxx:8378
TClass * GenerateTClass(const char *classname, Bool_t emulation, Bool_t silent=kFALSE) final
Generate a TClass for the given class.
Definition TCling.cxx:4515
ULong64_t fTransactionCount
Definition TCling.h:148
bool ClassInfo_HasDefaultConstructor(ClassInfo_t *info, Bool_t testio=kFALSE) const final
Definition TCling.cxx:8197
void EndOfLineAction() final
It calls a "fantom" method to synchronize user keyboard input and ROOT prompt line.
Definition TCling.cxx:3116
TypeInfo_t * TypeInfo_FactoryCopy(TypeInfo_t *) const final
Definition TCling.cxx:9288
bool ClassInfo_HasMethod(ClassInfo_t *info, const char *name) const final
Definition TCling.cxx:8205
void ClassInfo_DeleteArray(ClassInfo_t *info, void *arena, bool dtorOnly) const final
Definition TCling.cxx:8143
std::map< size_t, std::vector< const char * > > fClassesHeadersMap
Definition TCling.h:119
const char * DataMemberInfo_TypeTrueName(DataMemberInfo_t *dminfo) const final
Definition TCling.cxx:8634
virtual void ShutDown() final
Definition TCling.cxx:1695
unsigned long long GetInterpreterStateMarker() const final
Definition TCling.h:224
void UpdateListOfTypes() final
No op: see TClingCallbacks (used to update the list of types)
Definition TCling.cxx:3884
Long_t TypedefInfo_Property(TypedefInfo_t *tinfo) const final
Definition TCling.cxx:9414
void RegisterRdictForLoadPCM(const std::string &pcmFileNameFullPath, llvm::StringRef *pcmContent)
Register Rdict data for future loading by LoadPCM;.
Definition TCling.cxx:1718
Longptr_t ProcessLineSynch(const char *line, EErrorCode *error=nullptr) final
Let cling process a command line synchronously, i.e we are waiting it will be finished.
Definition TCling.cxx:3554
TString GetMangledNameWithPrototype(TClass *cl, const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch) final
Return the cling mangled name for a method of a class with a certain prototype, i....
Definition TCling.cxx:4953
static void UpdateAllCanvases()
Update all canvases at end the terminal input command.
Definition TCling.cxx:6711
Int_t LoadLibraryMap(const char *rootmapfile=nullptr) final
Load map between class and library.
Definition TCling.cxx:5701
Longptr_t BaseClassInfo_Tagnum(BaseClassInfo_t *bcinfo) const final
Definition TCling.cxx:8489
void LibraryUnloaded(const void *dyLibHandle, const char *canonicalName)
Definition TCling.cxx:6938
This class defines an abstract interface that must be implemented by all classes that contain diction...
The TEnum class implements the enum type.
Definition TEnum.h:33
The TEnv class reads config files, by default named .rootrc.
Definition TEnv.h:124
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Definition TFile.h:51
Global functions class (global functions are obtained from CINT).
Definition TFunction.h:30
THashTable implements a hash table to store TObject's.
Definition THashTable.h:35
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 TDataMember objects designed for fast access given a DeclId_t and for keep track of T...
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
A collection of TFunction objects designed for fast access given a DeclId_t and for keep track of TFu...
A collection of TFunction objects designed for fast access given a DeclId_t and for keep track of TFu...
Abstract base class for accessing the data-members of a class.
Each ROOT class (see TClass) has a linked list of methods.
Definition TMethod.h:38
An array of TObjects.
Definition TObjArray.h:31
Mother of all ROOT objects.
Definition TObject.h:41
Sequenceable collection abstract base class.
Basic string class.
Definition TString.h:139
TLine * line
Type
enumeration specifying the integration types.
const Int_t n
Definition legend1.C:16
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
State as returned by GetStateDelta() that can be passed to Restore()
bool operator()(const char *a, const char *b) const
Definition TCling.h:141
std::unique_ptr< StateDelta > fDelta
Definition TCling.h:171
MutexStateAndRecurseCount fInitialState
Definition TCling.h:170
std::unique_ptr< ROOT::TVirtualRWMutex::State > fState
State of gCoreMutex when the first interpreter-related function was invoked.
Definition TCling.h:157
Int_t fRecurseCount
Interpreter-related functions will push the "entry" lock state to *this.
Definition TCling.h:162
TMarker m
Definition textangle.C:8
static void output()