ROOT logo
// @(#)root/meta:$Id$
// Author: Rene Brun   09/02/95

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TMethod
#define ROOT_TMethod


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TMethod                                                              //
//                                                                      //
// Dictionary of a member function (method).                            //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TFunction
#include "TFunction.h"
#endif

class TList;
class TDataMember;
class TMethodCall;
class TClass;

enum EMenuItemKind {
   kMenuNoMenu = 0,
   kMenuDialog,
   kMenuToggle,
   kMenuSubMenu
};

class TMethod : public TFunction {

private:
   TClass                 *fClass;           //pointer to the class
   EMenuItemKind           fMenuItem;        //type of menuitem in context menu
   TString                 fGetter;          //state getter in case this is a *TOGGLE method
   TMethodCall            *fGetterMethod;    //methodcall for state getter in case this is a *TOGGLE method
   TMethodCall            *fSetterMethod;    //methodcall for state setter in case this is a *TOGGLE method

   void                    CreateSignature();

public:
                           TMethod(MethodInfo_t *info = 0, TClass *cl = 0);
                           TMethod(const TMethod &org);
   TMethod&                operator=(const TMethod &rhs);
   virtual                ~TMethod();
   virtual TObject        *Clone(const char *newname="") const;
   TClass                 *GetClass() const { return fClass; }
   EMenuItemKind           IsMenuItem() const { return fMenuItem; }
   virtual const char     *GetCommentString();
   virtual const char     *Getter() const { return fGetter; }
   virtual TMethodCall    *GetterMethod();
   virtual TMethodCall    *SetterMethod();
   virtual TDataMember    *FindDataMember();
   virtual TList          *GetListOfMethodArgs();
   virtual void            SetMenuItem(EMenuItemKind menuItem) {fMenuItem=menuItem;}

   ClassDef(TMethod,0)  //Dictionary for a class member function (method)
};

#endif
 TMethod.h:1
 TMethod.h:2
 TMethod.h:3
 TMethod.h:4
 TMethod.h:5
 TMethod.h:6
 TMethod.h:7
 TMethod.h:8
 TMethod.h:9
 TMethod.h:10
 TMethod.h:11
 TMethod.h:12
 TMethod.h:13
 TMethod.h:14
 TMethod.h:15
 TMethod.h:16
 TMethod.h:17
 TMethod.h:18
 TMethod.h:19
 TMethod.h:20
 TMethod.h:21
 TMethod.h:22
 TMethod.h:23
 TMethod.h:24
 TMethod.h:25
 TMethod.h:26
 TMethod.h:27
 TMethod.h:28
 TMethod.h:29
 TMethod.h:30
 TMethod.h:31
 TMethod.h:32
 TMethod.h:33
 TMethod.h:34
 TMethod.h:35
 TMethod.h:36
 TMethod.h:37
 TMethod.h:38
 TMethod.h:39
 TMethod.h:40
 TMethod.h:41
 TMethod.h:42
 TMethod.h:43
 TMethod.h:44
 TMethod.h:45
 TMethod.h:46
 TMethod.h:47
 TMethod.h:48
 TMethod.h:49
 TMethod.h:50
 TMethod.h:51
 TMethod.h:52
 TMethod.h:53
 TMethod.h:54
 TMethod.h:55
 TMethod.h:56
 TMethod.h:57
 TMethod.h:58
 TMethod.h:59
 TMethod.h:60
 TMethod.h:61
 TMethod.h:62
 TMethod.h:63
 TMethod.h:64
 TMethod.h:65
 TMethod.h:66
 TMethod.h:67
 TMethod.h:68
 TMethod.h:69
 TMethod.h:70