Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMethodArg.h
Go to the documentation of this file.
1// @(#)root/meta:$Id$
2// Author: Rene Brun 04/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_TMethodArg
13#define ROOT_TMethodArg
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TMethodArg //
19// //
20// Dictionary interface for a method argument. //
21// //
22//////////////////////////////////////////////////////////////////////////
23
24#include "TDictionary.h"
25#include <string>
26
27#ifdef R__LESS_INCLUDES
28class TDataMember;
29#else
30#include "TDataMember.h"
31#endif
32
33class TFunction;
34class TMethod;
35
36class TMethodArg : public TDictionary {
37
38friend class TMethod;
39
40private:
41 TMethodArg(const TMethodArg&) = delete;
42 TMethodArg& operator=(const TMethodArg&) = delete;
43
44 MethodArgInfo_t *fInfo; //pointer to CINT method argument info
45 TFunction *fMethod; //pointer to the method or global function
46 TDataMember *fDataMember; //TDataMember pointed by this arg,to get values and options from.
47
48public:
49 TMethodArg(MethodArgInfo_t *info = nullptr, TFunction *method = nullptr);
50 virtual ~TMethodArg();
51 const char *GetDefault() const;
52 TFunction *GetMethod() const { return fMethod; }
53 const char *GetTypeName() const;
54 const char *GetFullTypeName() const;
55 std::string GetTypeNormalizedName() const;
56 Long_t Property() const override;
57 TypeInfo_t *GetTypeInfo() const;
58
60 TList *GetOptions() const;
61
62 void Update(MethodArgInfo_t *info);
63
64 ClassDefOverride(TMethodArg,0) //Dictionary for a method argument
65};
66
67#endif
68
long Long_t
Definition RtypesCore.h:54
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
All ROOT classes may have RTTI (run time type identification) support added.
Definition TDataMember.h:31
This class defines an abstract interface that must be implemented by all classes that contain diction...
Global functions class (global functions are obtained from CINT).
Definition TFunction.h:30
A doubly linked list.
Definition TList.h:38
Each ROOT method (see TMethod) has a linked list of its arguments.
Definition TMethodArg.h:36
const char * GetFullTypeName() const
Get full type description of method argument, e.g.: "class TDirectory*".
Long_t Property() const override
Get property description word. For meaning of bits see EProperty.
MethodArgInfo_t * fInfo
Definition TMethodArg.h:44
TypeInfo_t * GetTypeInfo() const
Get the TypeInfo of the method argument.
TList * GetOptions() const
Returns list of possible options - according to pointed datamember.
const char * GetDefault() const
Get default value of method argument.
virtual ~TMethodArg()
TMethodArg dtor deletes adopted CINT MethodArgInfo object.
TMethodArg(const TMethodArg &)=delete
void Update(MethodArgInfo_t *info)
Update fInfo (to 0 for unloading and non-zero for reloading).
std::string GetTypeNormalizedName() const
Get the normalized name of the return type.
TFunction * fMethod
Definition TMethodArg.h:45
TFunction * GetMethod() const
Definition TMethodArg.h:52
const char * GetTypeName() const
Get type of method argument, e.g.: "class TDirectory*" -> "TDirectory" Result needs to be used or cop...
TDataMember * fDataMember
Definition TMethodArg.h:46
TMethodArg & operator=(const TMethodArg &)=delete
TDataMember * GetDataMember() const
Returns TDataMember pointed by this methodarg.
Each ROOT class (see TClass) has a linked list of methods.
Definition TMethod.h:38