ROOT  6.06/09
Reference Guide
TGWin32InterpreterProxy.cxx
Go to the documentation of this file.
1 // @(#)root/meta:$Id: TGWin32InterpreterProxy.cxx 38517 2011-03-18 20:20:16Z pcanal $
2 // Author: Valeriy Onuchin 15/11/2003
3 
4 
5 /*************************************************************************
6  * Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. *
7  * All rights reserved. *
8  * *
9  * For the licensing terms see $ROOTSYS/LICENSE. *
10  * For the list of contributors see $ROOTSYS/README/CREDITS. *
11  *************************************************************************/
12 
13 
14 //////////////////////////////////////////////////////////////////////////
15 // //
16 // TGWin32InterpreterProxy //
17 // //
18 // This class defines thread-safe interface to a command line //
19 // interpreter (CINT). //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 
24 #include "TGWin32ProxyDefs.h"
26 #include "TROOT.h"
27 #include "TGWin32.h"
28 
29 #if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00)
30 
31 ////////////////////////////////////////////////////////////////////////////////
32 ////////////////////////////////////////////////////////////////////////////////
33 /// returns TCint object
34 
35 TInterpreter *TGWin32InterpreterProxy::RealObject()
36 {
37  return gROOT->GetInterpreter();
38 }
39 
40 RETURN_PROXY_OBJECT(Interpreter)
41 VOID_METHOD_ARG1(Interpreter,AddIncludePath,const char*,path,1)
42 RETURN_METHOD_ARG1(Interpreter,Int_t,AutoLoad,const char *,classname)
43 VOID_METHOD_ARG0(Interpreter,ClearFileBusy,1)
44 VOID_METHOD_ARG0(Interpreter,ClearStack,1)
45 RETURN_METHOD_ARG1(Interpreter,Bool_t,Declare,const char*, code)
46 VOID_METHOD_ARG0(Interpreter,EndOfLineAction,1)
47 VOID_METHOD_ARG0(Interpreter,EnableAutoLoading,1)
48 VOID_METHOD_ARG0(Interpreter,Initialize,0)
49 // Does not support references:
50 //VOID_METHOD_ARG3(Interpreter,InspectMembers,TMemberInspector&, insp, void*, obj, const TClass*,cl,1)
51 void _NAME4_(p2,Interpreter,InspectMembers,insp)(void *in)
52 {
53  struct tmp {
54  TMemberInspector *par1; void *par2; const TClass *par3;
55  };
56  tmp *p = (tmp*)in;
57  _NAME3_(TGWin32,Interpreter,Proxy)::RealObject()->InspectMembers(*p->par1,p->par2,p->par3);
58 }
59 
60 void TGWin32InterpreterProxy::InspectMembers(TMemberInspector& insp, void* obj, const TClass* cl)
61 {
62  DEBUG_PROFILE_PROXY_START(InspectMembers)
63  struct tmp {
64  TMemberInspector *par1; void *par2; const TClass *par3;
65  tmp(TMemberInspector *par1,void *par2,const TClass *par3):par1(par1),par2(par2),par3(par3) {}
66  };
67  fParam = new tmp(&insp,obj,cl);
68  fCallBack = &_NAME4_(p2,Interpreter,InspectMembers,insp);
69  Bool_t batch = ForwardCallBack(1);
70  // insp = ((tmp*)fParam)->par1;
71  obj = ((tmp*)fParam)->par2;
72  cl = ((tmp*)fParam)->par3;
73  if (!batch) delete fParam;
74  DEBUG_PROFILE_PROXY_STOP(InspectMembers)
75 }
76 
77 RETURN_METHOD_ARG3(Interpreter,TClass*,GenerateTClass,const char *,classname,Bool_t,emulation,Bool_t,silent);
78 RETURN_METHOD_ARG2(Interpreter,TClass*,GenerateTClass,ClassInfo_t *,classinfo,Bool_t,silent);
79 RETURN_METHOD_ARG3(Interpreter,Int_t,GenerateDictionary,const char*,classes,const char*,headers,const char*,options);
80 RETURN_METHOD_ARG0(Interpreter,char*,GetPrompt)
81 RETURN_METHOD_ARG0(Interpreter,const char*,GetSharedLibs)
82 RETURN_METHOD_ARG0(Interpreter,const char*,GetIncludePath)
83 RETURN_METHOD_ARG2(Interpreter,Int_t,Load,const char*,filenam,Bool_t,system)
84 RETURN_METHOD_ARG1(Interpreter,Int_t,LoadLibraryMap,const char*,rootmapfile)
85 RETURN_METHOD_ARG0(Interpreter,Int_t,RescanLibraryMap)
86 RETURN_METHOD_ARG0(Interpreter,Int_t,ReloadAllSharedLibraryMaps)
87 RETURN_METHOD_ARG0(Interpreter,Int_t,UnloadAllSharedLibraryMaps)
88 RETURN_METHOD_ARG1(Interpreter,Int_t,UnloadLibraryMap,const char*,library)
89 VOID_METHOD_ARG2(Interpreter,LoadMacro,const char*,filename,TInterpreter::EErrorCode*,error,1)
90 RETURN_METHOD_ARG2(Interpreter,Long_t,ProcessLine,const char*,line,TInterpreter::EErrorCode*,error)
91 RETURN_METHOD_ARG2(Interpreter,Long_t,ProcessLineSynch,const char*,line,TInterpreter::EErrorCode*,error)
92 VOID_METHOD_ARG0(Interpreter,PrintIntro,1)
93 typedef const char* (*GetlineFunc_t)(const char* prompt);
94 typedef void (*HistaddFunc_t)(const char* line);
95 RETURN_METHOD_ARG2(Interpreter,Int_t,SetClassSharedLibs,const char*,cls,const char*,libs);
96 VOID_METHOD_ARG2(Interpreter,SetGetline,GetlineFunc_t, getlineFunc,\
97  HistaddFunc_t, histaddFunc, 1)
98 VOID_METHOD_ARG0(Interpreter,Reset,1)
99 VOID_METHOD_ARG0(Interpreter,ResetAll,1)
100 VOID_METHOD_ARG0(Interpreter,ResetGlobals,1)
101 VOID_METHOD_ARG1(Interpreter,ResetGlobalVar,void*,obj,1)
102 VOID_METHOD_ARG0(Interpreter,RewindDictionary,1)
103 RETURN_METHOD_ARG1(Interpreter,Int_t,DeleteGlobal,void*,obj)
104 RETURN_METHOD_ARG1(Interpreter,Int_t,DeleteVariable,const char*,name)
105 VOID_METHOD_ARG0(Interpreter,SaveContext,1)
106 VOID_METHOD_ARG0(Interpreter,SaveGlobalsContext,1)
107 VOID_METHOD_ARG0_LOCK(Interpreter,UpdateListOfGlobals)
108 VOID_METHOD_ARG0_LOCK(Interpreter,UpdateListOfGlobalFunctions)
109 VOID_METHOD_ARG0_LOCK(Interpreter,UpdateListOfTypes)
110 VOID_METHOD_ARG2_LOCK(Interpreter,SetClassInfo,TClass*,cl,Bool_t,reload)
111 RETURN_METHOD_ARG3(Interpreter,Bool_t,CheckClassInfo,const char*,name,Bool_t,autoload,Bool_t,isClassOrNamespaceOnly)
112 RETURN_METHOD_ARG1(Interpreter,Bool_t,CheckClassTemplate,const char*,name)
113 RETURN_METHOD_ARG2(Interpreter,Long_t,Calc,const char*,line,TInterpreter::EErrorCode*,error)
114 VOID_METHOD_ARG1_LOCK(Interpreter,CreateListOfBaseClasses,TClass*,cl)
115 VOID_METHOD_ARG1_LOCK(Interpreter,CreateListOfDataMembers,TClass*,cl)
116 VOID_METHOD_ARG1_LOCK(Interpreter,CreateListOfMethods,TClass*,cl)
117 VOID_METHOD_ARG1_LOCK(Interpreter,CreateListOfMethodArgs,TFunction*,m)
118 VOID_METHOD_ARG1_LOCK(Interpreter,UpdateListOfMethods,TClass*,cl)
119 RETURN_METHOD_ARG3(Interpreter,TString,GetMangledName,TClass*,cl,const char*,method,const char*,params)
120 RETURN_METHOD_ARG3(Interpreter,TString,GetMangledNameWithPrototype,TClass*,cl,const char*,method,const char*,proto)
121 RETURN_METHOD_ARG3(Interpreter,void*,GetInterfaceMethod,TClass*,cl,const char*,method,const char*,params)
122 RETURN_METHOD_ARG3(Interpreter,void*,GetInterfaceMethodWithPrototype,TClass*,cl,const char*,method,const char*,proto)
123 RETURN_METHOD_ARG1(Interpreter,const char*,GetClassSharedLibs,const char*,s)
124 RETURN_METHOD_ARG1(Interpreter,const char*,GetSharedLibDeps,const char*,s)
125 RETURN_METHOD_ARG2(Interpreter,const char*,GetInterpreterTypeName,const char*,s,Bool_t,full)
126 VOID_METHOD_ARG3(Interpreter,Execute,const char*,function,const char*,params,int*,error,1)
127 VOID_METHOD_ARG5(Interpreter,Execute,TObject*,obj,TClass*,cl,const char*,method,const char*,params,int*,error,1)
128 VOID_METHOD_ARG5(Interpreter,Execute,TObject*,object,TClass*,cl,TMethod*,method,TObjArray*,params,int*,error,1)
129 RETURN_METHOD_ARG2(Interpreter,Long_t,ExecuteMacro,const char*,filename,TInterpreter::EErrorCode*,error)
130 RETURN_METHOD_ARG1(Interpreter,Bool_t,SetErrorMessages,Bool_t,enable)
131 VOID_METHOD_ARG1(Interpreter,SetProcessLineLock,Bool_t,lock,1)
132 RETURN_METHOD_ARG1(Interpreter,const char*,TypeName,const char*,s)
133 //Bool_t TGWin32InterpreterProxy::CheckClassInfo(const char* name) { return RealObject()->CheckClassInfo(name); }
134 
135 #endif
#define RETURN_METHOD_ARG3(klass, type, method, type1, par1, type2, par2, type3, par3)
#define VOID_METHOD_ARG2(klass, method, type1, par1, type2, par2, sync)
This class defines an abstract interface to a generic command line interpreter.
Definition: TInterpreter.h:50
void Proxy()
Definition: Proxy.C:4
#define RETURN_PROXY_OBJECT(klass)
#define _NAME3_(name1, name2, name3)
Definition: RConfig.h:410
#define RETURN_METHOD_ARG0(klass, type, method)
#define gROOT
Definition: TROOT.h:340
Abstract base class for accessing the data-members of a class.
This class is the basic interface to the Win32 graphics system.
Definition: TGWin32.h:80
#define VOID_METHOD_ARG1_LOCK(klass, method, type1, par1)
#define VOID_METHOD_ARG0(klass, method, sync)
#define _NAME4_(name1, name2, name3, name4)
#define DEBUG_PROFILE_PROXY_STOP(method)
#define VOID_METHOD_ARG2_LOCK(klass, method, type1, par1, type2, par2)
#define VOID_METHOD_ARG0_LOCK(klass, method)
#define RETURN_METHOD_ARG1(klass, type, method, type1, par1)
#define VOID_METHOD_ARG1(klass, method, type1, par1, sync)
TMarker * m
Definition: textangle.C:8
RETURN_METHOD_ARG2(VirtualX, Bool_t, IsDNDAware, Window_t, win, Atom_t *, typelist)
VOID_METHOD_ARG3(VirtualX, SetTypeList, Window_t, win, Atom_t, prop, Atom_t *, typelist, 1)
#define VOID_METHOD_ARG5(klass, method, type1, par1, type2, par2, type3, par3, type4, par4, type5, par5, sync)
#define DEBUG_PROFILE_PROXY_START(method)