1    	/* /% C++ %/ */
2    	/***********************************************************************
3    	 * cint (C/C++ interpreter)
4    	 ************************************************************************
5    	 * Header file Api.h
6    	 ************************************************************************
7    	 * Description:
8    	 *  Extended Run Time Type Identification API
9    	 *   -I$(CINTSYSDIR) -I$(CINTSYSDIR)/src must be given at compile time
10   	 ************************************************************************
11   	 * Copyright(c) 1995~1999  Masaharu Goto
12   	 *
13   	 * For the licensing terms see the file COPYING
14   	 *
15   	 ************************************************************************/
16   	
17   	#ifndef G__API_H
18   	#define G__API_H
19   	
20   	/*********************************************************************
21   	* include header files
22   	*********************************************************************/
23   	
24   	#ifndef G__API
25   	#define G__API
26   	#endif
27   	#include "G__ci.h"
28   	#ifdef __MAKECINT__
29   	#pragma link off all classes;
30   	#pragma link off all functions;
31   	#pragma link off all globals;
32   	#pragma link off all typedefs;
33   	#endif
34   	
35   	#define G__INFO_BUFLEN 50
36   	/* #define G__INFO_TITLELEN 256 */
37   	#define G__INFO_TITLELEN G__ONELINE
38   	
39   	#ifndef G__PROPERTY_H
40   	#include "Property.h"
41   	#endif
42   	#ifndef G__CLASSINFO_H
43   	#include "Class.h"
44   	#endif
45   	#ifndef G__BaseClassInfo_H
46   	#include "BaseCls.h"
47   	#endif
48   	#ifndef G__TYPEINFOX_H
49   	#include "Type.h"
50   	#endif
51   	#ifndef G__METHODINFO_H
52   	#include "Method.h"
53   	#endif
54   	#ifndef G__METHODARGINFO_H
55   	#include "MethodAr.h"
56   	#endif
57   	#ifndef G__DATAMEMBER_H
58   	#include "DataMbr.h"
59   	#endif
60   	#ifndef G__CALLFUNC_H
61   	#include "CallFunc.h"
62   	#endif
63   	#ifndef G__TYPEDEFINFO_H
64   	#include "Typedf.h"
65   	#endif
66   	#ifndef G__TOKENINFO_H
67   	#include "Token.h"
68   	#endif
69   	
70   	#include <vector>
71   	#include <string>
72   	
73   	#ifndef __CINT__
74   	struct G__includepath;
75   	#endif
76   	
77   	extern "C" {
78   	#ifndef __CINT__
79   	G__EXPORT
80   	#endif
81   	int G__Lsizeof(const char *typenamein);
82   	}
83   	
84   	struct G__ConstStringList;
85   	struct G__Preprocessfilekey;
86   	struct G__Deffuncmacro;
87   	struct G__Definedtemplateclass;
88   	struct G__Definetemplatefunc;
89   	
90   	/*********************************************************************
91   	 * scratch upto dictionary position
92   	 *********************************************************************/
93   	struct G__dictposition {
94   	   /* global variable table position */
95   	   struct G__var_array *var;
96   	   int ig15;
97   	   /* struct tagnum */
98   	   int tagnum;
99   	   /* const string table */
100  	   struct G__ConstStringList *conststringpos;
101  	   /* typedef table */
102  	   int typenum;
103  	   /* global function table position */
104  	   struct G__ifunc_table *ifunc;
105  	   int ifn;
106  	   /* include path */
107  	   struct G__includepath *ipath;
108  	   /* shared library file */
109  	   int allsl;
110  	   /* preprocessfilekey */
111  	   struct G__Preprocessfilekey *preprocessfilekey;
112  	   /* input file */
113  	   int nfile;
114  	   /* macro table */
115  	   struct G__Deffuncmacro *deffuncmacro;
116  	   /* template class */
117  	   struct G__Definedtemplateclass *definedtemplateclass;
118  	   /* function template */
119  	   struct G__Definetemplatefunc *definedtemplatefunc;
120  	   
121  	   int nactives; /* number of 'active' classes */
122  	};
123  	
124  	namespace Cint {
125  	
126  	/*********************************************************************
127  	* $xxx object resolution function, pointer to a class object
128  	*
129  	* Usage:
130  	*
131  	*  void YourGetObject(char *name,G__ClassInfo *type) {
132  	*     void *p;
133  	*     // Whatever you want to fill type and pointetr to the object info
134  	*     return(p);
135  	*  }
136  	*
137  	*  ROOT_Initialization() {
138  	*     // set pointer to yourown interface method
139  	*     G__InitGetSpecialObject(YourGetObject);
140  	*  }
141  	*********************************************************************/
142  	typedef void *(*G__pMethodSpecialObject)(char *item,G__ClassInfo *typeinfo
143  	                                         ,void** pptr,void** ppdict);
144  	#ifndef __CINT__
145  	G__EXPORT
146  	#endif
147  	void G__InitGetSpecialObject(G__pMethodSpecialObject pmethod);
148  	
149  	/*********************************************************************
150  	* $xxx object resolution function, Generic
151  	*********************************************************************/
152  	typedef void (*G__pMethodSpecialValue)(char *item,G__TypeInfo *typeinfo
153  	                                       ,long *pl,double *pd,void** pptr
154  	                                       ,void** ppdict);
155  	#ifndef __CINT__
156  	G__EXPORT
157  	#endif
158  	void G__InitGetSpecialValue(G__pMethodSpecialValue pmethod);
159  	
160  	
161  	#ifndef __CINT__
162  	G__EXPORT
163  	#endif
164  	int G__SetGlobalcomp(char *funcname,char *param,int globalcomp); // Method.cxx
165  	int G__SetForceStub(char *funcname,char *param); // Method.cxx
166  	
167  	#ifndef __CINT__
168  	G__EXPORT
169  	#endif
170  	int G__ForceBytecodecompilation(char *funcname,char *param); // Method.cxx
171  	
172  	/*********************************************************************
173  	* Feedback routine in case tagnum for a class changes (in case the
174  	* dictionary of a shared lib is being re-initialized).
175  	*********************************************************************/
176  	typedef void (*G__pMethodUpdateClassInfo)(char *item,long tagnum);
177  	
178  	#ifndef __CINT__
179  	G__EXPORT
180  	#endif
181  	void G__InitUpdateClassInfo(G__pMethodUpdateClassInfo pmethod);
182  	
183  	#ifndef __CINT__
184  	G__EXPORT
185  	#endif
186  	void* G__new_interpreted_object(int size);
187  	
188  	#ifndef __CINT__
189  	G__EXPORT
190  	#endif
191  	void G__delete_interpreted_object(void* p);
192  	
193  	/*********************************************************************
194  	* Generate dictionary.
195  	*********************************************************************/
196  	   typedef int (*G__pGenerateDictionary)(const std::string &className,const std::vector<std::string> &headers, const std::vector<std::string> &fwdDecls, const std::vector<std::string> &unknown);
197  	
198  	#ifndef __CINT__
199  	G__EXPORT
200  	#endif
201  	void G__InitGenerateDictionary( G__pGenerateDictionary gdict );
202  	
203  	#ifndef __CINT__
204  	G__EXPORT
205  	#endif
206  	G__pGenerateDictionary G__GetGenerateDictionary();
207  	
208  	
209  	/*********************************************************************
210  	* G__SourceFileInfo
211  	*********************************************************************/
212  	class
213  	#ifndef __CINT__
214  	G__EXPORT
215  	#endif
216  	G__SourceFileInfo {
217  	 public:
218  	  G__SourceFileInfo(): filen(0) { Init(); }
219  	  G__SourceFileInfo(int filenin): filen(filenin) { }
220  	  G__SourceFileInfo(const char* fname): filen(0) { Init(fname); }
221  	  ~G__SourceFileInfo() { }
222  	  void Init() {
223  	    filen = -1;
224  	  }
225  	  void Init(const char* fname);
226  	  const char *Name();
227  	  const char *Prepname();
228  	  FILE* fp();
229  	  int MaxLine();
230  	  G__SourceFileInfo& IncludedFrom();
231  	  long Property();
232  	  int IsValid();
233  	  int Next();
234  	
235  	  static int SerialNumber();
236  	 private:
237  	  int filen;
238  	};
239  	
240  	/*********************************************************************
241  	* G__IncludePathInfo
242  	*********************************************************************/
243  	class
244  	#ifndef __CINT__
245  	G__EXPORT
246  	#endif
247  	G__IncludePathInfo {
248  	 public:
249  	  G__IncludePathInfo(): p(NULL) { Init(); }
250  	#ifndef __CINT__
251  	  G__IncludePathInfo(const G__IncludePathInfo& ipf): p(ipf.p) {}
252  	#endif
253  	  ~G__IncludePathInfo() { }
254  	  void Init() { p=(struct G__includepath*)NULL; }
255  	  const char *Name();
256  	  long Property();
257  	  int IsValid();
258  	  int Next();
259  	 private:
260  	  G__IncludePathInfo& operator=(const G__IncludePathInfo&);
261  	#ifndef __CINT__
262  	  struct G__includepath *p;
263  	#endif
264  	};
265  	
266  	#ifdef G__EXCEPTIONWRAPPER
267  	/*********************************************************************
268  	* G__ExceptionWrapper
269  	*********************************************************************/
270  	int G__ExceptionWrapper(G__InterfaceMethod funcp
271  	                        ,G__value* result7
272  	                        ,char* funcname
273  	                        ,struct G__param *libp
274  	                        ,int hash);
275  	#endif
276  	
277  	unsigned long G__long_random(unsigned long limit);
278  	   
279  	
280  	
281  	/*********************************************************************
282  	* External readline interface
283  	*********************************************************************/
284  	typedef const char* (*G__pGetline_t)(const char* prompt);
285  	typedef void  (*G__pHistadd_t)(const char* line);
286  	
287  	#ifndef __CINT__
288  	G__EXPORT
289  	#endif
290  	G__pGetline_t G__GetGetlineFunc();
291  	
292  	#ifndef __CINT__
293  	G__EXPORT
294  	#endif
295  	G__pHistadd_t G__GetHistaddFunc();
296  	
297  	#ifndef __CINT__
298  	G__EXPORT
299  	#endif
300  	   void G__SetGetlineFunc(G__pGetline_t glfcn, G__pHistadd_t hafcn);
301  	
302  	} // namespace Cint
303  	
304  	using namespace Cint;
305  	
306  	#ifdef __MAKECINT__
307  	#pragma link off class $G__value;
308  	#pragma link off class $G__COMPLETIONLIST;
309  	#pragma link off class $G__linked_taginfo;
310  	#pragma link off class G__includepath;
311  	#pragma link C++ namespace Cint;
312  	#pragma link C++ nestedclasses;
313  	#pragma link off namespace Cint::Internal;
314  	#endif
315  	
316  	#endif
317