122 case 1:
return "Char_t";
123 case 2:
return "Short_t";
124 case 3:
return "Int_t";
125 case 4:
return "Long_t";
126 case 5:
return "Float_t";
127 case 6:
return "Int_t";
128 case 7:
return "char*";
129 case 8:
return "Double_t";
130 case 9:
return "Double32_t";
131 case 11:
return "UChar_t";
132 case 12:
return "UShort_t";
133 case 13:
return "UInt_t";
134 case 14:
return "ULong_t";
135 case 15:
return "UInt_t";
136 case 16:
return "Long64_t";
137 case 17:
return "ULong64_t";
138 case 18:
return "Bool_t";
139 case 19:
return "Float16_t";
145 case kchar:
return "Char_t";
166 Error(
"GetTypeName",
"Cannot find type name %s in true name %s!",
199 if (
typeid(
unsigned int) == typeinfo) {
201 }
else if (
typeid(
int) == typeinfo) {
203 }
else if (
typeid(
ULong_t) == typeinfo) {
205 }
else if (
typeid(
Long_t) == typeinfo) {
207 }
else if (
typeid(
ULong64_t) == typeinfo) {
209 }
else if (
typeid(
Long64_t) == typeinfo) {
211 }
else if (
typeid(
unsigned short) == typeinfo) {
213 }
else if (
typeid(
short) == typeinfo) {
215 }
else if (
typeid(
unsigned char) == typeinfo) {
217 }
else if (
typeid(
char) == typeinfo) {
219 }
else if (
typeid(
Bool_t) == typeinfo) {
221 }
else if (
typeid(
float) == typeinfo) {
223 }
else if (
typeid(
Float16_t) == typeinfo) {
225 }
else if (
typeid(
double) == typeinfo) {
229 }
else if (
typeid(
char*) == typeinfo) {
231 }
else if (
typeid(
signed char) == typeinfo) {
254 if (!strcmp(
"unsigned int",
name))
255 line.Form(
"%u", *(
unsigned int *)buf);
256 else if (!strcmp(
"unsigned",
name))
257 line.Form(
"%u", *(
unsigned int *)buf);
258 else if (!strcmp(
"int",
name))
259 line.Form(
"%d", *(
int *)buf);
260 else if (!strcmp(
"unsigned long",
name))
262 else if (!strcmp(
"long",
name))
264 else if (!strcmp(
"unsigned long long",
name))
266 else if (!strcmp(
"ULong64_t",
name))
268 else if (!strcmp(
"long long",
name))
270 else if (!strcmp(
"Long64_t",
name))
272 else if (!strcmp(
"unsigned short",
name))
273 line.Form(
"%hu", *(
unsigned short *)buf);
274 else if (!strcmp(
"short",
name))
275 line.Form(
"%hd", *(
short *)buf);
276 else if (!strcmp(
"bool",
name))
277 line.Form(
"%s", *(
Bool_t *)buf ?
"true" :
"false");
278 else if (!strcmp(
"unsigned char",
name) || !strcmp(
"char",
name) ) {
280 }
else if (!strcmp(
"float",
name))
281 line.Form(
"%g", *(
float *)buf);
282 else if (!strcmp(
"Float16_t",
name))
283 line.Form(
"%g", *(
float *)buf);
284 else if (!strcmp(
"double",
name))
285 line.Form(
"%g", *(
double *)buf);
286 else if (!strcmp(
"Double32_t",
name))
287 line.Form(
"%g", *(
double *)buf);
288 else if (!strcmp(
"char*",
name))
289 line.Form(
"%s", *(
char**)buf);
316 auto setAlignOf = [
this](std::size_t al) {
317 R__ASSERT(al <=
static_cast<std::size_t
>(std::numeric_limits<unsigned int>::max()) &&
318 "alignof value exceeds unsigned int range");
319 fAlignOf =
static_cast<unsigned int>(al);
324 }
else if (!strcmp(
"unsigned int",
name)) {
327 setAlignOf(
alignof(
UInt_t));
328 }
else if (!strcmp(
"unsigned",
name)) {
331 setAlignOf(
alignof(
UInt_t));
332 }
else if (!strcmp(
"int",
name)) {
335 setAlignOf(
alignof(
Int_t));
336 }
else if (!strcmp(
"unsigned long",
name)) {
340 }
else if (!strcmp(
"long",
name)) {
343 setAlignOf(
alignof(
Long_t));
344 }
else if (!strcmp(
"unsigned long long",
name) || !strcmp(
"ULong64_t",
name)) {
348 }
else if (!strcmp(
"long long",
name) || !strcmp(
"Long64_t",
name)) {
352 }
else if (!strcmp(
"unsigned short",
name)) {
356 }
else if (!strcmp(
"short",
name)) {
360 }
else if (!strcmp(
"unsigned char",
name)) {
364 }
else if (!strcmp(
"char",
name)) {
367 setAlignOf(
alignof(
Char_t));
368 }
else if (!strcmp(
"bool",
name)) {
371 setAlignOf(
alignof(
Bool_t));
372 }
else if (!strcmp(
"float",
name)) {
376 }
else if (!strcmp(
"double",
name)) {
380 }
else if (!strcmp(
"signed char",
name)) {
383 setAlignOf(
alignof(
Char_t));
384 }
else if (!strcmp(
"void",
name)) {
390 if (!strcmp(
"Float16_t",
fName.Data())) {
395 if (!strcmp(
"Double32_t",
fName.Data())) {
400 if (!strcmp(
"char*",
fName.Data())) {
402 setAlignOf(
alignof(
char *));
float Float16_t
Float 4 bytes in memory, written to disk as 3 bytes (24-bits) by default or as a 4 bytes fixed-point-...
unsigned short UShort_t
Unsigned Short integer 2 bytes (unsigned short).
double Double32_t
Double 8 bytes in memory, written to disk as a 4 bytes Float_t (32-bits) by default,...
int Int_t
Signed integer 4 bytes (int).
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char).
char Char_t
Character 1 byte (char).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
unsigned long ULong_t
Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
bool Bool_t
Boolean (0=false, 1=true) (bool).
short Short_t
Signed Short integer 2 bytes (short).
double Double_t
Double 8 bytes.
long long Long64_t
Portable signed long integer 8 bytes.
unsigned long long ULong64_t
Portable unsigned long integer 8 bytes.
float Float_t
Float 4 bytes (float).
@ kDataTypeAliasSignedChar_t
@ kDataTypeAliasUnsigned_t
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
externTInterpreter * gCling
externTVirtualMutex * gInterpreterMutex
#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.
TypedefInfo_t * fInfo
!pointer to CINT typedef info
static TDataType * fgBuiltins[kNumDataTypes]
const char * GetFullTypeName() const
Get full type description of typedef, e,g.: "class TDirectory*".
Long_t Property() const override
Get property description word. For meaning of bits see EProperty.
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.
TDictionary & operator=(const TDictionary &other)
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