Logo ROOT   6.18/05
Reference Guide
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-2012, 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++-11 interpreter based on //
23// clang/LLVM technology. //
24// //
25//////////////////////////////////////////////////////////////////////////
26
27#include "TInterpreter.h"
28
29#include <set>
30#include <unordered_set>
31#include <unordered_map>
32#include <map>
33#include <vector>
34
35#ifndef WIN32
36#define TWin32SendClass char
37#endif
38
39namespace llvm {
40 class GlobalValue;
41}
42
43namespace clang {
44 class CXXRecordDecl;
45 class Decl;
46 class DeclContext;
47 class EnumDecl;
48 class FunctionDecl;
49 class NamedDecl;
50 class NamespaceDecl;
51 class TagDecl;
52 class Type;
53 class QualType;
54}
55namespace cling {
56 class Interpreter;
57 class MetaProcessor;
58 class Transaction;
59 class Value;
60}
61
62class TClingCallbacks;
63class TEnv;
64class THashTable;
66class TMethod;
67class TObjArray;
68
69namespace ROOT {
70 namespace TMetaUtils {
71 class TNormalizedCtxt;
72 class TClingLookupHelper;
73 }
74}
75
76extern "C" {
77 void TCling__UpdateListsOnCommitted(const cling::Transaction&,
78 cling::Interpreter*);
79 void TCling__UpdateListsOnUnloaded(const cling::Transaction&);
80 void TCling__TransactionRollback(const cling::Transaction&);
81 TObject* TCling__GetObjectAddress(const char *Name, void *&LookupCtx);
82 const clang::Decl* TCling__GetObjectDecl(TObject *obj);
83 void TCling__LibraryLoaded(const void* dyLibHandle,
84 const char* canonicalName);
85 void TCling__LibraryUnloaded(const void* dyLibHandle,
86 const char* canonicalName);
87}
88
89class TCling : public TInterpreter {
90private: // Static Data Members
91
92 static void* fgSetOfSpecials; // set of TObjects used in CINT variables
93
94private: // Data Members
95
96 Int_t fMore; // The brace indent level for the cint command line processor.
97 Int_t fExitCode; // Value passed to exit() in interpreter.
98 char fPrompt[64]; // Command line prompt string.
99 //cling::DictPosition fDictPos; // dictionary context after initialization is complete.
100 //cling::DictPosition fDictPosGlobals; // dictionary context after ResetGlobals().
101 TString fSharedLibs; // Shared libraries loaded by G__loadfile().
102 Int_t fGlobalsListSerial;// Last time we refreshed the ROOT list of globals.
103 TString fIncludePath; // Interpreter include path.
104 TString fRootmapLoadPath; // Dynamic load path for rootmap files.
105 TEnv* fMapfile; // Association of classes to libraries.
106 std::map<size_t,std::vector<const char*>> fClassesHeadersMap; // Map of classes hashes and headers associated
107 std::map<const cling::Transaction*,size_t> fTransactionHeadersMap; // Map which transaction contains which autoparse.
108 std::set<size_t> fLookedUpClasses; // Set of classes for which headers were looked up already
109 std::set<size_t> fPayloads; // Set of payloads
110 std::set<const char*> fParsedPayloadsAddresses; // Set of payloads which were parsed
111 std::hash<std::string> fStringHashFunction; // A simple hashing function
112 std::unordered_set<const clang::NamespaceDecl*> fNSFromRootmaps; // Collection of namespaces fwd declared in the rootmaps
113 TObjArray* fRootmapFiles; // Loaded rootmap files.
114 Bool_t fLockProcessLine; // True if ProcessLine should lock gInterpreterMutex.
115 Bool_t fAllowLibLoad; // True if library load is allowed (i.e. not in rootcling)
116 Bool_t fCxxModulesEnabled;// True if C++ modules was enabled
117
118 cling::Interpreter* fInterpreter; // The interpreter.
119 cling::MetaProcessor* fMetaProcessor; // The metaprocessor.
120
121 std::vector<cling::Value> *fTemporaries; // Stack of temporaries
122 ROOT::TMetaUtils::TNormalizedCtxt *fNormalizedCtxt; // Which typedef to avoid stripping.
123 ROOT::TMetaUtils::TClingLookupHelper *fLookupHelper; // lookup helper used by TClassEdit
124
125 void* fPrevLoadedDynLibInfo; // Internal info to mark the last loaded libray.
126 std::vector<void*> fRegisterModuleDyLibs; // Stack of libraries currently running RegisterModule
127 TClingCallbacks* fClingCallbacks; // cling::Interpreter owns it.
129 bool operator()(const char* a, const char *b) const {
130 return strcmp(a, b) < 0;
131 }
132 };
133 std::set<TClass*> fModTClasses;
134 std::vector<std::pair<TClass*,DictFuncPtr_t> > fClassesToUpdate;
136 ULong64_t fTransactionCount; // Cling counter for commited or unloaded transactions which changed the AST.
137 std::vector<const char*> fCurExecutingMacros;
138
140 typedef std::unordered_map<std::string, TObject*> SpecialObjectMap_t;
141 std::map<SpecialObjectLookupCtx_t, SpecialObjectMap_t> fSpecialObjectMaps;
142
144 /// State of gCoreMutex when the first interpreter-related function was invoked.
145 std::unique_ptr<ROOT::TVirtualRWMutex::State> fState;
146
147 /// Interpreter-related functions will push the "entry" lock state to *this.
148 /// Recursive calls will do that, too - but we must only forget about the lock
149 /// state once this recursion count went to 0.
151
152 operator bool() const { return (bool)fState; }
153 };
154
155 std::vector<MutexStateAndRecurseCount> fInitialMutex{1};
156
157 DeclId_t GetDeclId(const llvm::GlobalValue *gv) const;
158
161
162 UInt_t AutoParseImplRecurse(const char *cls, bool topLevel);
163 constexpr static const char* kNullArgv[] = {nullptr};
164
165 bool fIsShuttingDown = false;
166
167protected:
169
170public: // Public Interface
171
172 virtual ~TCling();
173 TCling(const char* name, const char* title, const char* const argv[]);
174 TCling(const char* name, const char* title): TCling(name, title, kNullArgv) {}
175
176 cling::Interpreter *GetInterpreterImpl() { return fInterpreter; }
177
178 void AddIncludePath(const char* path);
179 void *GetAutoLoadCallBack() const { return fAutoLoadCallBack; }
180 void *SetAutoLoadCallBack(void* cb) { void* prev = fAutoLoadCallBack; fAutoLoadCallBack = cb; return prev; }
181 Int_t AutoLoad(const char *classname, Bool_t knowDictNotLoaded = kFALSE);
182 Int_t AutoLoad(const std::type_info& typeinfo, Bool_t knowDictNotLoaded = kFALSE);
183 Int_t AutoParse(const char* cls);
184 void* LazyFunctionCreatorAutoload(const std::string& mangled_name);
185 bool LibraryLoadingFailed(const std::string&, const std::string&, bool, bool);
187 Bool_t IsAutoLoadNamespaceCandidate(const clang::NamespaceDecl* nsDecl);
188 void ClearFileBusy();
189 void ClearStack(); // Delete existing temporary values
190 Bool_t Declare(const char* code);
191 void EnableAutoLoading();
192 void EndOfLineAction();
193 TClass *GetClass(const std::type_info& typeinfo, Bool_t load) const;
194 Int_t GetExitCode() const { return fExitCode; }
195 TEnv* GetMapfile() const { return fMapfile; }
196 Int_t GetMore() const { return fMore; }
197 TClass *GenerateTClass(const char *classname, Bool_t emulation, Bool_t silent = kFALSE);
198 TClass *GenerateTClass(ClassInfo_t *classinfo, Bool_t silent = kFALSE);
199 Int_t GenerateDictionary(const char* classes, const char* includes = "", const char* options = 0);
200 char* GetPrompt() { return fPrompt; }
201 const char* GetSharedLibs();
202 const char* GetClassSharedLibs(const char* cls);
203 const char* GetSharedLibDeps(const char* lib);
204 const char* GetIncludePath();
205 virtual const char* GetSTLIncludePath() const;
207 unsigned long long GetInterpreterStateMarker() const { return fTransactionCount;}
208 virtual void Initialize();
209 virtual void ShutDown();
210 void InspectMembers(TMemberInspector&, const void* obj, const TClass* cl, Bool_t isTransient);
211 Bool_t IsLoaded(const char* filename) const;
212 Bool_t IsLibraryLoaded(const char* libname) const;
213 Bool_t HasPCMForLibrary(const char *libname) const;
214 Int_t Load(const char* filenam, Bool_t system = kFALSE);
215 void LoadMacro(const char* filename, EErrorCode* error = 0);
216 Int_t LoadLibraryMap(const char* rootmapfile = 0);
220 Int_t UnloadLibraryMap(const char* library);
221 Long_t ProcessLine(const char* line, EErrorCode* error = 0);
222 Long_t ProcessLineAsynch(const char* line, EErrorCode* error = 0);
223 Long_t ProcessLineSynch(const char* line, EErrorCode* error = 0);
224 void PrintIntro();
225 void RegisterModule(const char* modulename,
226 const char** headers,
227 const char** includePaths,
228 const char* payloadCode,
229 const char* fwdDeclsCode,
230 void (*triggerFunc)(),
231 const FwdDeclArgsToKeepCollection_t& fwdDeclsArgToSkip,
232 const char** classesHeaders,
233 Bool_t lateRegistration = false,
234 Bool_t hasCxxModule = false);
235 void RegisterTClassUpdate(TClass *oldcl,DictFuncPtr_t dict);
236 void UnRegisterTClassUpdate(const TClass *oldcl);
237
238 Int_t SetClassSharedLibs(const char *cls, const char *libs);
239 void SetGetline(const char * (*getlineFunc)(const char* prompt),
240 void (*histaddFunc)(const char* line));
241 void Reset();
242 void ResetAll();
243 void ResetGlobals();
244 void ResetGlobalVar(void* obj);
245 void RewindDictionary();
246 Int_t DeleteGlobal(void* obj);
247 Int_t DeleteVariable(const char *name);
248 void SaveContext();
249 void SaveGlobalsContext();
250 void UpdateListOfGlobals();
252 void UpdateListOfTypes();
253 void SetClassInfo(TClass* cl, Bool_t reload = kFALSE);
254
255 ECheckClassInfo CheckClassInfo(const char *name, Bool_t autoload, Bool_t isClassOrNamespaceOnly = kFALSE);
256
257 Bool_t CheckClassTemplate(const char *name);
258 Long_t Calc(const char* line, EErrorCode* error = 0);
259 void CreateListOfBaseClasses(TClass* cl) const;
260 void CreateListOfDataMembers(TClass* cl) const;
261 void CreateListOfMethods(TClass* cl) const;
263 void UpdateListOfMethods(TClass* cl) const;
264 void UpdateListOfDataMembers(TClass* cl) const;
265
266 virtual DeclId_t GetDataMember(ClassInfo_t *cl, const char *name) const;
267 virtual DeclId_t GetDataMemberAtAddr(const void *addr) const;
268 virtual DeclId_t GetDataMemberWithValue(const void *ptrvalue) const;
269 virtual DeclId_t GetEnum(TClass *cl, const char *name) const;
270 virtual TEnum* CreateEnum(void *VD, TClass *cl) const;
271 virtual void UpdateEnumConstants(TEnum* enumObj, TClass* cl) const;
272 virtual void LoadEnums(TListOfEnums& cl) const;
273 virtual std::string ToString(const char* type, void *obj);
274 TString GetMangledName(TClass* cl, const char* method, const char* params, Bool_t objectIsConst = kFALSE);
275 TString GetMangledNameWithPrototype(TClass* cl, const char* method, const char* proto, Bool_t objectIsConst = kFALSE, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch);
276 void* GetInterfaceMethod(TClass* cl, const char* method, const char* params, Bool_t objectIsConst = kFALSE);
277 void* GetInterfaceMethodWithPrototype(TClass* cl, const char* method, const char* proto, Bool_t objectIsConst = kFALSE, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch);
278 DeclId_t GetFunction(ClassInfo_t *cl, const char *funcname);
279 DeclId_t GetFunctionWithPrototype(ClassInfo_t *cl, const char* method, const char* proto, Bool_t objectIsConst = kFALSE, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch);
280 DeclId_t GetFunctionWithValues(ClassInfo_t *cl, const char* method, const char* params, Bool_t objectIsConst = kFALSE);
281 DeclId_t GetFunctionTemplate(ClassInfo_t *cl, const char *funcname);
282 void GetFunctionOverloads(ClassInfo_t *cl, const char *funcname, std::vector<DeclId_t>& res) const;
283 virtual void LoadFunctionTemplates(TClass* cl) const;
284
285 virtual std::vector<std::string> GetUsingNamespaces(ClassInfo_t *cl) const;
286
287 void GetInterpreterTypeName(const char* name, std::string &output, Bool_t full = kFALSE);
288 void Execute(const char* function, const char* params, int* error = 0);
289 void Execute(TObject* obj, TClass* cl, const char* method, const char* params, int* error = 0);
290 void Execute(TObject* obj, TClass* cl, const char* method, const char* params, Bool_t objectIsConst, int* error = 0);
291 void Execute(TObject* obj, TClass* cl, TMethod* method, TObjArray* params, int* error = 0);
292 void ExecuteWithArgsAndReturn(TMethod* method, void* address, const void* args[] = 0, int nargs = 0, void* ret= 0) const;
293 Long_t ExecuteMacro(const char* filename, EErrorCode* error = 0);
294 void RecursiveRemove(TObject* obj);
298 return fLockProcessLine;
299 }
301 fLockProcessLine = lock;
302 }
303 const char* TypeName(const char* typeDesc);
304
306 void ForgetMutexState();
307
308 void ApplyToInterpreterMutex(void* delta);
310
311 static void UpdateClassInfo(char* name, Long_t tagnum);
312 static void UpdateClassInfoWork(const char* name);
313 void RefreshClassInfo(TClass *cl, const clang::NamedDecl *def, bool alias);
314 void UpdateClassInfoWithDecl(const clang::NamedDecl* ND);
315 static void UpdateAllCanvases();
316
317 // Misc
318 virtual int DisplayClass(FILE* fout, const char* name, int base, int start) const;
319 virtual int DisplayIncludePath(FILE* fout) const;
320 virtual void* FindSym(const char* entry) const;
321 virtual void GenericError(const char* error) const;
322 virtual Long_t GetExecByteCode() const;
323 virtual const char* GetTopLevelMacroName() const;
324 virtual const char* GetCurrentMacroName() const;
325 virtual int GetSecurityError() const;
326 virtual int LoadFile(const char* path) const;
327 virtual Bool_t LoadText(const char* text) const;
328 virtual const char* MapCppName(const char*) const;
329 virtual void SetAlloclockfunc(void (*)()) const;
330 virtual void SetAllocunlockfunc(void (*)()) const;
331 virtual int SetClassAutoloading(int) const;
332 virtual int SetClassAutoparsing(int) ;
334 virtual void SetErrmsgcallback(void* p) const;
335 virtual void SetTempLevel(int val) const;
336 virtual int UnloadFile(const char* path) const;
337
338 void CodeComplete(const std::string&, size_t&,
339 std::vector<std::string>&);
340 virtual int Evaluate(const char*, TInterpreterValue&);
341 virtual std::unique_ptr<TInterpreterValue> MakeInterpreterValue() const;
342 void RegisterTemporary(const TInterpreterValue& value);
343 void RegisterTemporary(const cling::Value& value);
344 const ROOT::TMetaUtils::TNormalizedCtxt& GetNormalizedContext() const {return *fNormalizedCtxt;};
345 TObject* GetObjectAddress(const char *Name, void *&LookupCtx);
346
347
348 // core/meta helper functions.
349 virtual EReturnType MethodCallReturnType(TFunction *func) const;
350 virtual void GetFunctionName(const clang::FunctionDecl *decl, std::string &name) const;
351 virtual bool DiagnoseIfInterpreterException(const std::exception &e) const;
352
353 // CallFunc interface
354 virtual DeclId_t GetDeclId(CallFunc_t *info) const;
355 virtual void CallFunc_Delete(CallFunc_t* func) const;
356 virtual void CallFunc_Exec(CallFunc_t* func, void* address) const;
357 virtual void CallFunc_Exec(CallFunc_t* func, void* address, TInterpreterValue& val) const;
358 virtual void CallFunc_ExecWithReturn(CallFunc_t* func, void* address, void* ret) const;
359 virtual void CallFunc_ExecWithArgsAndReturn(CallFunc_t* func, void* address, const void* args[] = 0, int nargs = 0, void* ret = 0) const;
360 virtual Long_t CallFunc_ExecInt(CallFunc_t* func, void* address) const;
361 virtual Long64_t CallFunc_ExecInt64(CallFunc_t* func, void* address) const;
362 virtual Double_t CallFunc_ExecDouble(CallFunc_t* func, void* address) const;
363 virtual CallFunc_t* CallFunc_Factory() const;
364 virtual CallFunc_t* CallFunc_FactoryCopy(CallFunc_t* func) const;
365 virtual MethodInfo_t* CallFunc_FactoryMethod(CallFunc_t* func) const;
366 virtual void CallFunc_IgnoreExtraArgs(CallFunc_t* func, bool ignore) const;
367 virtual void CallFunc_Init(CallFunc_t* func) const;
368 virtual bool CallFunc_IsValid(CallFunc_t* func) const;
369 virtual CallFuncIFacePtr_t CallFunc_IFacePtr(CallFunc_t * func) const;
370 virtual void CallFunc_ResetArg(CallFunc_t* func) const;
371 virtual void CallFunc_SetArg(CallFunc_t* func, Long_t param) const;
372 virtual void CallFunc_SetArg(CallFunc_t* func, ULong_t param) const;
373 virtual void CallFunc_SetArg(CallFunc_t* func, Float_t param) const;
374 virtual void CallFunc_SetArg(CallFunc_t* func, Double_t param) const;
375 virtual void CallFunc_SetArg(CallFunc_t* func, Long64_t param) const;
376 virtual void CallFunc_SetArg(CallFunc_t* func, ULong64_t param) const;
377 virtual void CallFunc_SetArgArray(CallFunc_t* func, Long_t* paramArr, Int_t nparam) const;
378 virtual void CallFunc_SetArgs(CallFunc_t* func, const char* param) const;
379 virtual void CallFunc_SetFunc(CallFunc_t* func, ClassInfo_t* info, const char* method, const char* params, Long_t* Offset) const;
380 virtual void CallFunc_SetFunc(CallFunc_t* func, ClassInfo_t* info, const char* method, const char* params, bool objectIsConst, Long_t* Offset) const;
381 virtual void CallFunc_SetFunc(CallFunc_t* func, MethodInfo_t* info) const;
382 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;
383 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;
384 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;
385 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;
386
387 virtual std::string CallFunc_GetWrapperCode(CallFunc_t *func) const;
388
389 // ClassInfo interface
390 virtual DeclId_t GetDeclId(ClassInfo_t *info) const;
391 virtual Bool_t ClassInfo_Contains(ClassInfo_t *info, DeclId_t declid) const;
392 virtual Long_t ClassInfo_ClassProperty(ClassInfo_t* info) const;
393 virtual void ClassInfo_Delete(ClassInfo_t* info) const;
394 virtual void ClassInfo_Delete(ClassInfo_t* info, void* arena) const;
395 virtual void ClassInfo_DeleteArray(ClassInfo_t* info, void* arena, bool dtorOnly) const;
396 virtual void ClassInfo_Destruct(ClassInfo_t* info, void* arena) const;
397 virtual ClassInfo_t* ClassInfo_Factory(Bool_t all = kTRUE) const;
398 virtual ClassInfo_t* ClassInfo_Factory(ClassInfo_t* cl) const;
399 virtual ClassInfo_t* ClassInfo_Factory(const char* name) const;
400 virtual ClassInfo_t* ClassInfo_Factory(DeclId_t declid) const;
401 virtual Long_t ClassInfo_GetBaseOffset(ClassInfo_t* fromDerived, ClassInfo_t* toBase, void * address, bool isDerivedObject) const;
402 virtual int ClassInfo_GetMethodNArg(ClassInfo_t* info, const char* method, const char* proto, Bool_t objectIsConst = false, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) const;
403 virtual bool ClassInfo_HasDefaultConstructor(ClassInfo_t* info) const;
404 virtual bool ClassInfo_HasMethod(ClassInfo_t* info, const char* name) const;
405 virtual void ClassInfo_Init(ClassInfo_t* info, const char* funcname) const;
406 virtual void ClassInfo_Init(ClassInfo_t* info, int tagnum) const;
407 virtual bool ClassInfo_IsBase(ClassInfo_t* info, const char* name) const;
408 virtual bool ClassInfo_IsEnum(const char* name) const;
409 virtual bool ClassInfo_IsScopedEnum(ClassInfo_t* info) const;
410 virtual EDataType ClassInfo_GetUnderlyingType(ClassInfo_t* info) const;
411 virtual bool ClassInfo_IsLoaded(ClassInfo_t* info) const;
412 virtual bool ClassInfo_IsValid(ClassInfo_t* info) const;
413 virtual bool ClassInfo_IsValidMethod(ClassInfo_t* info, const char* method, const char* proto, Long_t* offset, ROOT::EFunctionMatchMode /* mode */ = ROOT::kConversionMatch) const;
414 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;
415 virtual int ClassInfo_Next(ClassInfo_t* info) const;
416 virtual void* ClassInfo_New(ClassInfo_t* info) const;
417 virtual void* ClassInfo_New(ClassInfo_t* info, int n) const;
418 virtual void* ClassInfo_New(ClassInfo_t* info, int n, void* arena) const;
419 virtual void* ClassInfo_New(ClassInfo_t* info, void* arena) const;
420 virtual Long_t ClassInfo_Property(ClassInfo_t* info) const;
421 virtual int ClassInfo_Size(ClassInfo_t* info) const;
422 virtual Long_t ClassInfo_Tagnum(ClassInfo_t* info) const;
423 virtual const char* ClassInfo_FileName(ClassInfo_t* info) const;
424 virtual const char* ClassInfo_FullName(ClassInfo_t* info) const;
425 virtual const char* ClassInfo_Name(ClassInfo_t* info) const;
426 virtual const char* ClassInfo_Title(ClassInfo_t* info) const;
427 virtual const char* ClassInfo_TmpltName(ClassInfo_t* info) const;
428
429 // BaseClassInfo interface
430 virtual void BaseClassInfo_Delete(BaseClassInfo_t* bcinfo) const;
431 virtual BaseClassInfo_t* BaseClassInfo_Factory(ClassInfo_t* info) const;
432 virtual BaseClassInfo_t* BaseClassInfo_Factory(ClassInfo_t* derived,
433 ClassInfo_t* base) const;
434 virtual int BaseClassInfo_Next(BaseClassInfo_t* bcinfo) const;
435 virtual int BaseClassInfo_Next(BaseClassInfo_t* bcinfo, int onlyDirect) const;
436 virtual Long_t BaseClassInfo_Offset(BaseClassInfo_t* toBaseClassInfo, void * address, bool isDerivedObject) const;
437 virtual Long_t BaseClassInfo_Property(BaseClassInfo_t* bcinfo) const;
438 virtual Long_t BaseClassInfo_Tagnum(BaseClassInfo_t* bcinfo) const;
439 virtual ClassInfo_t*BaseClassInfo_ClassInfo(BaseClassInfo_t * /* bcinfo */) const;
440 virtual const char* BaseClassInfo_FullName(BaseClassInfo_t* bcinfo) const;
441 virtual const char* BaseClassInfo_Name(BaseClassInfo_t* bcinfo) const;
442 virtual const char* BaseClassInfo_TmpltName(BaseClassInfo_t* bcinfo) const;
443
444 // DataMemberInfo interface
445 virtual DeclId_t GetDeclId(DataMemberInfo_t *info) const;
446 virtual int DataMemberInfo_ArrayDim(DataMemberInfo_t* dminfo) const;
447 virtual void DataMemberInfo_Delete(DataMemberInfo_t* dminfo) const;
448 virtual DataMemberInfo_t* DataMemberInfo_Factory(ClassInfo_t* clinfo = 0) const;
449 virtual DataMemberInfo_t *DataMemberInfo_Factory(DeclId_t declid, ClassInfo_t* clinfo) const;
450 virtual DataMemberInfo_t* DataMemberInfo_FactoryCopy(DataMemberInfo_t* dminfo) const;
451 virtual bool DataMemberInfo_IsValid(DataMemberInfo_t* dminfo) const;
452 virtual int DataMemberInfo_MaxIndex(DataMemberInfo_t* dminfo, Int_t dim) const;
453 virtual int DataMemberInfo_Next(DataMemberInfo_t* dminfo) const;
454 virtual Long_t DataMemberInfo_Offset(DataMemberInfo_t* dminfo) const;
455 virtual Long_t DataMemberInfo_Property(DataMemberInfo_t* dminfo) const;
456 virtual Long_t DataMemberInfo_TypeProperty(DataMemberInfo_t* dminfo) const;
457 virtual int DataMemberInfo_TypeSize(DataMemberInfo_t* dminfo) const;
458 virtual const char* DataMemberInfo_TypeName(DataMemberInfo_t* dminfo) const;
459 virtual const char* DataMemberInfo_TypeTrueName(DataMemberInfo_t* dminfo) const;
460 virtual const char* DataMemberInfo_Name(DataMemberInfo_t* dminfo) const;
461 virtual const char* DataMemberInfo_Title(DataMemberInfo_t* dminfo) const;
462 virtual const char* DataMemberInfo_ValidArrayIndex(DataMemberInfo_t* dminfo) const;
463 virtual void SetDeclAttr(DeclId_t, const char* /* attribute */);
464
465
466 // Function Template interface
467 virtual DeclId_t GetDeclId(FuncTempInfo_t *info) const;
468 virtual void FuncTempInfo_Delete(FuncTempInfo_t * /* ft_info */) const;
469 virtual FuncTempInfo_t *FuncTempInfo_Factory(DeclId_t declid) const;
470 virtual FuncTempInfo_t *FuncTempInfo_FactoryCopy(FuncTempInfo_t * /* ft_info */) const;
471 virtual Bool_t FuncTempInfo_IsValid(FuncTempInfo_t * /* ft_info */) const;
472 virtual UInt_t FuncTempInfo_TemplateNargs(FuncTempInfo_t * /* ft_info */) const;
473 virtual UInt_t FuncTempInfo_TemplateMinReqArgs(FuncTempInfo_t * /* ft_info */) const;
474 virtual Long_t FuncTempInfo_Property(FuncTempInfo_t * /* ft_info */) const;
475 virtual Long_t FuncTempInfo_ExtraProperty(FuncTempInfo_t * /* ft_info */) const;
476 virtual void FuncTempInfo_Name(FuncTempInfo_t * /* ft_info */, TString& name) const;
477 virtual void FuncTempInfo_Title(FuncTempInfo_t * /* ft_info */, TString& name) const;
478
479 // MethodInfo interface
480 virtual DeclId_t GetDeclId(MethodInfo_t *info) const;
481 virtual void MethodInfo_CreateSignature(MethodInfo_t* minfo, TString& signature) const;
482 virtual void MethodInfo_Delete(MethodInfo_t* minfo) const;
483 virtual MethodInfo_t* MethodInfo_Factory() const;
484 virtual MethodInfo_t* MethodInfo_Factory(ClassInfo_t *clinfo) const;
485 virtual MethodInfo_t *MethodInfo_Factory(DeclId_t declid) const;
486 virtual MethodInfo_t* MethodInfo_FactoryCopy(MethodInfo_t* minfo) const;
487 virtual void* MethodInfo_InterfaceMethod(MethodInfo_t* minfo) const;
488 virtual bool MethodInfo_IsValid(MethodInfo_t* minfo) const;
489 virtual int MethodInfo_NArg(MethodInfo_t* minfo) const;
490 virtual int MethodInfo_NDefaultArg(MethodInfo_t* minfo) const;
491 virtual int MethodInfo_Next(MethodInfo_t* minfo) const;
492 virtual Long_t MethodInfo_Property(MethodInfo_t* minfo) const;
493 virtual Long_t MethodInfo_ExtraProperty(MethodInfo_t* minfo) const;
494 virtual TypeInfo_t* MethodInfo_Type(MethodInfo_t* minfo) const;
495 virtual EReturnType MethodInfo_MethodCallReturnType(MethodInfo_t* minfo) const;
496 virtual const char* MethodInfo_GetMangledName(MethodInfo_t* minfo) const;
497 virtual const char* MethodInfo_GetPrototype(MethodInfo_t* minfo) const;
498 virtual const char* MethodInfo_Name(MethodInfo_t* minfo) const;
499 virtual const char* MethodInfo_TypeName(MethodInfo_t* minfo) const;
500 virtual std::string MethodInfo_TypeNormalizedName(MethodInfo_t* minfo) const;
501 virtual const char* MethodInfo_Title(MethodInfo_t* minfo) const;
502
503 // MethodArgInfo interface
504 virtual void MethodArgInfo_Delete(MethodArgInfo_t* marginfo) const;
505 virtual MethodArgInfo_t* MethodArgInfo_Factory() const;
506 virtual MethodArgInfo_t* MethodArgInfo_Factory(MethodInfo_t *minfo) const;
507 virtual MethodArgInfo_t* MethodArgInfo_FactoryCopy(MethodArgInfo_t* marginfo) const;
508 virtual bool MethodArgInfo_IsValid(MethodArgInfo_t* marginfo) const;
509 virtual int MethodArgInfo_Next(MethodArgInfo_t* marginfo) const;
510 virtual Long_t MethodArgInfo_Property(MethodArgInfo_t* marginfo) const;
511 virtual const char* MethodArgInfo_DefaultValue(MethodArgInfo_t* marginfo) const;
512 virtual const char* MethodArgInfo_Name(MethodArgInfo_t* marginfo) const;
513 virtual const char* MethodArgInfo_TypeName(MethodArgInfo_t* marginfo) const;
514 virtual std::string MethodArgInfo_TypeNormalizedName(MethodArgInfo_t *marginfo) const;
515
516 // TypeInfo interface
517 virtual void TypeInfo_Delete(TypeInfo_t* tinfo) const;
518 virtual TypeInfo_t* TypeInfo_Factory() const;
519 virtual TypeInfo_t *TypeInfo_Factory(const char* name) const;
520 virtual TypeInfo_t* TypeInfo_FactoryCopy(TypeInfo_t* /* tinfo */) const;
521 virtual void TypeInfo_Init(TypeInfo_t* tinfo, const char* funcname) const;
522 virtual bool TypeInfo_IsValid(TypeInfo_t* tinfo) const;
523 virtual const char* TypeInfo_Name(TypeInfo_t* /* info */) const;
524 virtual Long_t TypeInfo_Property(TypeInfo_t* tinfo) const;
525 virtual int TypeInfo_RefType(TypeInfo_t* /* tinfo */) const;
526 virtual int TypeInfo_Size(TypeInfo_t* tinfo) const;
527 virtual const char* TypeInfo_TrueName(TypeInfo_t* tinfo) const;
528
529 // TypedefInfo interface
530 virtual DeclId_t GetDeclId(TypedefInfo_t *info) const;
531 virtual void TypedefInfo_Delete(TypedefInfo_t* tinfo) const;
532 virtual TypedefInfo_t* TypedefInfo_Factory() const;
533 virtual TypedefInfo_t* TypedefInfo_Factory(const char* name) const;
534 virtual TypedefInfo_t* TypedefInfo_FactoryCopy(TypedefInfo_t* tinfo) const;
535 virtual void TypedefInfo_Init(TypedefInfo_t* tinfo, const char* name) const;
536 virtual bool TypedefInfo_IsValid(TypedefInfo_t* tinfo) const;
537 virtual int TypedefInfo_Next(TypedefInfo_t* tinfo) const;
538 virtual Long_t TypedefInfo_Property(TypedefInfo_t* tinfo) const;
539 virtual int TypedefInfo_Size(TypedefInfo_t* tinfo) const;
540 virtual const char* TypedefInfo_TrueName(TypedefInfo_t* tinfo) const;
541 virtual const char* TypedefInfo_Name(TypedefInfo_t* tinfo) const;
542 virtual const char* TypedefInfo_Title(TypedefInfo_t* tinfo) const;
543
544 std::set<TClass*>& GetModTClasses() { return fModTClasses; }
545
546 void HandleNewDecl(const void* DV, bool isDeserialized, std::set<TClass*>& modifiedClasses);
547 void UpdateListsOnCommitted(const cling::Transaction &T);
548 void UpdateListsOnUnloaded(const cling::Transaction &T);
549 void TransactionRollback(const cling::Transaction &T);
550 void LibraryLoaded(const void* dyLibHandle, const char* canonicalName);
551 void LibraryUnloaded(const void* dyLibHandle, const char* canonicalName);
552
553private: // Private Utility Functions and Classes
555 TCling *fTCling = nullptr;
557
558 public:
561 };
562
564 public:
565 TUniqueString() = delete;
566 TUniqueString(const TUniqueString &) = delete;
568 const char *Data();
569 bool Append(const std::string &str);
570 private:
571 std::string fContent;
572 std::set<size_t> fLinesHashSet;
573 std::hash<std::string> fHashFunc;
574 };
575
577 TCling(const TCling&); // NOT IMPLEMENTED
578 TCling& operator=(const TCling&); // NOT IMPLEMENTED
579
580 void Execute(TMethod*, TObjArray*, int* /*error*/ = 0)
581 {
582 }
583
585 void RegisterLoadedSharedLibrary(const char* name);
586 void AddFriendToClass(clang::FunctionDecl*, clang::CXXRecordDecl*) const;
587
588 bool LoadPCM(const std::string &pcmFileNameFullPath);
589 void InitRootmapFile(const char *name);
590 int ReadRootmapFile(const char *rootmapfile, TUniqueString* uniqueString = nullptr);
591 Bool_t HandleNewTransaction(const cling::Transaction &T);
592 void UnloadClassMembers(TClass* cl, const clang::DeclContext* DC);
593
594};
595
596#endif
#define b(i)
Definition: RSha256.hxx:100
#define e(i)
Definition: RSha256.hxx:103
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
const Bool_t kFALSE
Definition: RtypesCore.h:88
unsigned long ULong_t
Definition: RtypesCore.h:51
long Long_t
Definition: RtypesCore.h:50
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
long long Long64_t
Definition: RtypesCore.h:69
unsigned long long ULong64_t
Definition: RtypesCore.h:70
float Float_t
Definition: RtypesCore.h:53
const Bool_t kTRUE
Definition: RtypesCore.h:87
TClass *(* DictFuncPtr_t)()
Definition: Rtypes.h:78
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:565
void TCling__UpdateListsOnCommitted(const cling::Transaction &, cling::Interpreter *)
Definition: TCling.cxx:553
const clang::Decl * TCling__GetObjectDecl(TObject *obj)
Definition: TCling.cxx:588
void TCling__UpdateListsOnUnloaded(const cling::Transaction &)
Definition: TCling.cxx:559
TObject * TCling__GetObjectAddress(const char *Name, void *&LookupCtx)
Definition: TCling.cxx:584
EDataType
Definition: TDataType.h:28
char name[80]
Definition: TGX11.cxx:109
int type
Definition: TGX11.cxx:120
const char * proto
Definition: civetweb.c:16604
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:75
SuspendAutoloadingRAII(TCling *tcling)
Definition: TCling.h:559
TUniqueString(const TUniqueString &)=delete
const char * Data()
Definition: TCling.cxx:1017
bool Append(const std::string &str)
Append string to the storage if not added already.
Definition: TCling.cxx:1025
std::hash< std::string > fHashFunc
Definition: TCling.h:573
std::set< size_t > fLinesHashSet
Definition: TCling.h:572
std::string fContent
Definition: TCling.h:571
This class defines an interface to the cling C++ interpreter.
Definition: TCling.h:89
virtual const char * MethodArgInfo_DefaultValue(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:8708
virtual std::string CallFunc_GetWrapperCode(CallFunc_t *func) const
Definition: TCling.cxx:7570
virtual void FuncTempInfo_Name(FuncTempInfo_t *, TString &name) const
Return the name of this function template.
Definition: TCling.cxx:8379
virtual void FuncTempInfo_Title(FuncTempInfo_t *, TString &name) const
Return the comments associates with this function template.
Definition: TCling.cxx:8392
virtual int TypedefInfo_Next(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:8886
virtual bool DiagnoseIfInterpreterException(const std::exception &e) const
Definition: TCling.cxx:2175
virtual bool ClassInfo_IsValid(ClassInfo_t *info) const
Definition: TCling.cxx:7762
virtual bool ClassInfo_IsScopedEnum(ClassInfo_t *info) const
Definition: TCling.cxx:7736
Long_t Calc(const char *line, EErrorCode *error=0)
Directly execute an executable statement (e.g.
Definition: TCling.cxx:3193
Bool_t HasPCMForLibrary(const char *libname) const
Return true if ROOT has cxxmodules pcm for a given library name.
Definition: TCling.cxx:2841
virtual MethodInfo_t * MethodInfo_FactoryCopy(MethodInfo_t *minfo) const
Definition: TCling.cxx:8465
bool LoadPCM(const std::string &pcmFileNameFullPath)
Tries to load a PCM; returns true on success.
Definition: TCling.cxx:1509
virtual const char * TypeInfo_Name(TypeInfo_t *) const
Definition: TCling.cxx:8792
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:4559
bool LibraryLoadingFailed(const std::string &, const std::string &, bool, bool)
Definition: TCling.cxx:6013
void ForgetMutexState()
Definition: TCling.cxx:8949
virtual bool ClassInfo_HasMethod(ClassInfo_t *info, const char *name) const
Definition: TCling.cxx:7695
std::vector< void * > fRegisterModuleDyLibs
Definition: TCling.h:126
virtual MethodInfo_t * CallFunc_FactoryMethod(CallFunc_t *func) const
Definition: TCling.cxx:7382
virtual bool MethodInfo_IsValid(MethodInfo_t *minfo) const
Definition: TCling.cxx:8480
Bool_t fLockProcessLine
Definition: TCling.h:114
virtual const char * DataMemberInfo_TypeTrueName(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8124
void CreateListOfDataMembers(TClass *cl) const
Create list of pointers to data members for TClass cl.
Definition: TCling.cxx:4025
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:2126
void HandleNewDecl(const void *DV, bool isDeserialized, std::set< TClass * > &modifiedClasses)
Definition: TCling.cxx:485
virtual const char * MethodInfo_TypeName(MethodInfo_t *minfo) const
Definition: TCling.cxx:8562
virtual Long_t TypedefInfo_Property(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:8894
virtual void MethodArgInfo_Delete(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:8653
Bool_t IsAutoLoadNamespaceCandidate(const char *name)
Definition: TCling.cxx:6328
virtual void LoadFunctionTemplates(TClass *cl) const
Create list of pointers to function templates for TClass cl.
Definition: TCling.cxx:3978
virtual CallFunc_t * CallFunc_Factory() const
Definition: TCling.cxx:7367
virtual TypedefInfo_t * TypedefInfo_FactoryCopy(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:8861
std::vector< const char * > fCurExecutingMacros
Definition: TCling.h:137
void UpdateListsOnCommitted(const cling::Transaction &T)
Definition: TCling.cxx:6473
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:7043
virtual Long_t ClassInfo_Tagnum(ClassInfo_t *info) const
Definition: TCling.cxx:7842
void UpdateListOfTypes()
No op: see TClingCallbacks (used to update the list of types)
Definition: TCling.cxx:3497
virtual DeclId_t GetDataMemberAtAddr(const void *addr) const
Return pointer to cling DeclId for a data member with a given name.
Definition: TCling.cxx:4480
virtual int DataMemberInfo_ArrayDim(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8018
virtual bool ClassInfo_IsBase(ClassInfo_t *info, const char *name) const
Definition: TCling.cxx:7721
virtual int BaseClassInfo_Next(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:7926
virtual void GenericError(const char *error) const
Let the interpreter issue a generic error, and set its error state.
Definition: TCling.cxx:6956
virtual std::string MethodArgInfo_TypeNormalizedName(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:8732
virtual const char * ClassInfo_TmpltName(ClassInfo_t *info) const
Definition: TCling.cxx:7884
virtual TEnum * CreateEnum(void *VD, TClass *cl) const
Definition: TCling.cxx:458
virtual EReturnType MethodCallReturnType(TFunction *func) const
Definition: TCling.cxx:8589
virtual int UnloadFile(const char *path) const
Definition: TCling.cxx:7108
virtual int Evaluate(const char *, TInterpreterValue &)
Get the interpreter value corresponding to the statement.
Definition: TCling.cxx:7136
TObject * GetObjectAddress(const char *Name, void *&LookupCtx)
If the interpreter encounters Name, check whether that is an object ROOT could retrieve.
Definition: TCling.cxx:7172
virtual Long_t TypeInfo_Property(TypeInfo_t *tinfo) const
Definition: TCling.cxx:8800
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:4678
void EndOfLineAction()
It calls a "fantom" method to synchronize user keyboard input and ROOT prompt line.
Definition: TCling.cxx:2815
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....
Definition: TCling.cxx:4656
void UpdateListOfLoadedSharedLibraries()
Definition: TCling.cxx:2961
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:1735
virtual const char * DataMemberInfo_ValidArrayIndex(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8148
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:5179
void CreateListOfMethodArgs(TFunction *m) const
Create list of pointers to method arguments for TMethod m.
Definition: TCling.cxx:4059
virtual void TypedefInfo_Init(TypedefInfo_t *tinfo, const char *name) const
Definition: TCling.cxx:8868
virtual Long_t MethodInfo_ExtraProperty(MethodInfo_t *minfo) const
Definition: TCling.cxx:8520
virtual ~TCling()
Destroy the interpreter interface.
Definition: TCling.cxx:1391
void AddFriendToClass(clang::FunctionDecl *, clang::CXXRecordDecl *) const
Inject function as a friend into klass.
Definition: TCling.cxx:7225
std::vector< MutexStateAndRecurseCount > fInitialMutex
Definition: TCling.h:155
Bool_t fCxxModulesEnabled
Definition: TCling.h:116
void RefreshClassInfo(TClass *cl, const clang::NamedDecl *def, bool alias)
Internal function. Actually do the update of the ClassInfo when seeing.
Definition: TCling.cxx:6346
void ExecuteWithArgsAndReturn(TMethod *method, void *address, const void *args[]=0, int nargs=0, void *ret=0) const
Definition: TCling.cxx:4908
virtual void FuncTempInfo_Delete(FuncTempInfo_t *) const
Delete the FuncTempInfo_t.
Definition: TCling.cxx:8228
Bool_t SetSuspendAutoParsing(Bool_t value)
Suspend the Autoparsing of headers.
Definition: TCling.cxx:7078
virtual DataMemberInfo_t * DataMemberInfo_FactoryCopy(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8052
virtual CallFuncIFacePtr_t CallFunc_IFacePtr(CallFunc_t *func) const
Definition: TCling.cxx:7416
virtual void CallFunc_ExecWithReturn(CallFunc_t *func, void *address, void *ret) const
Definition: TCling.cxx:7324
virtual MethodArgInfo_t * MethodArgInfo_Factory() const
Definition: TCling.cxx:8660
virtual void DataMemberInfo_Delete(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8026
Int_t fExitCode
Definition: TCling.h:97
void ApplyToInterpreterMutex(void *delta)
Re-apply the lock count delta that TCling__ResetInterpreterMutex() caused.
Definition: TCling.cxx:8965
void * LazyFunctionCreatorAutoload(const std::string &mangled_name)
Autoload a library based on a missing symbol.
Definition: TCling.cxx:6234
virtual int LoadFile(const char *path) const
Load a source file or library called path into the interpreter.
Definition: TCling.cxx:6999
void CodeComplete(const std::string &, size_t &, std::vector< std::string > &)
The call to Cling's tab complition.
Definition: TCling.cxx:7128
virtual int SetClassAutoloading(int) const
Enable/Disable the Autoloading of libraries.
Definition: TCling.cxx:7052
virtual Long_t FuncTempInfo_Property(FuncTempInfo_t *) const
Return the property of the function template.
Definition: TCling.cxx:8292
virtual TypeInfo_t * MethodInfo_Type(MethodInfo_t *minfo) const
Definition: TCling.cxx:8528
virtual const char * MethodArgInfo_TypeName(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:8724
Bool_t HandleNewTransaction(const cling::Transaction &T)
Helper function to increase the internal Cling count of transactions that change the AST.
Definition: TCling.cxx:3263
virtual bool DataMemberInfo_IsValid(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8060
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:5063
Bool_t IsLoaded(const char *filename) const
Return true if the file has already been loaded by cint.
Definition: TCling.cxx:2860
const char * GetSharedLibs()
Return the list of shared libraries loaded into the process.
Definition: TCling.cxx:6761
virtual const char * GetTopLevelMacroName() const
Return the file name of the current un-included interpreted file.
Definition: TCling.cxx:4939
std::map< SpecialObjectLookupCtx_t, SpecialObjectMap_t > fSpecialObjectMaps
Definition: TCling.h:141
virtual DeclId_t GetDataMemberWithValue(const void *ptrvalue) const
NOT IMPLEMENTED.
Definition: TCling.cxx:4471
virtual bool MethodArgInfo_IsValid(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:8684
Int_t ReloadAllSharedLibraryMaps()
Reload the library map entries coming from all the loaded shared libraries, after first unloading the...
Definition: TCling.cxx:5459
virtual void SetErrmsgcallback(void *p) const
Set a callback to receive error messages.
Definition: TCling.cxx:7088
virtual std::string ToString(const char *type, void *obj)
Definition: TCling.cxx:1034
virtual const char * MethodInfo_Title(MethodInfo_t *minfo) const
Definition: TCling.cxx:8581
virtual Long_t ClassInfo_GetBaseOffset(ClassInfo_t *fromDerived, ClassInfo_t *toBase, void *address, bool isDerivedObject) const
Definition: TCling.cxx:7950
virtual int DataMemberInfo_TypeSize(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8108
virtual ClassInfo_t * ClassInfo_Factory(Bool_t all=kTRUE) const
Definition: TCling.cxx:7649
virtual const char * MethodInfo_GetMangledName(MethodInfo_t *minfo) const
Definition: TCling.cxx:8536
virtual bool CallFunc_IsValid(CallFunc_t *func) const
Definition: TCling.cxx:7407
virtual const char * BaseClassInfo_TmpltName(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:8005
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:7033
virtual void MethodInfo_CreateSignature(MethodInfo_t *minfo, TString &signature) const
Definition: TCling.cxx:8431
void SnapshotMutexState(ROOT::TVirtualRWMutex *mtx)
Definition: TCling.cxx:8934
virtual Bool_t ClassInfo_Contains(ClassInfo_t *info, DeclId_t declid) const
Return true if the entity pointed to by 'declid' is declared in the context described by 'info'.
Definition: TCling.cxx:7589
std::set< size_t > fPayloads
Definition: TCling.h:109
virtual const char * ClassInfo_Name(ClassInfo_t *info) const
Definition: TCling.cxx:7868
Int_t UnloadLibraryMap(const char *library)
Unload library map entries coming from the specified library.
Definition: TCling.cxx:5538
virtual ClassInfo_t * BaseClassInfo_ClassInfo(BaseClassInfo_t *) const
Definition: TCling.cxx:7971
TObjArray * fRootmapFiles
Definition: TCling.h:113
virtual void CallFunc_Delete(CallFunc_t *func) const
Definition: TCling.cxx:7301
virtual Long_t ClassInfo_ClassProperty(ClassInfo_t *info) const
Definition: TCling.cxx:7610
virtual bool ClassInfo_IsLoaded(ClassInfo_t *info) const
Definition: TCling.cxx:7754
std::vector< std::pair< TClass *, DictFuncPtr_t > > fClassesToUpdate
Definition: TCling.h:134
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:7679
Int_t DeleteGlobal(void *obj)
Delete obj from Cling symbol table so it cannot be accessed anymore.
Definition: TCling.cxx:3381
virtual const char * GetCurrentMacroName() const
Return the file name of the currently interpreted file, included or not.
Definition: TCling.cxx:4986
const ROOT::TMetaUtils::TNormalizedCtxt & GetNormalizedContext() const
Definition: TCling.h:344
virtual void TypeInfo_Delete(TypeInfo_t *tinfo) const
Definition: TCling.cxx:8745
virtual Bool_t LoadText(const char *text) const
Load the declarations from text into the interpreter.
Definition: TCling.cxx:7012
std::set< TClass * > fModTClasses
Definition: TCling.h:133
void GetInterpreterTypeName(const char *name, std::string &output, Bool_t full=kFALSE)
The 'name' is known to the interpreter, this function returns the internal version of this name (usua...
Definition: TCling.cxx:4723
void * RewindInterpreterMutex()
Reset the interpreter lock to the state it had before interpreter-related calls happened.
Definition: TCling.cxx:8982
virtual Long_t BaseClassInfo_Offset(BaseClassInfo_t *toBaseClassInfo, void *address, bool isDerivedObject) const
Definition: TCling.cxx:7942
TCling(const char *name, const char *title)
Definition: TCling.h:174
virtual int GetSecurityError() const
Interface to cling function.
Definition: TCling.cxx:6986
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:8282
void ResetGlobals()
Reset in Cling the list of global variables to the state saved by the last call to TCling::SaveGlobal...
Definition: TCling.cxx:3338
virtual const char * ClassInfo_Title(ClassInfo_t *info) const
Definition: TCling.cxx:7876
virtual Long_t BaseClassInfo_Property(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:7963
virtual FuncTempInfo_t * FuncTempInfo_Factory(DeclId_t declid) const
Construct a FuncTempInfo_t.
Definition: TCling.cxx:8237
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:4537
virtual void ClassInfo_Destruct(ClassInfo_t *info, void *arena) const
Definition: TCling.cxx:7641
virtual const char * BaseClassInfo_FullName(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:7987
virtual bool ClassInfo_IsEnum(const char *name) const
Definition: TCling.cxx:7729
Long_t ProcessLine(const char *line, EErrorCode *error=0)
Definition: TCling.cxx:2186
virtual void GetFunctionName(const clang::FunctionDecl *decl, std::string &name) const
Definition: TCling.cxx:8196
virtual void TypedefInfo_Delete(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:8838
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:3246
void UnloadClassMembers(TClass *cl, const clang::DeclContext *DC)
Helper function to go through the members of a class or namespace and unload them.
Definition: TCling.cxx:6558
Int_t fGlobalsListSerial
Definition: TCling.h:102
void RewindDictionary()
Rewind Cling dictionary to the point where it was before executing the current macro.
Definition: TCling.cxx:3367
TString fSharedLibs
Definition: TCling.h:101
virtual const char * MapCppName(const char *) const
Interface to cling function.
Definition: TCling.cxx:7020
static void UpdateClassInfoWork(const char *name)
Definition: TCling.cxx:6453
virtual Long_t FuncTempInfo_ExtraProperty(FuncTempInfo_t *) const
Return the property not already defined in Property See TDictionary's EFunctionProperty.
Definition: TCling.cxx:8352
void PrintIntro()
No-op; see TRint instead.
Definition: TCling.cxx:2350
virtual CallFunc_t * CallFunc_FactoryCopy(CallFunc_t *func) const
Definition: TCling.cxx:7375
virtual const char * DataMemberInfo_Name(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8132
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:2778
Int_t DeleteVariable(const char *name)
Undeclare obj called name.
Definition: TCling.cxx:3396
virtual int ClassInfo_Next(ClassInfo_t *info) const
Definition: TCling.cxx:7786
static void * fgSetOfSpecials
Definition: TCling.h:92
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:2359
void Execute(TMethod *, TObjArray *, int *=0)
Execute method on this object with parameters stored in the TObjArray.
Definition: TCling.h:580
virtual void CallFunc_SetArgArray(CallFunc_t *func, Long_t *paramArr, Int_t nparam) const
Definition: TCling.cxx:7480
virtual const char * MethodInfo_Name(MethodInfo_t *minfo) const
Definition: TCling.cxx:8554
void ClearFileBusy()
Reset the interpreter internal state in case a previous action was not correctly terminated.
Definition: TCling.cxx:2757
virtual const char * MethodArgInfo_Name(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:8716
virtual Long_t ClassInfo_Property(ClassInfo_t *info) const
Definition: TCling.cxx:7826
Int_t fMore
Definition: TCling.h:96
ROOT::TMetaUtils::TNormalizedCtxt * fNormalizedCtxt
Definition: TCling.h:122
virtual int MethodInfo_Next(MethodInfo_t *minfo) const
Definition: TCling.cxx:8504
const char * TypeName(const char *typeDesc)
Return the absolute type of typeDesc.
Definition: TCling.cxx:5001
Int_t GetMore() const
Definition: TCling.h:196
bool fIsShuttingDown
Definition: TCling.h:165
unsigned long long GetInterpreterStateMarker() const
Definition: TCling.h:207
void SaveContext()
Save the current Cling state.
Definition: TCling.cxx:3457
std::set< TClass * > & GetModTClasses()
Definition: TCling.h:544
virtual bool TypeInfo_IsValid(TypeInfo_t *tinfo) const
Definition: TCling.cxx:8784
Int_t AutoLoad(const char *classname, Bool_t knowDictNotLoaded=kFALSE)
Load library containing the specified class.
Definition: TCling.cxx:5680
TClingCallbacks * fClingCallbacks
Definition: TCling.h:127
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....
Definition: TCling.cxx:4519
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:2117
virtual Long_t DataMemberInfo_Property(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8092
void UpdateListOfGlobalFunctions()
No op: see TClingCallbacks (used to update the list of global functions)
Definition: TCling.cxx:3490
Bool_t IsAutoParsingSuspended() const
Definition: TCling.h:333
virtual const char * MethodInfo_GetPrototype(MethodInfo_t *minfo) const
Definition: TCling.cxx:8546
TString fIncludePath
Definition: TCling.h:103
virtual bool ClassInfo_IsValidMethod(ClassInfo_t *info, const char *method, const char *proto, Long_t *offset, ROOT::EFunctionMatchMode=ROOT::kConversionMatch) const
Definition: TCling.cxx:7770
virtual void * ClassInfo_New(ClassInfo_t *info) const
Definition: TCling.cxx:7794
virtual void TypeInfo_Init(TypeInfo_t *tinfo, const char *funcname) const
Definition: TCling.cxx:8775
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:6856
virtual const char * DataMemberInfo_Title(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8140
void TransactionRollback(const cling::Transaction &T)
Definition: TCling.cxx:6724
virtual EDataType ClassInfo_GetUnderlyingType(ClassInfo_t *info) const
Definition: TCling.cxx:7745
virtual void CallFunc_Init(CallFunc_t *func) const
Definition: TCling.cxx:7398
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:8271
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:4492
virtual void SetTempLevel(int val) const
Create / close a scope for temporaries.
Definition: TCling.cxx:7102
void SetProcessLineLock(Bool_t lock=kTRUE)
Definition: TCling.h:300
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:4302
void RegisterTemporary(const TInterpreterValue &value)
Definition: TCling.cxx:7145
virtual void LoadEnums(TListOfEnums &cl) const
Create list of pointers to enums for TClass cl.
Definition: TCling.cxx:3931
virtual void CallFunc_SetArg(CallFunc_t *func, Long_t param) const
Definition: TCling.cxx:7432
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:6978
static constexpr const char * kNullArgv[]
Definition: TCling.h:163
virtual void * MethodInfo_InterfaceMethod(MethodInfo_t *minfo) const
Definition: TCling.cxx:8472
Int_t UnloadAllSharedLibraryMaps()
Unload the library map entries coming from all the loaded shared libraries.
Definition: TCling.cxx:5520
virtual void CallFunc_IgnoreExtraArgs(CallFunc_t *func, bool ignore) const
Definition: TCling.cxx:7390
void * SetAutoLoadCallBack(void *cb)
Definition: TCling.h:180
std::vector< cling::Value > * fTemporaries
Definition: TCling.h:121
virtual Long_t MethodInfo_Property(MethodInfo_t *minfo) const
Definition: TCling.cxx:8512
virtual std::unique_ptr< TInterpreterValue > MakeInterpreterValue() const
Definition: TCling.cxx:7121
virtual Long_t DataMemberInfo_Offset(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8084
void LibraryLoaded(const void *dyLibHandle, const char *canonicalName)
Definition: TCling.cxx:6747
virtual TypedefInfo_t * TypedefInfo_Factory() const
Definition: TCling.cxx:8845
void UpdateListOfGlobals()
No op: see TClingCallbacks (used to update the list of globals)
Definition: TCling.cxx:3483
void ClearStack()
Delete existing temporary values.
Definition: TCling.cxx:2765
void * SpecialObjectLookupCtx_t
Definition: TCling.h:139
std::map< const cling::Transaction *, size_t > fTransactionHeadersMap
Definition: TCling.h:107
virtual int SetClassAutoparsing(int)
Enable/Disable the Autoparsing of headers.
Definition: TCling.cxx:7067
Bool_t fHeaderParsingOnDemand
Definition: TCling.h:159
Int_t RescanLibraryMap()
Scan again along the dynamic path for library maps.
Definition: TCling.cxx:5447
cling::Interpreter * fInterpreter
Definition: TCling.h:118
virtual int DataMemberInfo_Next(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8076
void Reset()
Pressing Ctrl+C should forward here.
Definition: TCling.cxx:3306
Int_t Load(const char *filenam, Bool_t system=kFALSE)
Load a library file in cling's memory.
Definition: TCling.cxx:3120
void InspectMembers(TMemberInspector &, const void *obj, const TClass *cl, Bool_t isTransient)
Visit all members over members, recursing over base classes.
Definition: TCling.cxx:2373
std::hash< std::string > fStringHashFunction
Definition: TCling.h:111
TEnv * fMapfile
Definition: TCling.h:105
const char * GetIncludePath()
Refresh the list of include paths known to the interpreter and return it with -I prepended.
Definition: TCling.cxx:6870
virtual void ClassInfo_DeleteArray(ClassInfo_t *info, void *arena, bool dtorOnly) const
Definition: TCling.cxx:7633
Long_t ExecuteMacro(const char *filename, EErrorCode *error=0)
Execute a cling macro.
Definition: TCling.cxx:4926
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:4362
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:4578
virtual void CallFunc_Exec(CallFunc_t *func, void *address) const
Definition: TCling.cxx:7308
std::unordered_map< std::string, TObject * > SpecialObjectMap_t
Definition: TCling.h:140
const char * GetSharedLibDeps(const char *lib)
Get the list a libraries on which the specified lib depends.
Definition: TCling.cxx:6815
virtual int DisplayIncludePath(FILE *fout) const
Interface to cling function.
Definition: TCling.cxx:6919
void RegisterLoadedSharedLibrary(const char *name)
Register a new shared library name with the interpreter; add it to fSharedLibs.
Definition: TCling.cxx:3042
virtual void UpdateEnumConstants(TEnum *enumObj, TClass *cl) const
Definition: TCling.cxx:410
void SaveGlobalsContext()
Save the current Cling state of global objects.
Definition: TCling.cxx:3470
std::unordered_set< const clang::NamespaceDecl * > fNSFromRootmaps
Definition: TCling.h:112
virtual Long_t MethodArgInfo_Property(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:8700
virtual const char * GetSTLIncludePath() const
Return the directory containing CINT's stl cintdlls.
Definition: TCling.cxx:6901
TString fRootmapLoadPath
Definition: TCling.h:104
Int_t LoadLibraryMap(const char *rootmapfile=0)
Load map between class and library.
Definition: TCling.cxx:5245
virtual std::string MethodInfo_TypeNormalizedName(MethodInfo_t *minfo) const
Definition: TCling.cxx:8570
void Execute(const char *function, const char *params, int *error=0)
Execute a global function with arguments params.
Definition: TCling.cxx:4756
virtual const char * ClassInfo_FullName(ClassInfo_t *info) const
Definition: TCling.cxx:7858
TClass * GenerateTClass(const char *classname, Bool_t emulation, Bool_t silent=kFALSE)
Generate a TClass for the given class.
Definition: TCling.cxx:4082
virtual int TypeInfo_Size(TypeInfo_t *tinfo) const
Definition: TCling.cxx:8816
virtual int MethodArgInfo_Next(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:8692
ROOT::TMetaUtils::TClingLookupHelper * fLookupHelper
Definition: TCling.h:123
virtual bool ClassInfo_HasDefaultConstructor(ClassInfo_t *info) const
Definition: TCling.cxx:7687
virtual const char * TypedefInfo_TrueName(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:8910
Bool_t fIsAutoParsingSuspended
Definition: TCling.h:160
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:5634
DeclId_t GetDeclId(const llvm::GlobalValue *gv) const
Return pointer to cling DeclId for a global value.
Definition: TCling.cxx:4402
Long_t ProcessLineAsynch(const char *line, EErrorCode *error=0)
Let cling process a command line asynch.
Definition: TCling.cxx:3168
virtual std::vector< std::string > GetUsingNamespaces(ClassInfo_t *cl) const
Get the scopes representing using declarations of namespace.
Definition: TCling.cxx:4014
TCling & operator=(const TCling &)
Int_t SetClassSharedLibs(const char *cls, const char *libs)
Register the autoloading information for a class.
Definition: TCling.cxx:5600
virtual void ClassInfo_Init(ClassInfo_t *info, const char *funcname) const
Definition: TCling.cxx:7703
virtual TypeInfo_t * TypeInfo_FactoryCopy(TypeInfo_t *) const
Definition: TCling.cxx:8768
Bool_t CheckClassTemplate(const char *name)
Return true if there is a class template by the given name ...
Definition: TCling.cxx:3887
TObjArray * GetRootMapFiles() const
Definition: TCling.h:206
char fPrompt[64]
Definition: TCling.h:98
void * fPrevLoadedDynLibInfo
Definition: TCling.h:125
void UpdateListOfDataMembers(TClass *cl) const
Update the list of pointers to data members for TClass cl This is now a nop.
Definition: TCling.cxx:4052
virtual void SetDeclAttr(DeclId_t, const char *)
Definition: TCling.cxx:8159
virtual Long_t DataMemberInfo_TypeProperty(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8100
virtual void ShutDown()
Definition: TCling.cxx:1422
virtual const char * DataMemberInfo_TypeName(DataMemberInfo_t *dminfo) const
Definition: TCling.cxx:8116
virtual void CallFunc_SetArgs(CallFunc_t *func, const char *param) const
Definition: TCling.cxx:7488
Bool_t fAllowLibLoad
Definition: TCling.h:115
virtual const char * BaseClassInfo_Name(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:7997
virtual void MethodInfo_Delete(MethodInfo_t *minfo) const
Interface to cling function.
Definition: TCling.cxx:8424
virtual const char * TypeInfo_TrueName(TypeInfo_t *tinfo) const
Definition: TCling.cxx:8824
std::set< const char * > fParsedPayloadsAddresses
Definition: TCling.h:110
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:3735
void EnableAutoLoading()
Enable the automatic loading of shared libraries when a class is used that is stored in a not yet loa...
Definition: TCling.cxx:2803
static void UpdateClassInfo(char *name, Long_t tagnum)
No op: see TClingCallbacks.
Definition: TCling.cxx:6447
virtual void BaseClassInfo_Delete(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:7899
void ResetGlobalVar(void *obj)
Reset the Cling 'user' global objects/variables state to the state saved by the last call to TCling::...
Definition: TCling.cxx:3352
Bool_t IsLibraryLoaded(const char *libname) const
Definition: TCling.cxx:2832
TEnv * GetMapfile() const
Definition: TCling.h:195
virtual void Initialize()
Initialize the interpreter, once TROOT::fInterpreter is set.
Definition: TCling.cxx:1417
virtual void * FindSym(const char *entry) const
Interface to cling function.
Definition: TCling.cxx:6948
virtual Long_t CallFunc_ExecInt(CallFunc_t *func, void *address) const
Definition: TCling.cxx:7343
virtual int DataMemberInfo_MaxIndex(DataMemberInfo_t *dminfo, Int_t dim) const
Definition: TCling.cxx:8068
void SetClassInfo(TClass *cl, Bool_t reload=kFALSE)
Set pointer to the TClingClassInfo in TClass.
Definition: TCling.cxx:3611
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:3177
virtual int TypeInfo_RefType(TypeInfo_t *) const
Definition: TCling.cxx:8808
void LoadMacro(const char *filename, EErrorCode *error=0)
Load a macro file in cling's memory.
Definition: TCling.cxx:3160
cling::Interpreter * GetInterpreterImpl()
Definition: TCling.h:176
std::set< size_t > fLookedUpClasses
Definition: TCling.h:108
TCling(const TCling &)
virtual void CallFunc_ResetArg(CallFunc_t *func) const
Definition: TCling.cxx:7424
virtual Long64_t CallFunc_ExecInt64(CallFunc_t *func, void *address) const
Definition: TCling.cxx:7351
virtual Long_t BaseClassInfo_Tagnum(BaseClassInfo_t *bcinfo) const
Definition: TCling.cxx:7979
void ResetAll()
Reset the Cling state to its initial state.
Definition: TCling.cxx:3322
virtual void ClassInfo_Delete(ClassInfo_t *info) const
Definition: TCling.cxx:7618
virtual DataMemberInfo_t * DataMemberInfo_Factory(ClassInfo_t *clinfo=0) const
Definition: TCling.cxx:8033
virtual Double_t CallFunc_ExecDouble(CallFunc_t *func, void *address) const
Definition: TCling.cxx:7359
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:5814
virtual const char * TypedefInfo_Title(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:8926
void CreateListOfBaseClasses(TClass *cl) const
Create list of pointers to base class(es) for TClass cl.
Definition: TCling.cxx:3907
void RecursiveRemove(TObject *obj)
Delete object from cling symbol table so it can not be used anymore.
Definition: TCling.cxx:3281
virtual MethodArgInfo_t * MethodArgInfo_FactoryCopy(MethodArgInfo_t *marginfo) const
Definition: TCling.cxx:8676
void UpdateListsOnUnloaded(const cling::Transaction &T)
Definition: TCling.cxx:6611
void UpdateClassInfoWithDecl(const clang::NamedDecl *ND)
Internal function. Inform a TClass about its new TagDecl or NamespaceDecl.
Definition: TCling.cxx:6389
virtual const char * ClassInfo_FileName(ClassInfo_t *info) const
Definition: TCling.cxx:7850
virtual void CallFunc_ExecWithArgsAndReturn(CallFunc_t *func, void *address, const void *args[]=0, int nargs=0, void *ret=0) const
Definition: TCling.cxx:7332
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:4700
virtual int MethodInfo_NArg(MethodInfo_t *minfo) const
Definition: TCling.cxx:8488
char * GetPrompt()
Definition: TCling.h:200
virtual FuncTempInfo_t * FuncTempInfo_FactoryCopy(FuncTempInfo_t *) const
Construct a FuncTempInfo_t.
Definition: TCling.cxx:8248
void * fAutoLoadCallBack
Definition: TCling.h:135
virtual int TypedefInfo_Size(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:8902
virtual const char * TypedefInfo_Name(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:8918
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:7523
virtual int DisplayClass(FILE *fout, const char *name, int base, int start) const
Definition: TCling.cxx:6910
const char * GetClassSharedLibs(const char *cls)
Get the list of shared libraries containing the code for class cls.
Definition: TCling.cxx:6773
void * GetAutoLoadCallBack() const
Definition: TCling.h:179
Bool_t IsErrorMessagesEnabled() const
If error messages are disabled, the interpreter should suppress its failures and warning messages fro...
Definition: TCling.cxx:6842
ULong64_t fTransactionCount
Definition: TCling.h:136
virtual Bool_t FuncTempInfo_IsValid(FuncTempInfo_t *) const
Check validity of a FuncTempInfo_t.
Definition: TCling.cxx:8259
virtual BaseClassInfo_t * BaseClassInfo_Factory(ClassInfo_t *info) const
Definition: TCling.cxx:7906
virtual bool TypedefInfo_IsValid(TypedefInfo_t *tinfo) const
Definition: TCling.cxx:8878
virtual MethodInfo_t * MethodInfo_Factory() const
Definition: TCling.cxx:8439
Int_t GetExitCode() const
Definition: TCling.h:194
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:5956
virtual EReturnType MethodInfo_MethodCallReturnType(MethodInfo_t *minfo) const
Definition: TCling.cxx:8600
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:4633
virtual TypeInfo_t * TypeInfo_Factory() const
Definition: TCling.cxx:8752
std::map< size_t, std::vector< const char * > > fClassesHeadersMap
Definition: TCling.h:106
virtual int MethodInfo_NDefaultArg(MethodInfo_t *minfo) const
Definition: TCling.cxx:8496
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:4254
virtual void CallFunc_SetFunc(CallFunc_t *func, ClassInfo_t *info, const char *method, const char *params, Long_t *Offset) const
Definition: TCling.cxx:7496
void CreateListOfMethods(TClass *cl) const
Create list of pointers to methods for TClass cl.
Definition: TCling.cxx:4034
void UpdateListOfMethods(TClass *cl) const
Update the list of pointers to method for TClass cl This is now a nop.
Definition: TCling.cxx:4043
cling::MetaProcessor * fMetaProcessor
Definition: TCling.h:119
virtual int ClassInfo_Size(ClassInfo_t *info) const
Definition: TCling.cxx:7834
static void UpdateAllCanvases()
Update all canvases at end the terminal input command.
Definition: TCling.cxx:6462
Bool_t IsProcessLineLocked() const
Definition: TCling.h:297
void LibraryUnloaded(const void *dyLibHandle, const char *canonicalName)
Definition: TCling.cxx:6753
The TEnum class implements the enum type.
Definition: TEnum.h:33
The TEnv class reads config files, by default named .rootrc.
Definition: TEnv.h:125
Global functions class (global functions are obtained from CINT).
Definition: TFunction.h:28
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.
Definition: TInterpreter.h:60
std::vector< std::pair< std::string, int > > FwdDeclArgsToKeepCollection_t
Definition: TInterpreter.h:133
TDictionary::DeclId_t DeclId_t
Definition: TInterpreter.h:281
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
Definition: TListOfEnums.h:33
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:37
Mother of all ROOT objects.
Definition: TObject.h:37
Basic string class.
Definition: TString.h:131
TText * text
TLine * line
Type
enumeration specifying the integration types.
const Int_t n
Definition: legend1.C:16
double T(double x)
Definition: ChebyshevPol.h:34
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Definition: RExports.h:151
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
EFunctionMatchMode
Definition: TDictionary.h:152
@ kConversionMatch
Definition: TDictionary.h:154
RooCmdArg Offset(Bool_t flag=kTRUE)
Definition: TString.h:845
const char * Name
Definition: TXMLSetup.cxx:66
const char * Value
Definition: TXMLSetup.cxx:72
bool operator()(const char *a, const char *b) const
Definition: TCling.h:129
std::unique_ptr< ROOT::TVirtualRWMutex::State > fState
State of gCoreMutex when the first interpreter-related function was invoked.
Definition: TCling.h:145
Int_t fRecurseCount
Interpreter-related functions will push the "entry" lock state to *this.
Definition: TCling.h:150
auto * m
Definition: textangle.C:8
auto * a
Definition: textangle.C:12
static void output(int code)
Definition: gifencode.c:226