Logo ROOT   master
Reference Guide
RtypesCore.h
Go to the documentation of this file.
1 /* @(#)root/base:$Id$ */
2 
3 /*************************************************************************
4  * Copyright (C) 1995-2014, Rene Brun and Fons Rademakers. *
5  * All rights reserved. *
6  * *
7  * For the licensing terms see $ROOTSYS/LICENSE. *
8  * For the list of contributors see $ROOTSYS/README/CREDITS. *
9  *************************************************************************/
10 
11 #ifndef ROOT_RtypesCore
12 #define ROOT_RtypesCore
13 
14 //////////////////////////////////////////////////////////////////////////
15 // //
16 // RtypesCore //
17 // //
18 // Basic types used by ROOT and required by TInterpreter. //
19 // //
20 //////////////////////////////////////////////////////////////////////////
21 
22 
23 #include <ROOT/RConfig.hxx>
24 
25 #include "DllImport.h"
26 
27 #include <stddef.h> // size_t, NULL
28 
29 //---- Tag used by rootcling to determine constructor used for I/O.
30 
32 
33 //---- types -------------------------------------------------------------------
34 
35 typedef char Char_t; //Signed Character 1 byte (char)
36 typedef unsigned char UChar_t; //Unsigned Character 1 byte (unsigned char)
37 typedef short Short_t; //Signed Short integer 2 bytes (short)
38 typedef unsigned short UShort_t; //Unsigned Short integer 2 bytes (unsigned short)
39 #ifdef R__INT16
40 typedef long Int_t; //Signed integer 4 bytes
41 typedef unsigned long UInt_t; //Unsigned integer 4 bytes
42 #else
43 typedef int Int_t; //Signed integer 4 bytes (int)
44 typedef unsigned int UInt_t; //Unsigned integer 4 bytes (unsigned int)
45 #endif
46 #ifdef R__B64 // Note: Long_t and ULong_t are currently not portable types
47 typedef int Seek_t; //File pointer (int)
48 typedef long Long_t; //Signed long integer 8 bytes (long)
49 typedef unsigned long ULong_t; //Unsigned long integer 8 bytes (unsigned long)
50 #else
51 typedef int Seek_t; //File pointer (int)
52 typedef long Long_t; //Signed long integer 4 bytes (long)
53 typedef unsigned long ULong_t; //Unsigned long integer 4 bytes (unsigned long)
54 #endif
55 typedef float Float_t; //Float 4 bytes (float)
56 typedef float Float16_t; //Float 4 bytes written with a truncated mantissa
57 typedef double Double_t; //Double 8 bytes
58 typedef double Double32_t; //Double 8 bytes in memory, written as a 4 bytes float
59 typedef long double LongDouble_t;//Long Double
60 typedef char Text_t; //General string (char)
61 typedef bool Bool_t; //Boolean (0=false, 1=true) (bool)
62 typedef unsigned char Byte_t; //Byte (8 bits) (unsigned char)
63 typedef short Version_t; //Class version identifier (short)
64 typedef const char Option_t; //Option string (const char)
65 typedef int Ssiz_t; //String size (int)
66 typedef float Real_t; //TVector and TMatrix element type (float)
67 #if defined(R__WIN32) && !defined(__CINT__)
68 typedef __int64 Long64_t; //Portable signed long integer 8 bytes
69 typedef unsigned __int64 ULong64_t; //Portable unsigned long integer 8 bytes
70 #else
71 typedef long long Long64_t; //Portable signed long integer 8 bytes
72 typedef unsigned long long ULong64_t;//Portable unsigned long integer 8 bytes
73 #endif
74 typedef double Axis_t; //Axis values type (double)
75 typedef double Stat_t; //Statistics type (double)
76 
77 typedef short Font_t; //Font number (short)
78 typedef short Style_t; //Style number (short)
79 typedef short Marker_t; //Marker number (short)
80 typedef short Width_t; //Line width (short)
81 typedef short Color_t; //Color number (short)
82 typedef short SCoord_t; //Screen coordinates (short)
83 typedef double Coord_t; //Pad world coordinates (double)
84 typedef float Angle_t; //Graphics angle (float)
85 typedef float Size_t; //Attribute size (float)
86 
87 //---- constants ---------------------------------------------------------------
88 
89 const Bool_t kTRUE = true;
90 const Bool_t kFALSE = false;
91 
92 const Int_t kMaxUChar = 256;
93 const Int_t kMaxChar = kMaxUChar >> 1;
94 const Int_t kMinChar = -kMaxChar - 1;
95 
96 const Int_t kMaxUShort = 65534;
97 const Int_t kMaxShort = kMaxUShort >> 1;
98 const Int_t kMinShort = -kMaxShort - 1;
99 
100 const UInt_t kMaxUInt = UInt_t(~0);
101 const Int_t kMaxInt = Int_t(kMaxUInt >> 1);
102 const Int_t kMinInt = -kMaxInt - 1;
103 
106 const Long_t kMinLong = -kMaxLong - 1;
107 
111 
112 const size_t kBitsPerByte = 8;
113 const Ssiz_t kNPOS = ~(Ssiz_t)0;
114 
115 //---- debug global ------------------------------------------------------------
116 
118 
119 
120 #endif
const UInt_t kMaxUInt
Definition: RtypesCore.h:100
const Int_t kMinShort
Definition: RtypesCore.h:98
long long Long64_t
Definition: RtypesCore.h:71
short Style_t
Definition: RtypesCore.h:78
short Version_t
Definition: RtypesCore.h:63
float Float_t
Definition: RtypesCore.h:55
float Size_t
Definition: RtypesCore.h:85
const char Option_t
Definition: RtypesCore.h:64
const Ssiz_t kNPOS
Definition: RtypesCore.h:113
double Axis_t
Definition: RtypesCore.h:74
unsigned short UShort_t
Definition: RtypesCore.h:38
int Int_t
Definition: RtypesCore.h:43
bool Bool_t
Definition: RtypesCore.h:61
short Font_t
Definition: RtypesCore.h:77
const Int_t kMaxUChar
Definition: RtypesCore.h:92
const ULong_t kMaxULong
Definition: RtypesCore.h:104
float Float16_t
Definition: RtypesCore.h:56
const Int_t kMinInt
Definition: RtypesCore.h:102
unsigned char Byte_t
Definition: RtypesCore.h:62
short SCoord_t
Definition: RtypesCore.h:82
short Marker_t
Definition: RtypesCore.h:79
double Double32_t
Definition: RtypesCore.h:58
R__EXTERN Int_t gDebug
Definition: RtypesCore.h:117
short Color_t
Definition: RtypesCore.h:81
float Angle_t
Definition: RtypesCore.h:84
const Long64_t kMinLong64
Definition: RtypesCore.h:110
const Int_t kMinChar
Definition: RtypesCore.h:94
double Coord_t
Definition: RtypesCore.h:83
unsigned int UInt_t
Definition: RtypesCore.h:44
short Short_t
Definition: RtypesCore.h:37
long double LongDouble_t
Definition: RtypesCore.h:59
const Long_t kMaxLong
Definition: RtypesCore.h:105
short Width_t
Definition: RtypesCore.h:80
const Bool_t kFALSE
Definition: RtypesCore.h:90
const Int_t kMaxShort
Definition: RtypesCore.h:97
long Long_t
Definition: RtypesCore.h:52
int Ssiz_t
Definition: RtypesCore.h:65
double Double_t
Definition: RtypesCore.h:57
const Int_t kMaxChar
Definition: RtypesCore.h:93
unsigned long long ULong64_t
Definition: RtypesCore.h:72
unsigned long ULong_t
Definition: RtypesCore.h:53
const Long64_t kMaxLong64
Definition: RtypesCore.h:109
double Stat_t
Definition: RtypesCore.h:75
#define R__EXTERN
Definition: DllImport.h:27
char Char_t
Definition: RtypesCore.h:31
float Real_t
Definition: RtypesCore.h:66
int Seek_t
Definition: RtypesCore.h:51
const Int_t kMaxInt
Definition: RtypesCore.h:101
const size_t kBitsPerByte
Definition: RtypesCore.h:112
char Text_t
Definition: RtypesCore.h:60
const ULong64_t kMaxULong64
Definition: RtypesCore.h:108
unsigned char UChar_t
Definition: RtypesCore.h:36
const Bool_t kTRUE
Definition: RtypesCore.h:89
const Int_t kMaxUShort
Definition: RtypesCore.h:96
const Long_t kMinLong
Definition: RtypesCore.h:106