Logo ROOT   6.18/05
Reference Guide
TInterpreter.h
Go to the documentation of this file.
1// @(#)root/meta:$Id$
2// Author: Fons Rademakers 01/03/96
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, 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_TInterpreter
14#define ROOT_TInterpreter
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TInterpreter //
19// //
20// This class defines an abstract interface to a generic command line //
21// interpreter. //
22// //
23//////////////////////////////////////////////////////////////////////////
24
25#include "TDataType.h"
26#include "TDictionary.h"
27#include "TInterpreterValue.h"
28#include "TVirtualRWMutex.h"
29
30#include <map>
31#include <typeinfo>
32#include <vector>
33
34class TClass;
35class TEnv;
36class TFunction;
37class TMethod;
38class TObjArray;
39class TEnum;
40class TListOfEnums;
41
43
44#if defined (_REENTRANT) || defined (WIN32)
45# define R__LOCKGUARD_CLING(mutex) ::ROOT::Internal::InterpreterMutexRegistrationRAII _R__UNIQUE_(R__guard)(mutex); { }
46#else
47# define R__LOCKGUARD_CLING(mutex) (void)(mutex); { }
48#endif
49
50namespace ROOT {
51namespace Internal {
56};
57}
58}
59
60class TInterpreter : public TNamed {
61
62protected:
63 virtual void Execute(TMethod *method, TObjArray *params, int *error = 0) = 0;
65
66 friend class SuspendAutoParsing;
67
68public:
69 // See as in TSchemaType.h.
70 typedef class std::map<std::string, std::string> MembersMap_t;
71
76 kFatal = 3,
77 kProcessing = 99
78 };
79
80 enum class EReturnType { kLong, kDouble, kString, kOther, kNoReturnType };
81
83 enum EKind {
87 kDtor
88 };
89
90 typedef void (*Generic_t)(void*, int, void**, void*);
91 typedef void (*Ctor_t)(void**, void*, unsigned long);
92 typedef void (*Dtor_t)(void*, unsigned long, int);
93
97 fKind(kGeneric), fGeneric(func) {}
99 fKind(kCtor), fCtor(func) {}
101 fKind(kDtor), fDtor(func) {}
102
104 union {
108 };
109 };
110
114 public:
117 };
118 virtual Bool_t IsAutoParsingSuspended() const = 0;
119
123
124 public:
126 {
128 }
130 };
131
132 typedef int (*AutoLoadCallBack_t)(const char*);
133 typedef std::vector<std::pair<std::string, int> > FwdDeclArgsToKeepCollection_t;
134
135 TInterpreter() { } // for Dictionary
136 TInterpreter(const char *name, const char *title = "Generic Interpreter");
137 virtual ~TInterpreter() { }
138
139 virtual void AddIncludePath(const char *path) = 0;
140 virtual void *SetAutoLoadCallBack(void* /*cb*/) { return 0; }
141 virtual void *GetAutoLoadCallBack() const { return 0; }
142 virtual Int_t AutoLoad(const char *classname, Bool_t knowDictNotLoaded = kFALSE) = 0;
143 virtual Int_t AutoLoad(const std::type_info& typeinfo, Bool_t knowDictNotLoaded = kFALSE) = 0;
144 virtual Int_t AutoParse(const char* cls) = 0;
145 virtual void ClearFileBusy() = 0;
146 virtual void ClearStack() = 0; // Delete existing temporary values
147 virtual Bool_t Declare(const char* code) = 0;
148 virtual void EnableAutoLoading() = 0;
149 virtual void EndOfLineAction() = 0;
150 virtual TClass *GetClass(const std::type_info& typeinfo, Bool_t load) const = 0;
151 virtual Int_t GetExitCode() const = 0;
152 virtual TEnv *GetMapfile() const { return 0; }
153 virtual Int_t GetMore() const = 0;
154 virtual TClass *GenerateTClass(const char *classname, Bool_t emulation, Bool_t silent = kFALSE) = 0;
155 virtual TClass *GenerateTClass(ClassInfo_t *classinfo, Bool_t silent = kFALSE) = 0;
156 virtual Int_t GenerateDictionary(const char *classes, const char *includes = 0, const char *options = 0) = 0;
157 virtual char *GetPrompt() = 0;
158 virtual const char *GetSharedLibs() = 0;
159 virtual const char *GetClassSharedLibs(const char *cls) = 0;
160 virtual const char *GetSharedLibDeps(const char *lib) = 0;
161 virtual const char *GetIncludePath() = 0;
162 virtual const char *GetSTLIncludePath() const { return ""; }
163 virtual TObjArray *GetRootMapFiles() const = 0;
164 virtual void Initialize() = 0;
165 virtual void ShutDown() = 0;
166 virtual void InspectMembers(TMemberInspector&, const void* obj, const TClass* cl, Bool_t isTransient) = 0;
167 virtual Bool_t IsLoaded(const char *filename) const = 0;
168 virtual Bool_t IsLibraryLoaded(const char *libname) const = 0;
169 virtual Bool_t HasPCMForLibrary(const char *libname) const = 0;
170 virtual Int_t Load(const char *filenam, Bool_t system = kFALSE) = 0;
171 virtual void LoadMacro(const char *filename, EErrorCode *error = 0) = 0;
172 virtual Int_t LoadLibraryMap(const char *rootmapfile = 0) = 0;
173 virtual Int_t RescanLibraryMap() = 0;
176 virtual Int_t UnloadLibraryMap(const char *library) = 0;
177 virtual Long_t ProcessLine(const char *line, EErrorCode *error = 0) = 0;
178 virtual Long_t ProcessLineSynch(const char *line, EErrorCode *error = 0) = 0;
179 virtual void PrintIntro() = 0;
180 virtual void RegisterModule(const char* /*modulename*/,
181 const char** /*headers*/,
182 const char** /*includePaths*/,
183 const char* /*payloadCode*/,
184 const char* /*fwdDeclsCode*/,
185 void (* /*triggerFunc*/)(),
186 const FwdDeclArgsToKeepCollection_t& fwdDeclArgsToKeep,
187 const char** classesHeaders,
188 Bool_t lateRegistration = false,
189 Bool_t hasCxxModule = false) = 0;
190 virtual void RegisterTClassUpdate(TClass *oldcl,DictFuncPtr_t dict) = 0;
191 virtual void UnRegisterTClassUpdate(const TClass *oldcl) = 0;
192 virtual Int_t SetClassSharedLibs(const char *cls, const char *libs) = 0;
193 virtual void SetGetline(const char*(*getlineFunc)(const char* prompt),
194 void (*histaddFunc)(const char* line)) = 0;
195 virtual void Reset() = 0;
196 virtual void ResetAll() = 0;
197 virtual void ResetGlobals() = 0;
198 virtual void ResetGlobalVar(void *obj) = 0;
199 virtual void RewindDictionary() = 0;
200 virtual Int_t DeleteGlobal(void *obj) = 0;
201 virtual Int_t DeleteVariable(const char* name) = 0;
202 virtual void SaveContext() = 0;
203 virtual void SaveGlobalsContext() = 0;
204 virtual void UpdateListOfGlobals() = 0;
205 virtual void UpdateListOfGlobalFunctions() = 0;
206 virtual void UpdateListOfTypes() = 0;
207 virtual void SetClassInfo(TClass *cl, Bool_t reload = kFALSE) = 0;
208
210 kUnknown = 0, // backward compatible with false
213 };
214 virtual ECheckClassInfo CheckClassInfo(const char *name, Bool_t autoload, Bool_t isClassOrNamespaceOnly = kFALSE) = 0;
215
216 virtual Bool_t CheckClassTemplate(const char *name) = 0;
217 virtual Long_t Calc(const char *line, EErrorCode* error = 0) = 0;
218 virtual void CreateListOfBaseClasses(TClass *cl) const = 0;
219 virtual void CreateListOfDataMembers(TClass *cl) const = 0;
220 virtual void CreateListOfMethods(TClass *cl) const = 0;
221 virtual void CreateListOfMethodArgs(TFunction *m) const = 0;
222 virtual void UpdateListOfMethods(TClass *cl) const = 0;
223 virtual TString GetMangledName(TClass *cl, const char *method, const char *params, Bool_t objectIsConst = kFALSE) = 0;
224 virtual TString GetMangledNameWithPrototype(TClass *cl, const char *method, const char *proto, Bool_t objectIsConst = kFALSE, ROOT::EFunctionMatchMode /* mode */ = ROOT::kConversionMatch) = 0;
225 virtual void GetInterpreterTypeName(const char *name, std::string &output, Bool_t full = kFALSE) = 0;
226 virtual void *GetInterfaceMethod(TClass *cl, const char *method, const char *params, Bool_t objectIsConst = kFALSE) = 0;
227 virtual void *GetInterfaceMethodWithPrototype(TClass *cl, const char *method, const char *proto, Bool_t objectIsConst = kFALSE, ROOT::EFunctionMatchMode /* mode */ = ROOT::kConversionMatch) = 0;
228 virtual void Execute(const char *function, const char *params, int *error = 0) = 0;
229 virtual void Execute(TObject *obj, TClass *cl, const char *method, const char *params, int *error = 0) = 0;
230 virtual void Execute(TObject *obj, TClass *cl, TMethod *method, TObjArray *params, int *error = 0) = 0;
231 virtual void ExecuteWithArgsAndReturn(TMethod *method, void* address, const void* args[] = 0, int /*nargs*/ = 0, void* ret= 0) const = 0;
232 virtual Long_t ExecuteMacro(const char *filename, EErrorCode *error = 0) = 0;
233 virtual Bool_t IsErrorMessagesEnabled() const = 0;
234 virtual Bool_t SetErrorMessages(Bool_t enable = kTRUE) = 0;
235 virtual Bool_t IsProcessLineLocked() const = 0;
236 virtual void SetProcessLineLock(Bool_t lock = kTRUE) = 0;
237 virtual const char *TypeName(const char *s) = 0;
238 virtual std::string ToString(const char *type, void *obj) = 0;
239
241 virtual void ForgetMutexState() = 0;
242
243 // All the functions below must be virtual with a dummy implementation
244 // These functions are redefined in TCling.
245
246 // Misc
247 virtual int DisplayClass(FILE * /* fout */,const char * /* name */,int /* base */,int /* start */) const {return 0;}
248 virtual int DisplayIncludePath(FILE * /* fout */) const {return 0;}
249 virtual void *FindSym(const char * /* entry */) const {return 0;}
250 virtual void GenericError(const char * /* error */) const {;}
251 virtual Long_t GetExecByteCode() const {return 0;}
252 virtual const char *GetTopLevelMacroName() const {return 0;};
253 virtual const char *GetCurrentMacroName() const {return 0;};
254 virtual int GetSecurityError() const{return 0;}
255 virtual int LoadFile(const char * /* path */) const {return 0;}
256 virtual Bool_t LoadText(const char * /* text */) const {return kFALSE;}
257 virtual const char *MapCppName(const char*) const {return 0;}
258 virtual void SetAlloclockfunc(void (*)()) const {;}
259 virtual void SetAllocunlockfunc(void (*)()) const {;}
260 virtual int SetClassAutoloading(int) const {return 0;}
261 virtual int SetClassAutoparsing(int) {return 0;};
262 virtual void SetErrmsgcallback(void * /* p */) const {;}
263 virtual void SetTempLevel(int /* val */) const {;}
264 virtual int UnloadFile(const char * /* path */) const {return 0;}
265
266 /// The created temporary must be deleted by the caller.
267 /// Deprecated! Please use MakeInterpreterValue().
269 return MakeInterpreterValue().release();
270 }
271 virtual std::unique_ptr<TInterpreterValue> MakeInterpreterValue() const { return 0; }
272 virtual void CodeComplete(const std::string&, size_t&,
273 std::vector<std::string>&) {;}
274 virtual int Evaluate(const char*, TInterpreterValue&) {return 0;}
275
276 // core/meta helper functions.
279 virtual bool DiagnoseIfInterpreterException(const std::exception &e) const = 0;
280
282 virtual DeclId_t GetDeclId(CallFunc_t *info) const = 0;
283 virtual DeclId_t GetDeclId(ClassInfo_t *info) const = 0;
284 virtual DeclId_t GetDeclId(DataMemberInfo_t *info) const = 0;
285 virtual DeclId_t GetDeclId(FuncTempInfo_t *info) const = 0;
286 virtual DeclId_t GetDeclId(MethodInfo_t *info) const = 0;
287 virtual DeclId_t GetDeclId(TypedefInfo_t *info) const = 0;
288
289 virtual void SetDeclAttr(DeclId_t, const char* /* attribute */) = 0 ;
290
291 virtual DeclId_t GetDataMember(ClassInfo_t *cl, const char *name) const = 0;
292 virtual DeclId_t GetDataMemberAtAddr(const void *addr) const = 0;
293 virtual DeclId_t GetDataMemberWithValue(const void *ptrvalue) const = 0;
294 virtual DeclId_t GetEnum(TClass *cl, const char *name) const = 0;
295 virtual TEnum* CreateEnum(void *VD, TClass *cl) const = 0;
296 virtual void UpdateEnumConstants(TEnum* enumObj, TClass* cl) const = 0;
297 virtual void LoadEnums(TListOfEnums& cl) const = 0;
298 virtual DeclId_t GetFunction(ClassInfo_t *cl, const char *funcname) = 0;
299 virtual DeclId_t GetFunctionWithPrototype(ClassInfo_t *cl, const char* method, const char* proto, Bool_t objectIsConst = kFALSE, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) = 0;
300 virtual DeclId_t GetFunctionWithValues(ClassInfo_t *cl, const char* method, const char* params, Bool_t objectIsConst = kFALSE) = 0;
301 virtual DeclId_t GetFunctionTemplate(ClassInfo_t *cl, const char *funcname) = 0;
302 virtual void GetFunctionOverloads(ClassInfo_t *cl, const char *funcname, std::vector<DeclId_t>& res) const = 0;
303 virtual void LoadFunctionTemplates(TClass* cl) const = 0;
304 virtual std::vector<std::string> GetUsingNamespaces(ClassInfo_t *cl) const = 0;
305
306 // CallFunc interface
307 virtual void CallFunc_Delete(CallFunc_t * /* func */) const {;}
308 virtual void CallFunc_Exec(CallFunc_t * /* func */, void * /* address */) const {;}
309 virtual void CallFunc_Exec(CallFunc_t * /* func */, void * /* address */, TInterpreterValue& /* val */) const {;}
310 virtual void CallFunc_ExecWithReturn(CallFunc_t * /* func */, void * /* address */, void * /* ret */) const {;}
311 virtual void CallFunc_ExecWithArgsAndReturn(CallFunc_t * /* func */, void * /* address */, const void* /* args */ [] = 0, int /*nargs*/ = 0, void * /* ret */ = 0) const {}
312 virtual Long_t CallFunc_ExecInt(CallFunc_t * /* func */, void * /* address */) const {return 0;}
313 virtual Long64_t CallFunc_ExecInt64(CallFunc_t * /* func */, void * /* address */) const {return 0;}
314 virtual Double_t CallFunc_ExecDouble(CallFunc_t * /* func */, void * /* address */) const {return 0;}
315 virtual CallFunc_t *CallFunc_Factory() const {return 0;}
316 virtual CallFunc_t *CallFunc_FactoryCopy(CallFunc_t * /* func */) const {return 0;}
317 virtual MethodInfo_t *CallFunc_FactoryMethod(CallFunc_t * /* func */) const {return 0;}
318 virtual void CallFunc_IgnoreExtraArgs(CallFunc_t * /*func */, bool /*ignore*/) const {;}
319 virtual void CallFunc_Init(CallFunc_t * /* func */) const {;}
320 virtual Bool_t CallFunc_IsValid(CallFunc_t * /* func */) const {return 0;}
321 virtual CallFuncIFacePtr_t CallFunc_IFacePtr(CallFunc_t * /* func */) const {return CallFuncIFacePtr_t();}
322 virtual void CallFunc_ResetArg(CallFunc_t * /* func */) const {;}
323 virtual void CallFunc_SetArgArray(CallFunc_t * /* func */, Long_t * /* paramArr */, Int_t /* nparam */) const {;}
324 virtual void CallFunc_SetArgs(CallFunc_t * /* func */, const char * /* param */) const {;}
325
326 virtual void CallFunc_SetArg(CallFunc_t * /*func */, Long_t /* param */) const = 0;
327 virtual void CallFunc_SetArg(CallFunc_t * /*func */, ULong_t /* param */) const = 0;
328 virtual void CallFunc_SetArg(CallFunc_t * /* func */, Float_t /* param */) const = 0;
329 virtual void CallFunc_SetArg(CallFunc_t * /* func */, Double_t /* param */) const = 0;
330 virtual void CallFunc_SetArg(CallFunc_t * /* func */, Long64_t /* param */) const = 0;
331 virtual void CallFunc_SetArg(CallFunc_t * /* func */, ULong64_t /* param */) const = 0;
332
333 void CallFunc_SetArg(CallFunc_t * func, Char_t param) const { CallFunc_SetArg(func,(Long_t)param); }
334 void CallFunc_SetArg(CallFunc_t * func, Short_t param) const { CallFunc_SetArg(func,(Long_t)param); }
335 void CallFunc_SetArg(CallFunc_t * func, Int_t param) const { CallFunc_SetArg(func,(Long_t)param); }
336
337 void CallFunc_SetArg(CallFunc_t * func, UChar_t param) const { CallFunc_SetArg(func,(ULong_t)param); }
338 void CallFunc_SetArg(CallFunc_t * func, UShort_t param) const { CallFunc_SetArg(func,(ULong_t)param); }
339 void CallFunc_SetArg(CallFunc_t * func, UInt_t param) const { CallFunc_SetArg(func,(ULong_t)param); }
340
341 template <typename T>
342 void CallFunc_SetArgRef(CallFunc_t * func, T &param) const { CallFunc_SetArg(func,(ULong_t)&param); }
343
344 void CallFunc_SetArg(CallFunc_t *func, void *arg)
345 {
346 CallFunc_SetArg(func,(Long_t) arg);
347 }
348
349 template <typename T>
350 void CallFunc_SetArg(CallFunc_t *func, const T *arg)
351 {
352 CallFunc_SetArg(func,(Long_t) arg);
353 }
354
355 void CallFunc_SetArgImpl(CallFunc_t * /* func */)
356 {
357 }
358
359 template <typename U>
360 void CallFunc_SetArgImpl(CallFunc_t *func, const U& head)
361 {
362 CallFunc_SetArg(func, head);
363 }
364
365 template <typename U, typename... T>
366 void CallFunc_SetArgImpl(CallFunc_t *func, const U& head, const T&... tail)
367 {
368 CallFunc_SetArg(func, head);
369 CallFunc_SetArgImpl(func, tail...);
370 }
371
372 template <typename... T>
373 void CallFunc_SetArguments(CallFunc_t *func, const T&... args)
374 {
376
377 CallFunc_ResetArg(func);
378 CallFunc_SetArgImpl(func,args...);
379 }
380
381 virtual void CallFunc_SetFunc(CallFunc_t * /* func */, ClassInfo_t * /* info */, const char * /* method */, const char * /* params */, bool /* objectIsConst */, Long_t * /* Offset */) const {;}
382 virtual void CallFunc_SetFunc(CallFunc_t * /* func */, ClassInfo_t * /* info */, const char * /* method */, const char * /* params */, Long_t * /* Offset */) const {;}
383 virtual void CallFunc_SetFunc(CallFunc_t * /* func */, MethodInfo_t * /* info */) const {;}
384 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 {;}
385 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 {;}
386 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 = 0;
387 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 = 0;
388
389 virtual std::string CallFunc_GetWrapperCode(CallFunc_t *func) const = 0;
390
391 // ClassInfo interface
392 virtual Bool_t ClassInfo_Contains(ClassInfo_t *info, DeclId_t decl) const = 0;
393 virtual Long_t ClassInfo_ClassProperty(ClassInfo_t * /* info */) const {return 0;}
394 virtual void ClassInfo_Delete(ClassInfo_t * /* info */) const {;}
395 virtual void ClassInfo_Delete(ClassInfo_t * /* info */, void * /* arena */) const {;}
396 virtual void ClassInfo_DeleteArray(ClassInfo_t * /* info */, void * /* arena */, bool /* dtorOnly */) const {;}
397 virtual void ClassInfo_Destruct(ClassInfo_t * /* info */, void * /* arena */) const {;}
398 virtual ClassInfo_t *ClassInfo_Factory(Bool_t /*all*/ = kTRUE) const = 0;
399 virtual ClassInfo_t *ClassInfo_Factory(ClassInfo_t * /* cl */) const = 0;
400 virtual ClassInfo_t *ClassInfo_Factory(const char * /* name */) const = 0;
401 virtual ClassInfo_t *ClassInfo_Factory(DeclId_t declid) const = 0;
402 virtual Long_t ClassInfo_GetBaseOffset(ClassInfo_t* /* fromDerived */,
403 ClassInfo_t* /* toBase */, void* /* address */ = 0, bool /*isderived*/ = true) const {return 0;}
404 virtual int ClassInfo_GetMethodNArg(ClassInfo_t * /* info */, const char * /* method */,const char * /* proto */, Bool_t /* objectIsConst */ = false, ROOT::EFunctionMatchMode /* mode */ = ROOT::kConversionMatch) const {return 0;}
405 virtual Bool_t ClassInfo_HasDefaultConstructor(ClassInfo_t * /* info */) const {return 0;}
406 virtual Bool_t ClassInfo_HasMethod(ClassInfo_t * /* info */, const char * /* name */) const {return 0;}
407 virtual void ClassInfo_Init(ClassInfo_t * /* info */, const char * /* funcname */) const {;}
408 virtual void ClassInfo_Init(ClassInfo_t * /* info */, int /* tagnum */) const {;}
409 virtual Bool_t ClassInfo_IsBase(ClassInfo_t * /* info */, const char * /* name */) const {return 0;}
410 virtual Bool_t ClassInfo_IsEnum(const char * /* name */) const {return 0;}
411 virtual Bool_t ClassInfo_IsScopedEnum(ClassInfo_t * /* info */) const {return 0;}
412 virtual EDataType ClassInfo_GetUnderlyingType(ClassInfo_t * /* info */) const {return kNumDataTypes;}
413 virtual Bool_t ClassInfo_IsLoaded(ClassInfo_t * /* info */) const {return 0;}
414 virtual Bool_t ClassInfo_IsValid(ClassInfo_t * /* info */) const {return 0;}
415 virtual Bool_t ClassInfo_IsValidMethod(ClassInfo_t * /* info */, const char * /* method */,const char * /* proto */, Long_t * /* offset */, ROOT::EFunctionMatchMode /* mode */ = ROOT::kConversionMatch) const {return 0;}
416 virtual Bool_t ClassInfo_IsValidMethod(ClassInfo_t * /* info */, const char * /* method */,const char * /* proto */, Bool_t /* objectIsConst */, Long_t * /* offset */, ROOT::EFunctionMatchMode /* mode */ = ROOT::kConversionMatch) const {return 0;}
417 virtual int ClassInfo_Next(ClassInfo_t * /* info */) const {return 0;}
418 virtual void *ClassInfo_New(ClassInfo_t * /* info */) const {return 0;}
419 virtual void *ClassInfo_New(ClassInfo_t * /* info */, int /* n */) const {return 0;}
420 virtual void *ClassInfo_New(ClassInfo_t * /* info */, int /* n */, void * /* arena */) const {return 0;}
421 virtual void *ClassInfo_New(ClassInfo_t * /* info */, void * /* arena */) const {return 0;}
422 virtual Long_t ClassInfo_Property(ClassInfo_t * /* info */) const {return 0;}
423 virtual int ClassInfo_Size(ClassInfo_t * /* info */) const {return 0;}
424 virtual Long_t ClassInfo_Tagnum(ClassInfo_t * /* info */) const {return 0;}
425 virtual const char *ClassInfo_FileName(ClassInfo_t * /* info */) const {return 0;}
426 virtual const char *ClassInfo_FullName(ClassInfo_t * /* info */) const {return 0;}
427 virtual const char *ClassInfo_Name(ClassInfo_t * /* info */) const {return 0;}
428 virtual const char *ClassInfo_Title(ClassInfo_t * /* info */) const {return 0;}
429 virtual const char *ClassInfo_TmpltName(ClassInfo_t * /* info */) const {return 0;}
430
431
432 // BaseClassInfo interface
433 virtual void BaseClassInfo_Delete(BaseClassInfo_t * /* bcinfo */) const {;}
434 virtual BaseClassInfo_t *BaseClassInfo_Factory(ClassInfo_t * /* info */) const {return 0;}
435 virtual BaseClassInfo_t *BaseClassInfo_Factory(ClassInfo_t* /* derived */,
436 ClassInfo_t* /* base */) const {return 0;}
437 virtual int BaseClassInfo_Next(BaseClassInfo_t * /* bcinfo */) const {return 0;}
438 virtual int BaseClassInfo_Next(BaseClassInfo_t * /* bcinfo */, int /* onlyDirect */) const {return 0;}
439 virtual Long_t BaseClassInfo_Offset(BaseClassInfo_t * /* toBaseClassInfo */, void* /* address */ = 0 /*default for non-virtual*/, bool /*isderived*/ = true /*default for non-virtual*/) const {return 0;}
440 virtual Long_t BaseClassInfo_Property(BaseClassInfo_t * /* bcinfo */) const {return 0;}
441 virtual Long_t BaseClassInfo_Tagnum(BaseClassInfo_t * /* bcinfo */) const {return 0;}
442 virtual ClassInfo_t*BaseClassInfo_ClassInfo(BaseClassInfo_t * /* bcinfo */) const = 0;
443 virtual const char *BaseClassInfo_FullName(BaseClassInfo_t * /* bcinfo */) const {return 0;}
444 virtual const char *BaseClassInfo_Name(BaseClassInfo_t * /* bcinfo */) const {return 0;}
445 virtual const char *BaseClassInfo_TmpltName(BaseClassInfo_t * /* bcinfo */) const {return 0;}
446
447 // DataMemberInfo interface
448 virtual int DataMemberInfo_ArrayDim(DataMemberInfo_t * /* dminfo */) const {return 0;}
449 virtual void DataMemberInfo_Delete(DataMemberInfo_t * /* dminfo */) const {;}
450 virtual DataMemberInfo_t *DataMemberInfo_Factory(ClassInfo_t * /* clinfo */ = 0) const {return 0;}
451 virtual DataMemberInfo_t *DataMemberInfo_Factory(DeclId_t declid, ClassInfo_t* clinfo) const = 0;
452 virtual DataMemberInfo_t *DataMemberInfo_FactoryCopy(DataMemberInfo_t * /* dminfo */) const {return 0;}
453 virtual Bool_t DataMemberInfo_IsValid(DataMemberInfo_t * /* dminfo */) const {return 0;}
454 virtual int DataMemberInfo_MaxIndex(DataMemberInfo_t * /* dminfo */, Int_t /* dim */) const {return 0;}
455 virtual int DataMemberInfo_Next(DataMemberInfo_t * /* dminfo */) const {return 0;}
456 virtual Long_t DataMemberInfo_Offset(DataMemberInfo_t * /* dminfo */) const {return 0;}
457 virtual Long_t DataMemberInfo_Property(DataMemberInfo_t * /* dminfo */) const {return 0;}
458 virtual Long_t DataMemberInfo_TypeProperty(DataMemberInfo_t * /* dminfo */) const {return 0;}
459 virtual int DataMemberInfo_TypeSize(DataMemberInfo_t * /* dminfo */) const {return 0;}
460 virtual const char *DataMemberInfo_TypeName(DataMemberInfo_t * /* dminfo */) const {return 0;}
461 virtual const char *DataMemberInfo_TypeTrueName(DataMemberInfo_t * /* dminfo */) const {return 0;}
462 virtual const char *DataMemberInfo_Name(DataMemberInfo_t * /* dminfo */) const {return 0;}
463 virtual const char *DataMemberInfo_Title(DataMemberInfo_t * /* dminfo */) const {return 0;}
464 virtual const char *DataMemberInfo_ValidArrayIndex(DataMemberInfo_t * /* dminfo */) const {return 0;}
465
466 // Function Template interface
467 virtual void FuncTempInfo_Delete(FuncTempInfo_t * /* ft_info */) const = 0;
468 virtual FuncTempInfo_t *FuncTempInfo_Factory(DeclId_t declid) const = 0;
469 virtual FuncTempInfo_t *FuncTempInfo_FactoryCopy(FuncTempInfo_t * /* ft_info */) const = 0;
470 virtual Bool_t FuncTempInfo_IsValid(FuncTempInfo_t * /* ft_info */) const = 0;
471 virtual UInt_t FuncTempInfo_TemplateNargs(FuncTempInfo_t * /* ft_info */) const = 0;
472 virtual UInt_t FuncTempInfo_TemplateMinReqArgs(FuncTempInfo_t * /* ft_info */) const = 0;
473 virtual Long_t FuncTempInfo_Property(FuncTempInfo_t * /* ft_info */) const = 0;
474 virtual Long_t FuncTempInfo_ExtraProperty(FuncTempInfo_t * /* ft_info */) const = 0;
475 virtual void FuncTempInfo_Name(FuncTempInfo_t * /* ft_info */, TString &name) const = 0;
476 virtual void FuncTempInfo_Title(FuncTempInfo_t * /* ft_info */, TString &title) const = 0;
477
478 // MethodInfo interface
479 virtual void MethodInfo_CreateSignature(MethodInfo_t * /* minfo */, TString & /* signature */) const {;}
480 virtual void MethodInfo_Delete(MethodInfo_t * /* minfo */) const {;}
481 virtual MethodInfo_t *MethodInfo_Factory() const {return 0;}
482 virtual MethodInfo_t *MethodInfo_Factory(ClassInfo_t * /*clinfo*/) const {return 0;}
483 virtual MethodInfo_t *MethodInfo_Factory(DeclId_t declid) const = 0;
484 virtual MethodInfo_t *MethodInfo_FactoryCopy(MethodInfo_t * /* minfo */) const {return 0;}
485 virtual void *MethodInfo_InterfaceMethod(MethodInfo_t * /* minfo */) const {return 0;}
486 virtual Bool_t MethodInfo_IsValid(MethodInfo_t * /* minfo */) const {return 0;}
487 virtual int MethodInfo_NArg(MethodInfo_t * /* minfo */) const {return 0;}
488 virtual int MethodInfo_NDefaultArg(MethodInfo_t * /* minfo */) const {return 0;}
489 virtual int MethodInfo_Next(MethodInfo_t * /* minfo */) const {return 0;}
490 virtual Long_t MethodInfo_Property(MethodInfo_t * /* minfo */) const = 0;
491 virtual Long_t MethodInfo_ExtraProperty(MethodInfo_t * /* minfo */) const = 0;
492 virtual TypeInfo_t *MethodInfo_Type(MethodInfo_t * /* minfo */) const {return 0;}
493 virtual EReturnType MethodInfo_MethodCallReturnType(MethodInfo_t* minfo) const = 0;
494 virtual const char *MethodInfo_GetMangledName(MethodInfo_t * /* minfo */) const {return 0;}
495 virtual const char *MethodInfo_GetPrototype(MethodInfo_t * /* minfo */) const {return 0;}
496 virtual const char *MethodInfo_Name(MethodInfo_t * /* minfo */) const {return 0;}
497 virtual const char *MethodInfo_TypeName(MethodInfo_t * /* minfo */) const {return 0;}
498 virtual std::string MethodInfo_TypeNormalizedName(MethodInfo_t * /* minfo */) const {return "";}
499 virtual const char *MethodInfo_Title(MethodInfo_t * /* minfo */) const {return 0;}
500
501 // MethodArgInfo interface
502 virtual void MethodArgInfo_Delete(MethodArgInfo_t * /* marginfo */) const {;}
503 virtual MethodArgInfo_t *MethodArgInfo_Factory() const {return 0;}
504 virtual MethodArgInfo_t *MethodArgInfo_Factory(MethodInfo_t * /*minfo*/) const {return 0;}
505 virtual MethodArgInfo_t *MethodArgInfo_FactoryCopy(MethodArgInfo_t * /* marginfo */) const {return 0;}
506 virtual Bool_t MethodArgInfo_IsValid(MethodArgInfo_t * /* marginfo */) const {return 0;}
507 virtual int MethodArgInfo_Next(MethodArgInfo_t * /* marginfo */) const {return 0;}
508 virtual Long_t MethodArgInfo_Property(MethodArgInfo_t * /* marginfo */) const {return 0;}
509 virtual const char *MethodArgInfo_DefaultValue(MethodArgInfo_t * /* marginfo */) const {return 0;}
510 virtual const char *MethodArgInfo_Name(MethodArgInfo_t * /* marginfo */) const {return 0;}
511 virtual const char *MethodArgInfo_TypeName(MethodArgInfo_t * /* marginfo */) const {return 0;}
512 virtual std::string MethodArgInfo_TypeNormalizedName(MethodArgInfo_t * /* marginfo */) const = 0;
513
514
515 // TypeInfo interface
516 virtual void TypeInfo_Delete(TypeInfo_t * /* tinfo */) const {;}
517 virtual TypeInfo_t *TypeInfo_Factory() const {return 0;}
518 virtual TypeInfo_t *TypeInfo_Factory(const char* /* name */) const {return 0;}
519 virtual TypeInfo_t *TypeInfo_FactoryCopy(TypeInfo_t * /* tinfo */) const {return 0;}
520 virtual void TypeInfo_Init(TypeInfo_t * /* tinfo */, const char * /* funcname */) const {;}
521 virtual Bool_t TypeInfo_IsValid(TypeInfo_t * /* tinfo */) const {return 0;}
522 virtual const char *TypeInfo_Name(TypeInfo_t * /* info */) const {return 0;}
523 virtual Long_t TypeInfo_Property(TypeInfo_t * /* tinfo */) const {return 0;}
524 virtual int TypeInfo_RefType(TypeInfo_t * /* tinfo */) const {return 0;}
525 virtual int TypeInfo_Size(TypeInfo_t * /* tinfo */) const {return 0;}
526 virtual const char *TypeInfo_TrueName(TypeInfo_t * /* tinfo */) const {return 0;}
527
528
529 // TypedefInfo interface
530 virtual void TypedefInfo_Delete(TypedefInfo_t * /* tinfo */) const {;}
531 virtual TypedefInfo_t *TypedefInfo_Factory() const {return 0;}
532 virtual TypedefInfo_t *TypedefInfo_Factory(const char *) const {return 0;}
533 virtual TypedefInfo_t *TypedefInfo_FactoryCopy(TypedefInfo_t * /* tinfo */) const {return 0;}
534 virtual void TypedefInfo_Init(TypedefInfo_t * /* tinfo */, const char * /* funcname */) const {;}
535 virtual Bool_t TypedefInfo_IsValid(TypedefInfo_t * /* tinfo */) const {return 0;}
536 virtual int TypedefInfo_Next(TypedefInfo_t* /*tinfo*/) const {return 0;}
537 virtual Long_t TypedefInfo_Property(TypedefInfo_t * /* tinfo */) const {return 0;}
538 virtual int TypedefInfo_Size(TypedefInfo_t * /* tinfo */) const {return 0;}
539 virtual const char *TypedefInfo_TrueName(TypedefInfo_t * /* tinfo */) const {return 0;}
540 virtual const char *TypedefInfo_Name(TypedefInfo_t * /* tinfo */) const {return 0;}
541 virtual const char *TypedefInfo_Title(TypedefInfo_t * /* tinfo */) const {return 0;}
542
543 static TInterpreter *Instance();
544
545 ClassDef(TInterpreter,0) //ABC defining interface to generic interpreter
546};
547
548
549typedef TInterpreter *CreateInterpreter_t(void* shlibHandle, const char* argv[]);
551
552#ifndef __CINT__
553#define gInterpreter (TInterpreter::Instance())
555#endif
556
558 fLockGuard(mutex)
559{
560 if (gCoreMutex)
562}
564{
565 if (gCoreMutex)
567}
568
569#endif
#define R__EXTERN
Definition: DllImport.h:27
#define e(i)
Definition: RSha256.hxx:103
unsigned short UShort_t
Definition: RtypesCore.h:36
int Int_t
Definition: RtypesCore.h:41
unsigned char UChar_t
Definition: RtypesCore.h:34
char Char_t
Definition: RtypesCore.h:29
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
short Short_t
Definition: RtypesCore.h:35
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
#define ClassDef(name, id)
Definition: Rtypes.h:326
TClass *(* DictFuncPtr_t)()
Definition: Rtypes.h:78
EDataType
Definition: TDataType.h:28
@ kNumDataTypes
Definition: TDataType.h:40
char name[80]
Definition: TGX11.cxx:109
int type
Definition: TGX11.cxx:120
R__EXTERN TVirtualMutex * gInterpreterMutex
Definition: TInterpreter.h:40
TInterpreter * CreateInterpreter_t(void *shlibHandle, const char *argv[])
Definition: TInterpreter.h:549
R__EXTERN TInterpreter * gCling
Definition: TInterpreter.h:554
void * DestroyInterpreter_t(TInterpreter *)
Definition: TInterpreter.h:550
typedef void((*Func_t)())
#define R__LOCKGUARD(mutex)
const char * proto
Definition: civetweb.c:16604
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:75
const void * DeclId_t
Definition: TDictionary.h:206
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
SuspendAutoParsing(TInterpreter *where, Bool_t value=kTRUE)
Definition: TInterpreter.h:115
SuspendAutoloadingRAII(TInterpreter *interp)
Definition: TInterpreter.h:125
This class defines an abstract interface to a generic command line interpreter.
Definition: TInterpreter.h:60
virtual TypedefInfo_t * TypedefInfo_Factory() const
Definition: TInterpreter.h:531
virtual std::string ToString(const char *type, void *obj)=0
virtual int MethodInfo_NArg(MethodInfo_t *) const
Definition: TInterpreter.h:487
virtual Bool_t ClassInfo_HasMethod(ClassInfo_t *, const char *) const
Definition: TInterpreter.h:406
virtual Long_t MethodInfo_ExtraProperty(MethodInfo_t *) const =0
virtual DataMemberInfo_t * DataMemberInfo_FactoryCopy(DataMemberInfo_t *) const
Definition: TInterpreter.h:452
virtual void ClassInfo_Delete(ClassInfo_t *, void *) const
Definition: TInterpreter.h:395
virtual void * GetAutoLoadCallBack() const
Definition: TInterpreter.h:141
virtual void InspectMembers(TMemberInspector &, const void *obj, const TClass *cl, Bool_t isTransient)=0
virtual const char * TypeInfo_TrueName(TypeInfo_t *) const
Definition: TInterpreter.h:526
virtual TypedefInfo_t * TypedefInfo_FactoryCopy(TypedefInfo_t *) const
Definition: TInterpreter.h:533
virtual char * GetPrompt()=0
class std::map< std::string, std::string > MembersMap_t
Definition: TInterpreter.h:70
virtual void ClearStack()=0
virtual void CallFunc_SetArgs(CallFunc_t *, const char *) const
Definition: TInterpreter.h:324
virtual const char * DataMemberInfo_Name(DataMemberInfo_t *) const
Definition: TInterpreter.h:462
virtual void SetAllocunlockfunc(void(*)()) const
Definition: TInterpreter.h:259
virtual Long_t ExecuteMacro(const char *filename, EErrorCode *error=0)=0
virtual int UnloadFile(const char *) const
Definition: TInterpreter.h:264
virtual const char * DataMemberInfo_TypeName(DataMemberInfo_t *) const
Definition: TInterpreter.h:460
virtual void SetTempLevel(int) const
Definition: TInterpreter.h:263
virtual void CallFunc_SetFunc(CallFunc_t *, MethodInfo_t *) const
Definition: TInterpreter.h:383
virtual void CallFunc_SetFunc(CallFunc_t *, ClassInfo_t *, const char *, const char *, bool, Long_t *) const
Definition: TInterpreter.h:381
virtual const char * DataMemberInfo_ValidArrayIndex(DataMemberInfo_t *) const
Definition: TInterpreter.h:464
virtual DeclId_t GetFunctionTemplate(ClassInfo_t *cl, const char *funcname)=0
virtual void UpdateListOfGlobalFunctions()=0
virtual void UpdateListOfGlobals()=0
virtual int DataMemberInfo_TypeSize(DataMemberInfo_t *) const
Definition: TInterpreter.h:459
virtual int ClassInfo_Next(ClassInfo_t *) const
Definition: TInterpreter.h:417
virtual void CallFunc_IgnoreExtraArgs(CallFunc_t *, bool) const
Definition: TInterpreter.h:318
virtual Int_t GenerateDictionary(const char *classes, const char *includes=0, const char *options=0)=0
virtual const char * BaseClassInfo_TmpltName(BaseClassInfo_t *) const
Definition: TInterpreter.h:445
virtual const char * MethodArgInfo_Name(MethodArgInfo_t *) const
Definition: TInterpreter.h:510
virtual void TypeInfo_Init(TypeInfo_t *, const char *) const
Definition: TInterpreter.h:520
virtual Long_t ClassInfo_GetBaseOffset(ClassInfo_t *, ClassInfo_t *, void *=0, bool=true) const
Definition: TInterpreter.h:402
virtual Long_t FuncTempInfo_Property(FuncTempInfo_t *) const =0
virtual void * ClassInfo_New(ClassInfo_t *) const
Definition: TInterpreter.h:418
virtual Bool_t ClassInfo_IsValid(ClassInfo_t *) const
Definition: TInterpreter.h:414
virtual std::string MethodArgInfo_TypeNormalizedName(MethodArgInfo_t *) const =0
virtual Int_t DeleteVariable(const char *name)=0
virtual void GenericError(const char *) const
Definition: TInterpreter.h:250
virtual void SaveGlobalsContext()=0
virtual void CallFunc_SetFuncProto(CallFunc_t *, ClassInfo_t *, const char *, const char *, Long_t *, ROOT::EFunctionMatchMode=ROOT::kConversionMatch) const
Definition: TInterpreter.h:384
virtual void ForgetMutexState()=0
virtual const char * TypedefInfo_TrueName(TypedefInfo_t *) const
Definition: TInterpreter.h:539
virtual int BaseClassInfo_Next(BaseClassInfo_t *, int) const
Definition: TInterpreter.h:438
virtual void Execute(TObject *obj, TClass *cl, const char *method, const char *params, int *error=0)=0
virtual Long_t TypedefInfo_Property(TypedefInfo_t *) const
Definition: TInterpreter.h:537
virtual void CallFunc_SetArg(CallFunc_t *, Double_t) const =0
virtual Bool_t HasPCMForLibrary(const char *libname) const =0
virtual DeclId_t GetFunction(ClassInfo_t *cl, const char *funcname)=0
virtual Int_t AutoParse(const char *cls)=0
virtual const char * GetIncludePath()=0
virtual void CodeComplete(const std::string &, size_t &, std::vector< std::string > &)
Definition: TInterpreter.h:272
virtual Bool_t TypedefInfo_IsValid(TypedefInfo_t *) const
Definition: TInterpreter.h:535
virtual Long_t BaseClassInfo_Tagnum(BaseClassInfo_t *) const
Definition: TInterpreter.h:441
virtual int SetClassAutoloading(int) const
Definition: TInterpreter.h:260
virtual Int_t AutoLoad(const std::type_info &typeinfo, Bool_t knowDictNotLoaded=kFALSE)=0
virtual const char * TypeInfo_Name(TypeInfo_t *) const
Definition: TInterpreter.h:522
virtual void ExecuteWithArgsAndReturn(TMethod *method, void *address, const void *args[]=0, int=0, void *ret=0) const =0
virtual void ClassInfo_Delete(ClassInfo_t *) const
Definition: TInterpreter.h:394
void CallFunc_SetArguments(CallFunc_t *func, const T &... args)
Definition: TInterpreter.h:373
virtual void CallFunc_ExecWithReturn(CallFunc_t *, void *, void *) const
Definition: TInterpreter.h:310
virtual TClass * GetClass(const std::type_info &typeinfo, Bool_t load) const =0
void CallFunc_SetArg(CallFunc_t *func, void *arg)
Definition: TInterpreter.h:344
virtual void RegisterModule(const char *, const char **, const char **, const char *, const char *, void(*)(), const FwdDeclArgsToKeepCollection_t &fwdDeclArgsToKeep, const char **classesHeaders, Bool_t lateRegistration=false, Bool_t hasCxxModule=false)=0
virtual Long_t DataMemberInfo_Offset(DataMemberInfo_t *) const
Definition: TInterpreter.h:456
void CallFunc_SetArg(CallFunc_t *func, Char_t param) const
Definition: TInterpreter.h:333
virtual const char * MethodArgInfo_DefaultValue(MethodArgInfo_t *) const
Definition: TInterpreter.h:509
virtual bool DiagnoseIfInterpreterException(const std::exception &e) const =0
virtual EReturnType MethodCallReturnType(TFunction *func) const =0
virtual void TypeInfo_Delete(TypeInfo_t *) const
Definition: TInterpreter.h:516
virtual void CallFunc_ResetArg(CallFunc_t *) const
Definition: TInterpreter.h:322
virtual void EndOfLineAction()=0
virtual void ResetGlobals()=0
virtual Bool_t ClassInfo_IsBase(ClassInfo_t *, const char *) const
Definition: TInterpreter.h:409
virtual const char * MethodInfo_Title(MethodInfo_t *) const
Definition: TInterpreter.h:499
TInterpreterValue * CreateTemporary() const
The created temporary must be deleted by the caller.
Definition: TInterpreter.h:268
virtual const char * MethodInfo_GetPrototype(MethodInfo_t *) const
Definition: TInterpreter.h:495
virtual void ClassInfo_DeleteArray(ClassInfo_t *, void *, bool) const
Definition: TInterpreter.h:396
int(* AutoLoadCallBack_t)(const char *)
Definition: TInterpreter.h:132
virtual Int_t UnloadAllSharedLibraryMaps()=0
virtual Long_t FuncTempInfo_ExtraProperty(FuncTempInfo_t *) const =0
virtual Long_t Calc(const char *line, EErrorCode *error=0)=0
virtual TString GetMangledName(TClass *cl, const char *method, const char *params, Bool_t objectIsConst=kFALSE)=0
virtual void CreateListOfDataMembers(TClass *cl) const =0
virtual TypeInfo_t * MethodInfo_Type(MethodInfo_t *) const
Definition: TInterpreter.h:492
virtual void * ClassInfo_New(ClassInfo_t *, void *) const
Definition: TInterpreter.h:421
virtual int MethodArgInfo_Next(MethodArgInfo_t *) const
Definition: TInterpreter.h:507
virtual void MethodInfo_Delete(MethodInfo_t *) const
Definition: TInterpreter.h:480
virtual void UnRegisterTClassUpdate(const TClass *oldcl)=0
virtual TEnv * GetMapfile() const
Definition: TInterpreter.h:152
virtual BaseClassInfo_t * BaseClassInfo_Factory(ClassInfo_t *, ClassInfo_t *) const
Definition: TInterpreter.h:435
virtual UInt_t FuncTempInfo_TemplateMinReqArgs(FuncTempInfo_t *) const =0
virtual DeclId_t GetDeclId(FuncTempInfo_t *info) const =0
virtual TypedefInfo_t * TypedefInfo_Factory(const char *) const
Definition: TInterpreter.h:532
virtual void AddIncludePath(const char *path)=0
virtual void ResetGlobalVar(void *obj)=0
virtual Bool_t IsLoaded(const char *filename) const =0
virtual const char * GetClassSharedLibs(const char *cls)=0
virtual const char * ClassInfo_TmpltName(ClassInfo_t *) const
Definition: TInterpreter.h:429
virtual void SetProcessLineLock(Bool_t lock=kTRUE)=0
virtual Int_t Load(const char *filenam, Bool_t system=kFALSE)=0
virtual TypeInfo_t * TypeInfo_Factory(const char *) const
Definition: TInterpreter.h:518
virtual std::string CallFunc_GetWrapperCode(CallFunc_t *func) const =0
virtual Long_t ClassInfo_Property(ClassInfo_t *) const
Definition: TInterpreter.h:422
virtual int Evaluate(const char *, TInterpreterValue &)
Definition: TInterpreter.h:274
virtual Long_t ProcessLineSynch(const char *line, EErrorCode *error=0)=0
void CallFunc_SetArg(CallFunc_t *func, Int_t param) const
Definition: TInterpreter.h:335
virtual TypeInfo_t * TypeInfo_Factory() const
Definition: TInterpreter.h:517
virtual int MethodInfo_NDefaultArg(MethodInfo_t *) const
Definition: TInterpreter.h:488
virtual void LoadFunctionTemplates(TClass *cl) const =0
virtual ClassInfo_t * ClassInfo_Factory(const char *) const =0
virtual void TypedefInfo_Delete(TypedefInfo_t *) const
Definition: TInterpreter.h:530
virtual void CallFunc_Exec(CallFunc_t *, void *) const
Definition: TInterpreter.h:308
virtual Bool_t MethodArgInfo_IsValid(MethodArgInfo_t *) const
Definition: TInterpreter.h:506
virtual void CallFunc_SetArg(CallFunc_t *, Long64_t) const =0
virtual ECheckClassInfo CheckClassInfo(const char *name, Bool_t autoload, Bool_t isClassOrNamespaceOnly=kFALSE)=0
virtual const char * BaseClassInfo_Name(BaseClassInfo_t *) const
Definition: TInterpreter.h:444
virtual const char * MethodInfo_TypeName(MethodInfo_t *) const
Definition: TInterpreter.h:497
virtual MethodInfo_t * MethodInfo_Factory(DeclId_t declid) const =0
virtual void PrintIntro()=0
virtual void Execute(const char *function, const char *params, int *error=0)=0
Execute method on this object with the given parameter string, e.g.
virtual Bool_t ClassInfo_HasDefaultConstructor(ClassInfo_t *) const
Definition: TInterpreter.h:405
virtual void CallFunc_ExecWithArgsAndReturn(CallFunc_t *, void *, const void *[]=0, int=0, void *=0) const
Definition: TInterpreter.h:311
virtual int DisplayIncludePath(FILE *) const
Definition: TInterpreter.h:248
virtual DataMemberInfo_t * DataMemberInfo_Factory(ClassInfo_t *=0) const
Definition: TInterpreter.h:450
virtual void UpdateListOfMethods(TClass *cl) const =0
virtual void CreateListOfMethodArgs(TFunction *m) const =0
void CallFunc_SetArgRef(CallFunc_t *func, T &param) const
Definition: TInterpreter.h:342
virtual int LoadFile(const char *) const
Definition: TInterpreter.h:255
virtual UInt_t FuncTempInfo_TemplateNargs(FuncTempInfo_t *) const =0
virtual int DisplayClass(FILE *, const char *, int, int) const
Definition: TInterpreter.h:247
void CallFunc_SetArgImpl(CallFunc_t *func, const U &head, const T &... tail)
Definition: TInterpreter.h:366
virtual const char * ClassInfo_Name(ClassInfo_t *) const
Definition: TInterpreter.h:427
virtual Int_t UnloadLibraryMap(const char *library)=0
virtual int ClassInfo_Size(ClassInfo_t *) const
Definition: TInterpreter.h:423
virtual const char * ClassInfo_FullName(ClassInfo_t *) const
Definition: TInterpreter.h:426
virtual int TypedefInfo_Next(TypedefInfo_t *) const
Definition: TInterpreter.h:536
virtual void RewindDictionary()=0
virtual Bool_t DataMemberInfo_IsValid(DataMemberInfo_t *) const
Definition: TInterpreter.h:453
virtual MethodArgInfo_t * MethodArgInfo_Factory() const
Definition: TInterpreter.h:503
virtual DeclId_t GetDeclId(DataMemberInfo_t *info) const =0
virtual CallFunc_t * CallFunc_Factory() const
Definition: TInterpreter.h:315
virtual void * MethodInfo_InterfaceMethod(MethodInfo_t *) const
Definition: TInterpreter.h:485
virtual Int_t AutoLoad(const char *classname, Bool_t knowDictNotLoaded=kFALSE)=0
virtual const char * TypedefInfo_Name(TypedefInfo_t *) const
Definition: TInterpreter.h:540
virtual EDataType ClassInfo_GetUnderlyingType(ClassInfo_t *) const
Definition: TInterpreter.h:412
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 =0
virtual int GetSecurityError() const
Definition: TInterpreter.h:254
virtual void CallFunc_Init(CallFunc_t *) const
Definition: TInterpreter.h:319
virtual void Execute(TObject *obj, TClass *cl, TMethod *method, TObjArray *params, int *error=0)=0
virtual EReturnType MethodInfo_MethodCallReturnType(MethodInfo_t *minfo) const =0
virtual void ResetAll()=0
virtual const char * ClassInfo_Title(ClassInfo_t *) const
Definition: TInterpreter.h:428
virtual void Reset()=0
virtual Bool_t Declare(const char *code)=0
virtual FuncTempInfo_t * FuncTempInfo_FactoryCopy(FuncTempInfo_t *) const =0
virtual Int_t LoadLibraryMap(const char *rootmapfile=0)=0
virtual Long_t DataMemberInfo_TypeProperty(DataMemberInfo_t *) const
Definition: TInterpreter.h:458
virtual Bool_t IsErrorMessagesEnabled() const =0
virtual int DataMemberInfo_Next(DataMemberInfo_t *) const
Definition: TInterpreter.h:455
virtual void BaseClassInfo_Delete(BaseClassInfo_t *) const
Definition: TInterpreter.h:433
virtual ClassInfo_t * ClassInfo_Factory(Bool_t=kTRUE) const =0
virtual void * SetAutoLoadCallBack(void *)
Definition: TInterpreter.h:140
virtual Bool_t CheckClassTemplate(const char *name)=0
virtual Long_t MethodArgInfo_Property(MethodArgInfo_t *) const
Definition: TInterpreter.h:508
virtual void SetClassInfo(TClass *cl, Bool_t reload=kFALSE)=0
virtual Bool_t ClassInfo_Contains(ClassInfo_t *info, DeclId_t decl) const =0
virtual Bool_t IsAutoParsingSuspended() const =0
virtual Long_t ClassInfo_Tagnum(ClassInfo_t *) const
Definition: TInterpreter.h:424
virtual DeclId_t GetEnum(TClass *cl, const char *name) const =0
virtual void MethodArgInfo_Delete(MethodArgInfo_t *) const
Definition: TInterpreter.h:502
virtual const char * ClassInfo_FileName(ClassInfo_t *) const
Definition: TInterpreter.h:425
virtual void * ClassInfo_New(ClassInfo_t *, int, void *) const
Definition: TInterpreter.h:420
virtual Long_t TypeInfo_Property(TypeInfo_t *) const
Definition: TInterpreter.h:523
virtual int SetClassAutoparsing(int)
Definition: TInterpreter.h:261
virtual void SnapshotMutexState(ROOT::TVirtualRWMutex *mtx)=0
virtual MethodInfo_t * MethodInfo_Factory(ClassInfo_t *) const
Definition: TInterpreter.h:482
virtual void CreateListOfMethods(TClass *cl) const =0
virtual int TypeInfo_Size(TypeInfo_t *) const
Definition: TInterpreter.h:525
virtual MethodInfo_t * MethodInfo_FactoryCopy(MethodInfo_t *) const
Definition: TInterpreter.h:484
virtual void SetGetline(const char *(*getlineFunc)(const char *prompt), void(*histaddFunc)(const char *line))=0
virtual const char * MethodInfo_Name(MethodInfo_t *) const
Definition: TInterpreter.h:496
virtual int ClassInfo_GetMethodNArg(ClassInfo_t *, const char *, const char *, Bool_t=false, ROOT::EFunctionMatchMode=ROOT::kConversionMatch) const
Definition: TInterpreter.h:404
virtual void UpdateListOfTypes()=0
virtual DataMemberInfo_t * DataMemberInfo_Factory(DeclId_t declid, ClassInfo_t *clinfo) const =0
virtual MethodArgInfo_t * MethodArgInfo_FactoryCopy(MethodArgInfo_t *) const
Definition: TInterpreter.h:505
virtual Bool_t IsProcessLineLocked() const =0
virtual Bool_t LoadText(const char *) const
Definition: TInterpreter.h:256
virtual void Initialize()=0
virtual DeclId_t GetDataMember(ClassInfo_t *cl, const char *name) const =0
void CallFunc_SetArg(CallFunc_t *func, UInt_t param) const
Definition: TInterpreter.h:339
virtual Bool_t IsLibraryLoaded(const char *libname) const =0
virtual Bool_t SetSuspendAutoParsing(Bool_t value)=0
virtual Long_t DataMemberInfo_Property(DataMemberInfo_t *) const
Definition: TInterpreter.h:457
virtual void * GetInterfaceMethodWithPrototype(TClass *cl, const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode=ROOT::kConversionMatch)=0
virtual void FuncTempInfo_Name(FuncTempInfo_t *, TString &name) const =0
virtual ULong64_t GetInterpreterStateMarker() const =0
virtual void ClassInfo_Init(ClassInfo_t *, int) const
Definition: TInterpreter.h:408
virtual const char * GetSharedLibDeps(const char *lib)=0
virtual Int_t ReloadAllSharedLibraryMaps()=0
virtual Long64_t CallFunc_ExecInt64(CallFunc_t *, void *) const
Definition: TInterpreter.h:313
virtual void TypedefInfo_Init(TypedefInfo_t *, const char *) const
Definition: TInterpreter.h:534
virtual const char * GetTopLevelMacroName() const
Definition: TInterpreter.h:252
virtual Int_t RescanLibraryMap()=0
virtual int DataMemberInfo_ArrayDim(DataMemberInfo_t *) const
Definition: TInterpreter.h:448
virtual Bool_t CallFunc_IsValid(CallFunc_t *) const
Definition: TInterpreter.h:320
virtual void MethodInfo_CreateSignature(MethodInfo_t *, TString &) const
Definition: TInterpreter.h:479
virtual DeclId_t GetDataMemberAtAddr(const void *addr) const =0
virtual DeclId_t GetFunctionWithValues(ClassInfo_t *cl, const char *method, const char *params, Bool_t objectIsConst=kFALSE)=0
virtual std::string MethodInfo_TypeNormalizedName(MethodInfo_t *) const
Definition: TInterpreter.h:498
virtual void CallFunc_SetArgArray(CallFunc_t *, Long_t *, Int_t) const
Definition: TInterpreter.h:323
virtual const char * MethodArgInfo_TypeName(MethodArgInfo_t *) const
Definition: TInterpreter.h:511
std::vector< std::pair< std::string, int > > FwdDeclArgsToKeepCollection_t
Definition: TInterpreter.h:133
virtual void GetInterpreterTypeName(const char *name, std::string &output, Bool_t full=kFALSE)=0
virtual int TypeInfo_RefType(TypeInfo_t *) const
Definition: TInterpreter.h:524
virtual Bool_t SetErrorMessages(Bool_t enable=kTRUE)=0
virtual TClass * GenerateTClass(const char *classname, Bool_t emulation, Bool_t silent=kFALSE)=0
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 =0
void CallFunc_SetArg(CallFunc_t *func, UChar_t param) const
Definition: TInterpreter.h:337
virtual Long_t MethodInfo_Property(MethodInfo_t *) const =0
virtual const char * GetSharedLibs()=0
virtual const char * MapCppName(const char *) const
Definition: TInterpreter.h:257
virtual Bool_t MethodInfo_IsValid(MethodInfo_t *) const
Definition: TInterpreter.h:486
virtual void DataMemberInfo_Delete(DataMemberInfo_t *) const
Definition: TInterpreter.h:449
virtual void LoadEnums(TListOfEnums &cl) const =0
virtual ClassInfo_t * BaseClassInfo_ClassInfo(BaseClassInfo_t *) const =0
virtual ~TInterpreter()
Definition: TInterpreter.h:137
virtual void * FindSym(const char *) const
Definition: TInterpreter.h:249
virtual void SaveContext()=0
virtual void SetErrmsgcallback(void *) const
Definition: TInterpreter.h:262
void CallFunc_SetArgImpl(CallFunc_t *)
Definition: TInterpreter.h:355
void CallFunc_SetArg(CallFunc_t *func, UShort_t param) const
Definition: TInterpreter.h:338
virtual Bool_t ClassInfo_IsLoaded(ClassInfo_t *) const
Definition: TInterpreter.h:413
virtual int DataMemberInfo_MaxIndex(DataMemberInfo_t *, Int_t) const
Definition: TInterpreter.h:454
virtual DeclId_t GetDeclId(ClassInfo_t *info) const =0
virtual CallFunc_t * CallFunc_FactoryCopy(CallFunc_t *) const
Definition: TInterpreter.h:316
virtual Int_t GetExitCode() const =0
virtual void EnableAutoLoading()=0
virtual const char * TypedefInfo_Title(TypedefInfo_t *) const
Definition: TInterpreter.h:541
virtual void ClassInfo_Init(ClassInfo_t *, const char *) const
Definition: TInterpreter.h:407
virtual const char * DataMemberInfo_Title(DataMemberInfo_t *) const
Definition: TInterpreter.h:463
virtual int BaseClassInfo_Next(BaseClassInfo_t *) const
Definition: TInterpreter.h:437
virtual MethodArgInfo_t * MethodArgInfo_Factory(MethodInfo_t *) const
Definition: TInterpreter.h:504
virtual void SetAlloclockfunc(void(*)()) const
Definition: TInterpreter.h:258
TDictionary::DeclId_t DeclId_t
Definition: TInterpreter.h:281
virtual Long_t CallFunc_ExecInt(CallFunc_t *, void *) const
Definition: TInterpreter.h:312
virtual void CallFunc_Exec(CallFunc_t *, void *, TInterpreterValue &) const
Definition: TInterpreter.h:309
virtual ClassInfo_t * ClassInfo_Factory(ClassInfo_t *) const =0
virtual TString GetMangledNameWithPrototype(TClass *cl, const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode=ROOT::kConversionMatch)=0
virtual DeclId_t GetDeclId(CallFunc_t *info) const =0
virtual std::unique_ptr< TInterpreterValue > MakeInterpreterValue() const
Definition: TInterpreter.h:271
virtual void UpdateEnumConstants(TEnum *enumObj, TClass *cl) const =0
virtual void SetDeclAttr(DeclId_t, const char *)=0
virtual DeclId_t GetDataMemberWithValue(const void *ptrvalue) const =0
virtual Long_t ProcessLine(const char *line, EErrorCode *error=0)=0
virtual void * ClassInfo_New(ClassInfo_t *, int) const
Definition: TInterpreter.h:419
virtual void CallFunc_Delete(CallFunc_t *) const
Definition: TInterpreter.h:307
virtual Bool_t TypeInfo_IsValid(TypeInfo_t *) const
Definition: TInterpreter.h:521
virtual CallFuncIFacePtr_t CallFunc_IFacePtr(CallFunc_t *) const
Definition: TInterpreter.h:321
virtual BaseClassInfo_t * BaseClassInfo_Factory(ClassInfo_t *) const
Definition: TInterpreter.h:434
virtual void GetFunctionOverloads(ClassInfo_t *cl, const char *funcname, std::vector< DeclId_t > &res) const =0
virtual DeclId_t GetDeclId(MethodInfo_t *info) const =0
virtual void RegisterTClassUpdate(TClass *oldcl, DictFuncPtr_t dict)=0
virtual Bool_t ClassInfo_IsScopedEnum(ClassInfo_t *) const
Definition: TInterpreter.h:411
virtual int MethodInfo_Next(MethodInfo_t *) const
Definition: TInterpreter.h:489
virtual MethodInfo_t * CallFunc_FactoryMethod(CallFunc_t *) const
Definition: TInterpreter.h:317
virtual const char * DataMemberInfo_TypeTrueName(DataMemberInfo_t *) const
Definition: TInterpreter.h:461
virtual void CallFunc_SetArg(CallFunc_t *, ULong_t) const =0
virtual TypeInfo_t * TypeInfo_FactoryCopy(TypeInfo_t *) const
Definition: TInterpreter.h:519
virtual TClass * GenerateTClass(ClassInfo_t *classinfo, Bool_t silent=kFALSE)=0
virtual Long_t ClassInfo_ClassProperty(ClassInfo_t *) const
Definition: TInterpreter.h:393
virtual void CallFunc_SetFunc(CallFunc_t *, ClassInfo_t *, const char *, const char *, Long_t *) const
Definition: TInterpreter.h:382
virtual Int_t GetMore() const =0
virtual void Execute(TMethod *method, TObjArray *params, int *error=0)=0
Execute method on this object with parameters stored in the TObjArray.
virtual void LoadMacro(const char *filename, EErrorCode *error=0)=0
static TInterpreter * Instance()
returns gInterpreter global
virtual void CreateListOfBaseClasses(TClass *cl) const =0
virtual void ShutDown()=0
virtual Bool_t ClassInfo_IsValidMethod(ClassInfo_t *, const char *, const char *, Bool_t, Long_t *, ROOT::EFunctionMatchMode=ROOT::kConversionMatch) const
Definition: TInterpreter.h:416
virtual Long_t BaseClassInfo_Offset(BaseClassInfo_t *, void *=0, bool=true) const
Definition: TInterpreter.h:439
virtual void FuncTempInfo_Delete(FuncTempInfo_t *) const =0
virtual ClassInfo_t * ClassInfo_Factory(DeclId_t declid) const =0
virtual void ClearFileBusy()=0
virtual TObjArray * GetRootMapFiles() const =0
virtual const char * BaseClassInfo_FullName(BaseClassInfo_t *) const
Definition: TInterpreter.h:443
virtual const char * GetSTLIncludePath() const
Definition: TInterpreter.h:162
virtual Bool_t ClassInfo_IsEnum(const char *) const
Definition: TInterpreter.h:410
virtual void CallFunc_SetArg(CallFunc_t *, Float_t) const =0
virtual int TypedefInfo_Size(TypedefInfo_t *) const
Definition: TInterpreter.h:538
virtual void CallFunc_SetArg(CallFunc_t *, ULong64_t) const =0
virtual void CallFunc_SetFuncProto(CallFunc_t *, ClassInfo_t *, const char *, const char *, bool, Long_t *, ROOT::EFunctionMatchMode=ROOT::kConversionMatch) const
Definition: TInterpreter.h:385
virtual TEnum * CreateEnum(void *VD, TClass *cl) const =0
virtual Long_t GetExecByteCode() const
Definition: TInterpreter.h:251
virtual FuncTempInfo_t * FuncTempInfo_Factory(DeclId_t declid) const =0
virtual const char * MethodInfo_GetMangledName(MethodInfo_t *) const
Definition: TInterpreter.h:494
virtual MethodInfo_t * MethodInfo_Factory() const
Definition: TInterpreter.h:481
virtual Int_t SetClassSharedLibs(const char *cls, const char *libs)=0
virtual std::vector< std::string > GetUsingNamespaces(ClassInfo_t *cl) const =0
void CallFunc_SetArg(CallFunc_t *func, const T *arg)
Definition: TInterpreter.h:350
void CallFunc_SetArg(CallFunc_t *func, Short_t param) const
Definition: TInterpreter.h:334
virtual Int_t DeleteGlobal(void *obj)=0
virtual void FuncTempInfo_Title(FuncTempInfo_t *, TString &title) const =0
virtual DeclId_t GetFunctionWithPrototype(ClassInfo_t *cl, const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)=0
virtual void ClassInfo_Destruct(ClassInfo_t *, void *) const
Definition: TInterpreter.h:397
virtual DeclId_t GetDeclId(TypedefInfo_t *info) const =0
virtual Bool_t FuncTempInfo_IsValid(FuncTempInfo_t *) const =0
void CallFunc_SetArgImpl(CallFunc_t *func, const U &head)
Definition: TInterpreter.h:360
virtual Long_t BaseClassInfo_Property(BaseClassInfo_t *) const
Definition: TInterpreter.h:440
virtual Double_t CallFunc_ExecDouble(CallFunc_t *, void *) const
Definition: TInterpreter.h:314
virtual void CallFunc_SetArg(CallFunc_t *, Long_t) const =0
virtual void * GetInterfaceMethod(TClass *cl, const char *method, const char *params, Bool_t objectIsConst=kFALSE)=0
virtual const char * GetCurrentMacroName() const
Definition: TInterpreter.h:253
virtual const char * TypeName(const char *s)=0
virtual Bool_t ClassInfo_IsValidMethod(ClassInfo_t *, const char *, const char *, Long_t *, ROOT::EFunctionMatchMode=ROOT::kConversionMatch) const
Definition: TInterpreter.h:415
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
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
An array of TObjects.
Definition: TObjArray.h:37
Mother of all ROOT objects.
Definition: TObject.h:37
Basic string class.
Definition: TString.h:131
This class implements a mutex interface.
Definition: TVirtualMutex.h:34
TLine * line
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
R__EXTERN TVirtualRWMutex * gCoreMutex
EFunctionMatchMode
Definition: TDictionary.h:152
@ kConversionMatch
Definition: TDictionary.h:154
RooCmdArg Offset(Bool_t flag=kTRUE)
static constexpr double s
CallFuncIFacePtr_t(Generic_t func)
Definition: TInterpreter.h:96
void(* Generic_t)(void *, int, void **, void *)
Definition: TInterpreter.h:90
void(* Dtor_t)(void *, unsigned long, int)
Definition: TInterpreter.h:92
void(* Ctor_t)(void **, void *, unsigned long)
Definition: TInterpreter.h:91
auto * m
Definition: textangle.C:8
static void output(int code)
Definition: gifencode.c:226