File indexing completed on 2025-01-18 10:12:16
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TMethod
0013 #define ROOT_TMethod
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "TFunction.h"
0025
0026 class TList;
0027 class TDataMember;
0028 class TMethodCall;
0029 class TClass;
0030
0031 enum EMenuItemKind {
0032 kMenuNoMenu = 0,
0033 kMenuDialog,
0034 kMenuToggle,
0035 kMenuSubMenu
0036 };
0037
0038 class TMethod : public TFunction {
0039
0040 private:
0041 TClass *fClass;
0042 EMenuItemKind fMenuItem;
0043 TString fGetter;
0044 TMethodCall *fGetterMethod;
0045 TMethodCall *fSetterMethod;
0046
0047 void CreateSignature() override;
0048 void SetMenuItem(const char *docstring);
0049 public:
0050 TMethod(MethodInfo_t *info = nullptr, TClass *cl = nullptr);
0051 TMethod(const TMethod &org);
0052 virtual ~TMethod();
0053 TMethod& operator=(const TMethod &rhs);
0054 TObject *Clone(const char *newname="") const override;
0055 TClass *GetClass() const { return fClass; }
0056 EMenuItemKind IsMenuItem() const { return fMenuItem; }
0057 Bool_t IsValid() override;
0058 virtual const char *GetCommentString();
0059 virtual const char *Getter() const { return fGetter; }
0060 virtual TMethodCall *GetterMethod();
0061 virtual TMethodCall *SetterMethod();
0062 virtual TDataMember *FindDataMember();
0063 virtual TList *GetListOfMethodArgs();
0064 virtual void SetMenuItem(EMenuItemKind menuItem) { fMenuItem = menuItem; }
0065
0066 Bool_t Update(MethodInfo_t *info) override;
0067
0068 ClassDefOverride(TMethod,0)
0069 };
0070
0071 #endif