File indexing completed on 2025-01-18 10:11:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TEnumConstant
0013 #define ROOT_TEnumConstant
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "TGlobal.h"
0025 #include "TEnum.h"
0026
0027 class TEnum;
0028
0029 class TEnumConstant : public TGlobal {
0030 private:
0031 const TEnum *fEnum;
0032 Long64_t fValue;
0033
0034 public:
0035 TEnumConstant(): fEnum(nullptr), fValue(-1) {}
0036 TEnumConstant(DataMemberInfo_t *info, const char* name, Long64_t value, TEnum* type);
0037 virtual ~TEnumConstant();
0038
0039 void *GetAddress() const override { auto valPtr = &fValue; return (void*) const_cast<Long64_t*>(valPtr); }
0040 Long64_t GetValue() const { return fValue; }
0041 const TEnum *GetType() const { return fEnum; }
0042
0043 const char *GetTypeName() const override { return fEnum->GetQualifiedName(); }
0044 const char *GetFullTypeName() const override { return GetTypeName(); }
0045
0046 ClassDefOverride(TEnumConstant,2)
0047 };
0048
0049 #endif