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