ROOT  6.06/09
Reference Guide
TGWin32InterpreterProxy.h
Go to the documentation of this file.
1 // $Id: TGWin32InterpreterProxy.h,v 1.15 2007/03/08 15:52:17 rdm Exp $
2 // Author: Valeriy Onuchin 15/11/03
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_TGWin32InterpreterProxy
14 #define ROOT_TGWin32InterpreterProxy
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TGWin32InterpreterProxy //
19 // //
20 // This class defines thread-safe interface to a command line //
21 // interpreter. //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #ifndef ROOT_TInterpreter
26 #include "TInterpreter.h"
27 #endif
28 
29 #if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00)
30 
31 #ifndef ROOT_TGWin32ProxyBase
32 #include "TGWin32ProxyBase.h"
33 #endif
34 
35 
36 class TGWin32InterpreterProxy : public TInterpreter , public TGWin32ProxyBase {
37 
38 protected:
39  void Execute(TMethod *method, TObjArray *params, int *error = 0) {}
40 
41 public:
42 
43  TGWin32InterpreterProxy() { fMaxResponseTime = 1000000; fIsVirtualX = kFALSE; }
44  TGWin32InterpreterProxy(const char *name, const char *title = "Generic Interpreter") {}
45  virtual ~TGWin32InterpreterProxy() {}
46 
47  void AddIncludePath(const char *path);
48  Int_t AutoLoad(const char *classname);
49  void ClearFileBusy();
50  void ClearStack();
51  Bool_t Declare(const char* code);
52  void EnableAutoLoading();
53  void EndOfLineAction();
54  void Initialize();
55  void InspectMembers(TMemberInspector&, void* obj, const TClass* cl);
56  Int_t Load(const char *filenam, Bool_t system = kFALSE);
57  void LoadMacro(const char *filename, EErrorCode *error = 0);
58  Int_t LoadLibraryMap(const char *rootmapfile = 0);
62  Int_t UnloadLibraryMap(const char *library);
63  Long_t ProcessLine(const char *line, EErrorCode *error = 0);
64  Long_t ProcessLineSynch(const char *line, EErrorCode *error = 0);
65  void PrintIntro();
66  Int_t SetClassSharedLibs(const char *cls, const char *libs);
67  void SetGetline(const char*(*getlineFunc)(const char* prompt),
68  void (*histaddFunc)(const char* line));
69  void Reset();
70  void ResetAll();
71  void ResetGlobals();
72  void ResetGlobalVar(void *obj);
73  void RewindDictionary();
74  Int_t DeleteGlobal(void *obj);
75  Int_t DeleteVariable(const char *name);
76  void SaveContext();
77  void SaveGlobalsContext();
78  void UpdateListOfGlobals();
80  void UpdateListOfTypes();
81  void SetClassInfo(TClass *cl, Bool_t reload = kFALSE);
82  Bool_t CheckClassInfo(const char *name, Bool_t autoload, Bool_t isClassOrNamespaceOnly = kFALSE);
83  Bool_t CheckClassTemplate(const char *name);
84  Long_t Calc(const char *line, EErrorCode* error = 0);
87  void CreateListOfMethods(TClass *cl);
88  void UpdateListOfMethods(TClass *cl);
90  TString GetMangledName(TClass *cl, const char *method, const char *params);
91  TString GetMangledNameWithPrototype(TClass *cl, const char *method, const char *proto);
92  Long_t ExecuteMacro(const char *filename, EErrorCode *error = 0);
93  Bool_t IsErrorMessagesEnabled() const { return RealObject()->IsErrorMessagesEnabled(); }
95  Bool_t IsProcessLineLocked() const { return RealObject()->IsProcessLineLocked(); }
96  void SetProcessLineLock(Bool_t lock = kTRUE);
97  Int_t GetExitCode() const { return RealObject()->GetExitCode(); }
98  TClass *GenerateTClass(const char *classname, Bool_t emulation, Bool_t silent = kFALSE);
99  TClass *GenerateTClass(ClassInfo_t *classinfo, Bool_t silent = kFALSE);
100  Int_t GenerateDictionary(const char *classes, const char *includes = 0, const char *options = 0);
101  Int_t GetMore() const { return RealObject()->GetMore(); }
102  Bool_t IsLoaded(const char *filename) const { return RealObject()->IsLoaded(filename); }
103  char *GetPrompt();
104  void *GetInterfaceMethod(TClass *cl, const char *method, const char *params);
105  void *GetInterfaceMethodWithPrototype(TClass *cl, const char *method, const char *proto);
106  void GetInterpreterTypeName(const char*,std::string &output,Bool_t=kFALSE);
107  void Execute(const char *function, const char *params, int *error = 0);
108  void Execute(TObject *obj, TClass *cl, const char *method, const char *params, int *error = 0);
109  void Execute(TObject *obj, TClass *cl, TMethod *method, TObjArray *params, int *error = 0);
110  const char *GetSharedLibs();
111  const char *GetClassSharedLibs(const char *cls);
112  const char *GetSharedLibDeps(const char *lib);
113  const char *GetIncludePath();
114  TObjArray *GetRootMapFiles() const { return RealObject()->GetRootMapFiles(); }
115  const char *TypeName(const char *s);
116 
117  static TInterpreter *RealObject();
118  static TInterpreter *ProxyObject();
119 };
120 
121 #endif
122 
123 #endif
virtual void Execute(TMethod *method, TObjArray *params, int *error=0)=0
Execute method on this object with parameters stored in the TObjArray.
virtual void ResetAll()=0
virtual void LoadMacro(const char *filename, EErrorCode *error=0)=0
This class defines an abstract interface to a generic command line interpreter.
Definition: TInterpreter.h:50
An array of TObjects.
Definition: TObjArray.h:39
virtual void UpdateListOfTypes()=0
TLine * line
virtual void GetInterpreterTypeName(const char *name, std::string &output, Bool_t full=kFALSE)=0
virtual void RewindDictionary()=0
virtual Int_t DeleteVariable(const char *name)=0
virtual void UpdateListOfGlobalFunctions()=0
virtual TObjArray * GetRootMapFiles() const =0
virtual Int_t GenerateDictionary(const char *classes, const char *includes=0, const char *options=0)=0
Basic string class.
Definition: TString.h:137
virtual void UpdateListOfGlobals()=0
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
Abstract base class for accessing the data-members of a class.
virtual void SetGetline(const char *(*getlineFunc)(const char *prompt), void(*histaddFunc)(const char *line))=0
virtual Int_t DeleteGlobal(void *obj)=0
virtual void ResetGlobalVar(void *obj)=0
virtual void PrintIntro()=0
virtual void EndOfLineAction()=0
virtual void ClearFileBusy()=0
virtual TClass * GenerateTClass(const char *classname, Bool_t emulation, Bool_t silent=kFALSE)=0
virtual TString GetMangledNameWithPrototype(TClass *cl, const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode=ROOT::kConversionMatch)=0
virtual Bool_t Declare(const char *code)=0
virtual Int_t AutoLoad(const char *classname, Bool_t knowDictNotLoaded=kFALSE)=0
virtual Int_t RescanLibraryMap()=0
virtual void EnableAutoLoading()=0
virtual Int_t GetMore() const =0
virtual void * GetInterfaceMethod(TClass *cl, const char *method, const char *params, Bool_t objectIsConst=kFALSE)=0
virtual Long_t ProcessLineSynch(const char *line, EErrorCode *error=0)=0
virtual void SetClassInfo(TClass *cl, Bool_t reload=kFALSE)=0
virtual const char * TypeName(const char *s)=0
virtual const char * GetSharedLibs()=0
virtual const char * GetIncludePath()=0
virtual Int_t ReloadAllSharedLibraryMaps()=0
virtual Int_t UnloadLibraryMap(const char *library)=0
virtual Bool_t IsLoaded(const char *filename) const =0
void Initialize(Bool_t useTMVAStyle=kTRUE)
Definition: tmvaglob.cxx:176
virtual void ResetGlobals()=0
virtual void InspectMembers(TMemberInspector &, const void *obj, const TClass *cl, Bool_t isTransient)=0
virtual void CreateListOfMethods(TClass *cl) const =0
TMarker * m
Definition: textangle.C:8
virtual void SetProcessLineLock(Bool_t lock=kTRUE)=0
virtual Int_t LoadLibraryMap(const char *rootmapfile=0)=0
virtual void CreateListOfMethodArgs(TFunction *m) const =0
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
virtual void SaveContext()=0
void Reset(Detail::TBranchProxy *x)
virtual Int_t Load(const char *filenam, Bool_t system=kFALSE)=0
virtual Bool_t CheckClassTemplate(const char *name)=0
long Long_t
Definition: RtypesCore.h:50
virtual Bool_t IsErrorMessagesEnabled() const =0
virtual char * GetPrompt()=0
virtual Long_t Calc(const char *line, EErrorCode *error=0)=0
virtual Int_t UnloadAllSharedLibraryMaps()=0
virtual Long_t ProcessLine(const char *line, EErrorCode *error=0)=0
virtual Long_t ExecuteMacro(const char *filename, EErrorCode *error=0)=0
virtual void SaveGlobalsContext()=0
#define name(a, b)
Definition: linkTestLib0.cpp:5
Mother of all ROOT objects.
Definition: TObject.h:58
virtual void ClearStack()=0
Global functions class (global functions are obtained from CINT).
Definition: TFunction.h:30
virtual Int_t SetClassSharedLibs(const char *cls, const char *libs)=0
virtual void CreateListOfBaseClasses(TClass *cl) const =0
virtual Bool_t IsProcessLineLocked() const =0
Each ROOT class (see TClass) has a linked list of methods.
Definition: TMethod.h:40
virtual TString GetMangledName(TClass *cl, const char *method, const char *params, Bool_t objectIsConst=kFALSE)=0
virtual Bool_t CheckClassInfo(const char *name, Bool_t autoload, Bool_t isClassOrNamespaceOnly=kFALSE)=0
virtual void AddIncludePath(const char *path)=0
static void output(int code)
Definition: gifencode.c:226
const Bool_t kTRUE
Definition: Rtypes.h:91
TObject * obj
virtual void * GetInterfaceMethodWithPrototype(TClass *cl, const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode=ROOT::kConversionMatch)=0
virtual const char * GetSharedLibDeps(const char *lib)=0
virtual Int_t GetExitCode() const =0
virtual void CreateListOfDataMembers(TClass *cl) const =0
virtual Bool_t SetErrorMessages(Bool_t enable=kTRUE)=0
virtual void UpdateListOfMethods(TClass *cl) const =0
virtual const char * GetClassSharedLibs(const char *cls)=0