File indexing completed on 2025-01-18 10:11:37
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TDataType
0013 #define ROOT_TDataType
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #include "TDictionary.h"
0026
0027
0028 enum EDataType {
0029 kChar_t = 1, kUChar_t = 11, kShort_t = 2, kUShort_t = 12,
0030 kInt_t = 3, kUInt_t = 13, kLong_t = 4, kULong_t = 14,
0031 kFloat_t = 5, kDouble_t = 8, kDouble32_t = 9, kchar = 10,
0032 kBool_t = 18, kLong64_t = 16, kULong64_t = 17, kOther_t = -1,
0033 kNoType_t = 0, kFloat16_t= 19,
0034 kCounter = 6, kCharStar = 7, kBits = 15 ,
0035 kVoid_t = 20,
0036
0037 kDataTypeAliasUnsigned_t = 21,
0038 kDataTypeAliasSignedChar_t = 22,
0039
0040 kNumDataTypes
0041 };
0042
0043
0044 class TDataType : public TDictionary {
0045
0046 private:
0047 TypedefInfo_t *fInfo;
0048 Int_t fSize;
0049 EDataType fType;
0050 Long_t fProperty;
0051 TString fTrueName;
0052 Int_t fTypeNameIdx;
0053 Int_t fTypeNameLen;
0054 static TDataType* fgBuiltins[kNumDataTypes];
0055
0056 void CheckInfo();
0057 void SetType(const char *name);
0058
0059 protected:
0060 TDataType(const TDataType&);
0061 TDataType& operator=(const TDataType&);
0062
0063 public:
0064 TDataType(TypedefInfo_t *info = nullptr);
0065 TDataType(const char *typenam);
0066 virtual ~TDataType();
0067 Int_t Size() const;
0068 Int_t GetType() const { return (Int_t)fType; }
0069 TString GetTypeName();
0070 const char *GetFullTypeName() const;
0071 const char *AsString(void *buf) const;
0072 Long_t Property() const override;
0073
0074 static const char *GetTypeName(EDataType type);
0075 static TDataType *GetDataType(EDataType type);
0076 static EDataType GetType(const std::type_info &typeinfo);
0077 static void AddBuiltins(TCollection* types);
0078
0079 ClassDefOverride(TDataType,2)
0080 };
0081
0082 #endif