TGWin32InterpreterProxy.h

Go to the documentation of this file.
00001 // $Id: TGWin32InterpreterProxy.h,v 1.15 2007/03/08 15:52:17 rdm Exp $
00002 // Author: Valeriy Onuchin  15/11/03
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 
00013 #ifndef ROOT_TGWin32InterpreterProxy
00014 #define ROOT_TGWin32InterpreterProxy
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TGWin32InterpreterProxy                                              //
00019 //                                                                      //
00020 // This class defines thread-safe interface to a command line           //
00021 // interpreter.                                                         //
00022 //                                                                      //
00023 //////////////////////////////////////////////////////////////////////////
00024 
00025 #ifndef ROOT_TInterpreter
00026 #include "TInterpreter.h"
00027 #endif
00028 
00029 #ifndef ROOT_TGWin32ProxyBase
00030 #include "TGWin32ProxyBase.h"
00031 #endif
00032 
00033 
00034 class TGWin32InterpreterProxy : public TInterpreter , public TGWin32ProxyBase {
00035 
00036 protected:
00037    void Execute(TMethod *method, TObjArray *params, int *error = 0) {}
00038 
00039 public:
00040 
00041    TGWin32InterpreterProxy() { fMaxResponseTime = 1000000; fIsVirtualX = kFALSE; }
00042    TGWin32InterpreterProxy(const char *name, const char *title = "Generic Interpreter") {}
00043    virtual ~TGWin32InterpreterProxy() {}
00044 
00045    void     AddIncludePath(const char *path);
00046    Int_t    AutoLoad(const char *classname);
00047    void     ClearFileBusy();
00048    void     ClearStack();
00049    void     EnableAutoLoading();
00050    void     EndOfLineAction();
00051    Int_t    InitializeDictionaries();
00052    Int_t    Load(const char *filenam, Bool_t system = kFALSE);
00053    void     LoadMacro(const char *filename, EErrorCode *error = 0);
00054    Int_t    LoadLibraryMap(const char *rootmapfile = 0);
00055    Int_t    RescanLibraryMap();
00056    Int_t    ReloadAllSharedLibraryMaps();
00057    Int_t    UnloadAllSharedLibraryMaps();
00058    Int_t    UnloadLibraryMap(const char *library);
00059    Long_t   ProcessLine(const char *line, EErrorCode *error = 0);
00060    Long_t   ProcessLineSynch(const char *line, EErrorCode *error = 0);
00061    void     PrintIntro();
00062    void     SetGetline(char*(*getlineFunc)(const char* prompt),
00063                        void (*histaddFunc)(char* line));
00064    void     Reset();
00065    void     ResetAll();
00066    void     ResetGlobals();
00067    void     RewindDictionary();
00068    Int_t    DeleteGlobal(void *obj);
00069    void     SaveContext();
00070    void     SaveGlobalsContext();
00071    void     UpdateListOfGlobals();
00072    void     UpdateListOfGlobalFunctions();
00073    void     UpdateListOfTypes();
00074    void     SetClassInfo(TClass *cl, Bool_t reload = kFALSE);
00075    Bool_t   CheckClassInfo(const char *name, Bool_t autoload = kTRUE);
00076    Long_t   Calc(const char *line, EErrorCode* error = 0);
00077    void     CreateListOfBaseClasses(TClass *cl);
00078    void     CreateListOfDataMembers(TClass *cl);
00079    void     CreateListOfMethods(TClass *cl);
00080    void     UpdateListOfMethods(TClass *cl);
00081    void     CreateListOfMethodArgs(TFunction *m);
00082    TString  GetMangledName(TClass *cl, const char *method, const char *params);
00083    TString  GetMangledNameWithPrototype(TClass *cl, const char *method, const char *proto);
00084    Long_t   ExecuteMacro(const char *filename, EErrorCode *error = 0);
00085    Bool_t   IsErrorMessagesEnabled() const { return RealObject()->IsErrorMessagesEnabled(); }
00086    Bool_t   SetErrorMessages(Bool_t enable = kTRUE);
00087    Bool_t   IsProcessLineLocked() const { return RealObject()->IsProcessLineLocked(); }
00088    void     SetProcessLineLock(Bool_t lock = kTRUE);
00089    Int_t    GetExitCode() const { return RealObject()->GetExitCode(); }
00090    Int_t    GenerateDictionary(const char *classes, const char *includes = 0, const char *options = 0); 
00091    Int_t    GetMore() const {  return RealObject()->GetMore(); }
00092    Bool_t   IsLoaded(const char *filename) const {  return RealObject()->IsLoaded(filename); }
00093    char    *GetPrompt();
00094    void    *GetInterfaceMethod(TClass *cl, const char *method, const char *params);
00095    void    *GetInterfaceMethodWithPrototype(TClass *cl, const char *method, const char *proto);
00096    const char *GetInterpreterTypeName(const char*,Bool_t=kFALSE);
00097    void     Execute(const char *function, const char *params, int *error = 0);
00098    void     Execute(TObject *obj, TClass *cl, const char *method, const char *params, int *error = 0);
00099    void     Execute(TObject *obj, TClass *cl, TMethod *method, TObjArray *params, int *error = 0);
00100    const char *GetSharedLibs();
00101    const char *GetClassSharedLibs(const char *cls);
00102    const char *GetSharedLibDeps(const char *lib);
00103    const char *GetIncludePath();
00104    TObjArray  *GetRootMapFiles() const { return RealObject()->GetRootMapFiles(); }
00105    const char *TypeName(const char *s);
00106 
00107    static TInterpreter *RealObject();
00108    static TInterpreter *ProxyObject();
00109 };
00110 
00111 #endif

Generated on Tue Jul 5 14:14:43 2011 for ROOT_528-00b_version by  doxygen 1.5.1