Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RtypesCore.h
Go to the documentation of this file.
1/* @(#)root/foundation:$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#ifndef R__LESS_INCLUDES
28#include <cstddef> // size_t, NULL
29#endif
30
31//---- Tag used by rootcling to determine constructor used for I/O.
32
33class TRootIOCtor;
34
35//---- types -------------------------------------------------------------------
36
37typedef char Char_t; //Signed Character 1 byte (char)
38typedef unsigned char UChar_t; //Unsigned Character 1 byte (unsigned char)
39typedef short Short_t; //Signed Short integer 2 bytes (short)
40typedef unsigned short UShort_t; //Unsigned Short integer 2 bytes (unsigned short)
41#ifdef R__INT16
42typedef long Int_t; //Signed integer 4 bytes
43typedef unsigned long UInt_t; //Unsigned integer 4 bytes
44#else
45typedef int Int_t; //Signed integer 4 bytes (int)
46typedef unsigned int UInt_t; //Unsigned integer 4 bytes (unsigned int)
47#endif
48#ifdef R__B64 // Note: Long_t and ULong_t are currently not portable types
49typedef int Seek_t; //File pointer (int)
50typedef long Long_t; //Signed long integer 8 bytes (long)
51typedef unsigned long ULong_t; //Unsigned long integer 8 bytes (unsigned long)
52#else
53typedef int Seek_t; //File pointer (int)
54typedef long Long_t; //Signed long integer 4 bytes (long)
55typedef unsigned long ULong_t; //Unsigned long integer 4 bytes (unsigned long)
56#endif
57typedef float Float_t; //Float 4 bytes (float)
58typedef float Float16_t; //Float 4 bytes written with a truncated mantissa
59typedef double Double_t; //Double 8 bytes
60typedef double Double32_t; //Double 8 bytes in memory, written as a 4 bytes float
61typedef long double LongDouble_t;//Long Double
62typedef char Text_t; //General string (char)
63typedef bool Bool_t; //Boolean (0=false, 1=true) (bool)
64typedef unsigned char Byte_t; //Byte (8 bits) (unsigned char)
65typedef short Version_t; //Class version identifier (short)
66typedef const char Option_t; //Option string (const char)
67typedef int Ssiz_t; //String size (int)
68typedef float Real_t; //TVector and TMatrix element type (float)
69typedef long long Long64_t; //Portable signed long integer 8 bytes
70typedef unsigned long long ULong64_t;//Portable unsigned long integer 8 bytes
71#ifdef _WIN64
72typedef long long Longptr_t; //Integer large enough to hold a pointer
73typedef unsigned long long ULongptr_t; //Unsigned integer large enough to hold a pointer
74#else
75typedef long Longptr_t; //Integer large enough to hold a pointer
76typedef unsigned long ULongptr_t; //Unsigned integer large enough to hold a pointer
77#endif
78typedef double Axis_t; //Axis values type (double)
79typedef double Stat_t; //Statistics type (double)
80
81typedef short Font_t; //Font number (short)
82typedef short Style_t; //Style number (short)
83typedef short Marker_t; //Marker number (short)
84typedef short Width_t; //Line width (short)
85typedef short Color_t; //Color number (short)
86typedef short SCoord_t; //Screen coordinates (short)
87typedef double Coord_t; //Pad world coordinates (double)
88typedef float Angle_t; //Graphics angle (float)
89typedef float Size_t; //Attribute size (float)
90
91//---- constants ---------------------------------------------------------------
92
93constexpr Bool_t kTRUE = true;
94constexpr Bool_t kFALSE = false;
95
96constexpr Int_t kMaxUChar = 256;
97constexpr Int_t kMaxChar = kMaxUChar >> 1;
98constexpr Int_t kMinChar = -kMaxChar - 1;
99
100constexpr Int_t kMaxUShort = 65534;
101constexpr Int_t kMaxShort = kMaxUShort >> 1;
102constexpr Int_t kMinShort = -kMaxShort - 1;
103
104constexpr UInt_t kMaxUInt = UInt_t(~0);
105constexpr Int_t kMaxInt = Int_t(kMaxUInt >> 1);
106constexpr Int_t kMinInt = -kMaxInt - 1;
107
108constexpr ULong_t kMaxULong = ULong_t(~0);
109constexpr Long_t kMaxLong = Long_t(kMaxULong >> 1);
110constexpr Long_t kMinLong = -kMaxLong - 1;
111
115
116constexpr ULong_t kBitsPerByte = 8;
117constexpr Ssiz_t kNPOS = ~(Ssiz_t)0;
118
119//---- debug global ------------------------------------------------------------
120
122
123
124#endif
#define R__EXTERN
Definition DllImport.h:26
short Style_t
Definition RtypesCore.h:82
float Float16_t
Definition RtypesCore.h:58
constexpr Long64_t kMaxLong64
Definition RtypesCore.h:113
double Coord_t
Definition RtypesCore.h:87
constexpr Long_t kMaxLong
Definition RtypesCore.h:109
bool Bool_t
Definition RtypesCore.h:63
unsigned short UShort_t
Definition RtypesCore.h:40
constexpr Long_t kMinLong
Definition RtypesCore.h:110
constexpr Int_t kMaxChar
Definition RtypesCore.h:97
constexpr ULong64_t kMaxULong64
Definition RtypesCore.h:112
int Int_t
Definition RtypesCore.h:45
unsigned char Byte_t
Definition RtypesCore.h:64
double Double32_t
Definition RtypesCore.h:60
constexpr ULong_t kMaxULong
Definition RtypesCore.h:108
short Color_t
Definition RtypesCore.h:85
constexpr Int_t kMaxUChar
Definition RtypesCore.h:96
constexpr Int_t kMaxUShort
Definition RtypesCore.h:100
constexpr Int_t kMaxInt
Definition RtypesCore.h:105
float Size_t
Definition RtypesCore.h:89
char Text_t
Definition RtypesCore.h:62
long Longptr_t
Definition RtypesCore.h:75
float Angle_t
Definition RtypesCore.h:88
short Version_t
Definition RtypesCore.h:65
Int_t gDebug
Definition TROOT.cxx:597
unsigned char UChar_t
Definition RtypesCore.h:38
int Ssiz_t
Definition RtypesCore.h:67
constexpr ULong_t kBitsPerByte
Definition RtypesCore.h:116
char Char_t
Definition RtypesCore.h:37
short Marker_t
Definition RtypesCore.h:83
constexpr Int_t kMinInt
Definition RtypesCore.h:106
float Real_t
Definition RtypesCore.h:68
int Seek_t
Definition RtypesCore.h:53
unsigned long ULong_t
Definition RtypesCore.h:55
long Long_t
Definition RtypesCore.h:54
unsigned int UInt_t
Definition RtypesCore.h:46
constexpr Int_t kMaxShort
Definition RtypesCore.h:101
unsigned long ULongptr_t
Definition RtypesCore.h:76
short Width_t
Definition RtypesCore.h:84
float Float_t
Definition RtypesCore.h:57
short Font_t
Definition RtypesCore.h:81
double Axis_t
Definition RtypesCore.h:78
short Short_t
Definition RtypesCore.h:39
constexpr UInt_t kMaxUInt
Definition RtypesCore.h:104
constexpr Bool_t kFALSE
Definition RtypesCore.h:94
double Double_t
Definition RtypesCore.h:59
short SCoord_t
Definition RtypesCore.h:86
long double LongDouble_t
Definition RtypesCore.h:61
double Stat_t
Definition RtypesCore.h:79
constexpr Long64_t kMinLong64
Definition RtypesCore.h:114
constexpr Ssiz_t kNPOS
Definition RtypesCore.h:117
long long Long64_t
Definition RtypesCore.h:69
constexpr Int_t kMinChar
Definition RtypesCore.h:98
constexpr Int_t kMinShort
Definition RtypesCore.h:102
unsigned long long ULong64_t
Definition RtypesCore.h:70
constexpr Bool_t kTRUE
Definition RtypesCore.h:93
const char Option_t
Definition RtypesCore.h:66