1    	// @(#)root/meta:$Id$
2    	// Author: Rene Brun   09/02/95
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   	#ifndef ROOT_TMethod
13   	#define ROOT_TMethod
14   	
15   	
16   	//////////////////////////////////////////////////////////////////////////
17   	//                                                                      //
18   	// TMethod                                                              //
19   	//                                                                      //
20   	// Dictionary of a member function (method).                            //
21   	//                                                                      //
22   	//////////////////////////////////////////////////////////////////////////
23   	
24   	#ifndef ROOT_TFunction
25   	#include "TFunction.h"
26   	#endif
27   	
28   	class TList;
29   	class TDataMember;
30   	class TMethodCall;
31   	class TClass;
32   	
33   	enum EMenuItemKind {
34   	   kMenuNoMenu = 0,
35   	   kMenuDialog,
36   	   kMenuToggle,
37   	   kMenuSubMenu
38   	};
39   	
40   	class TMethod : public TFunction {
41   	
42   	private:
43   	   TClass                 *fClass;           //pointer to the class
44   	   EMenuItemKind           fMenuItem;        //type of menuitem in context menu
45   	   TString                 fGetter;          //state getter in case this is a *TOGGLE method
46   	   TMethodCall            *fGetterMethod;    //methodcall for state getter in case this is a *TOGGLE method
47   	   TMethodCall            *fSetterMethod;    //methodcall for state setter in case this is a *TOGGLE method
48   	
49   	   void                    CreateSignature();
50   	
51   	public:
52   	                           TMethod(MethodInfo_t *info = 0, TClass *cl = 0);
53   	                           TMethod(const TMethod &org);
54   	   TMethod&                operator=(const TMethod &rhs);
55   	   virtual                ~TMethod();
56   	   virtual TObject        *Clone(const char *newname="") const;
57   	   TClass                 *GetClass() const { return fClass; }
58   	   EMenuItemKind           IsMenuItem() const { return fMenuItem; }
59   	   virtual const char     *GetCommentString();
60   	   virtual const char     *Getter() const { return fGetter; }
61   	   virtual TMethodCall    *GetterMethod();
62   	   virtual TMethodCall    *SetterMethod();
63   	   virtual TDataMember    *FindDataMember();
64   	   virtual TList          *GetListOfMethodArgs();
65   	   virtual void            SetMenuItem(EMenuItemKind menuItem) {fMenuItem=menuItem;}
66   	
67   	   ClassDef(TMethod,0)  //Dictionary for a class member function (method)
68   	};
69   	
70   	#endif
71