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