37 fTypeNameIdx(-1), fTypeNameLen(0)
60 fTypeNameIdx(-1), fTypeNameLen(0)
74 fInfo(
gCling->TypedefInfo_FactoryCopy(dt.fInfo)),
77 fProperty(dt.fProperty),
78 fTrueName(dt.fTrueName),
79 fTypeNameIdx(dt.fTypeNameIdx), fTypeNameLen(dt.fTypeNameLen)
116 case 1:
return "Char_t";
117 case 2:
return "Short_t";
118 case 3:
return "Int_t";
119 case 4:
return "Long_t";
120 case 5:
return "Float_t";
121 case 6:
return "Int_t";
122 case 7:
return "char*";
123 case 8:
return "Double_t";
124 case 9:
return "Double32_t";
125 case 11:
return "UChar_t";
126 case 12:
return "UShort_t";
127 case 13:
return "UInt_t";
128 case 14:
return "ULong_t";
129 case 15:
return "UInt_t";
130 case 16:
return "Long64_t";
131 case 17:
return "ULong64_t";
132 case 18:
return "Bool_t";
133 case 19:
return "Float16_t";
139 case kchar:
return "Char_t";
156 (
const_cast<TDataType*
>(
this))->CheckInfo();
160 Error(
"GetTypeName",
"Cannot find type name %s in true name %s!",
178 (
const_cast<TDataType*
>(
this))->CheckInfo();
193 if (
typeid(
unsigned int) == typeinfo) {
195 }
else if (
typeid(
int) == typeinfo) {
197 }
else if (
typeid(
ULong_t) == typeinfo) {
199 }
else if (
typeid(
Long_t) == typeinfo) {
201 }
else if (
typeid(
ULong64_t) == typeinfo) {
203 }
else if (
typeid(
Long64_t) == typeinfo) {
205 }
else if (
typeid(
unsigned short) == typeinfo) {
207 }
else if (
typeid(
short) == typeinfo) {
209 }
else if (
typeid(
unsigned char) == typeinfo) {
211 }
else if (
typeid(
char) == typeinfo) {
213 }
else if (
typeid(
Bool_t) == typeinfo) {
215 }
else if (
typeid(
float) == typeinfo) {
217 }
else if (
typeid(
Float16_t) == typeinfo) {
219 }
else if (
typeid(
double) == typeinfo) {
223 }
else if (
typeid(
char*) == typeinfo) {
225 }
else if (
typeid(
signed char) == typeinfo) {
241 (
const_cast<TDataType*
>(
this))->CheckInfo();
248 if (!strcmp(
"unsigned int",
name))
249 line.Form(
"%u", *(
unsigned int *)buf);
250 else if (!strcmp(
"unsigned",
name))
251 line.Form(
"%u", *(
unsigned int *)buf);
252 else if (!strcmp(
"int",
name))
253 line.Form(
"%d", *(
int *)buf);
254 else if (!strcmp(
"unsigned long",
name))
256 else if (!strcmp(
"long",
name))
258 else if (!strcmp(
"unsigned long long",
name))
260 else if (!strcmp(
"ULong64_t",
name))
262 else if (!strcmp(
"long long",
name))
264 else if (!strcmp(
"Long64_t",
name))
266 else if (!strcmp(
"unsigned short",
name))
267 line.Form(
"%hu", *(
unsigned short *)buf);
268 else if (!strcmp(
"short",
name))
269 line.Form(
"%hd", *(
short *)buf);
270 else if (!strcmp(
"bool",
name))
271 line.Form(
"%s", *(
Bool_t *)buf ?
"true" :
"false");
272 else if (!strcmp(
"unsigned char",
name) || !strcmp(
"char",
name) ) {
274 }
else if (!strcmp(
"float",
name))
275 line.Form(
"%g", *(
float *)buf);
276 else if (!strcmp(
"Float16_t",
name))
277 line.Form(
"%g", *(
float *)buf);
278 else if (!strcmp(
"double",
name))
279 line.Form(
"%g", *(
double *)buf);
280 else if (!strcmp(
"Double32_t",
name))
281 line.Form(
"%g", *(
double *)buf);
282 else if (!strcmp(
"char*",
name))
283 line.Form(
"%s", *(
char**)buf);
308 }
else if (!strcmp(
"unsigned int",
name)) {
311 }
else if (!strcmp(
"unsigned",
name)) {
314 }
else if (!strcmp(
"int",
name)) {
317 }
else if (!strcmp(
"unsigned long",
name)) {
320 }
else if (!strcmp(
"long",
name)) {
323 }
else if (!strcmp(
"unsigned long long",
name) || !strcmp(
"ULong64_t",
name)) {
326 }
else if (!strcmp(
"long long",
name) || !strcmp(
"Long64_t",
name)) {
329 }
else if (!strcmp(
"unsigned short",
name)) {
332 }
else if (!strcmp(
"short",
name)) {
335 }
else if (!strcmp(
"unsigned char",
name)) {
338 }
else if (!strcmp(
"char",
name)) {
341 }
else if (!strcmp(
"bool",
name)) {
344 }
else if (!strcmp(
"float",
name)) {
347 }
else if (!strcmp(
"double",
name)) {
350 }
else if (!strcmp(
"signed char",
name)) {
353 }
else if (!strcmp(
"void",
name)) {
358 if (!strcmp(
"Float16_t",
fName.
Data())) {
362 if (!strcmp(
"Double32_t",
fName.
Data())) {
unsigned long long ULong64_t
@ kDataTypeAliasSignedChar_t
@ kDataTypeAliasUnsigned_t
R__EXTERN TVirtualMutex * gInterpreterMutex
R__EXTERN TInterpreter * gCling
#define R__LOCKGUARD(mutex)
Collection abstract base class.
virtual void Add(TObject *obj)=0
Basic data type descriptor (datatype information is obtained from CINT).
void CheckInfo()
Refresh the underlying information.
virtual ~TDataType()
TDataType dtor deletes adopted CINT TypedefInfo object.
static TDataType * fgBuiltins[kNumDataTypes]
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
const char * GetFullTypeName() const
Get full type description of typedef, e,g.: "class TDirectory*".
Int_t fSize
pointer to CINT typedef info
const char * AsString(void *buf) const
Return string containing value in buffer formatted according to the basic data type.
TString GetTypeName()
Get basic type of typedef, e,g.: "class TDirectory*" -> "TDirectory".
TDataType(const TDataType &)
copy constructor
static void AddBuiltins(TCollection *types)
Create the TDataType objects for builtins.
static TDataType * GetDataType(EDataType type)
Given a EDataType type, get the TDataType* that represents it.
TDataType & operator=(const TDataType &)
assignment operator
void SetType(const char *name)
Set type id depending on name.
Int_t Size() const
Get size of basic typedef'ed type.
This class defines an abstract interface that must be implemented by all classes that contain diction...
TDictionary & operator=(const TDictionary &other)
virtual TypedefInfo_t * TypedefInfo_FactoryCopy(TypedefInfo_t *) const
virtual const char * TypedefInfo_TrueName(TypedefInfo_t *) const
virtual Long_t TypedefInfo_Property(TypedefInfo_t *) const
virtual Bool_t TypedefInfo_IsValid(TypedefInfo_t *) const
virtual void TypedefInfo_Delete(TypedefInfo_t *) const
virtual const char * TypedefInfo_Name(TypedefInfo_t *) const
virtual void TypedefInfo_Init(TypedefInfo_t *, const char *) const
virtual const char * TypedefInfo_Title(TypedefInfo_t *) const
virtual int TypedefInfo_Size(TypedefInfo_t *) const
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
const char * Data() const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const