Documentation ¶
Overview ¶
Package rmeta provides tools to interoperate with ROOT Meta.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CxxBuiltins = map[string]reflect.Type{ "bool": reflect.TypeOf(false), "int8_t": reflect.TypeOf(int8(0)), "int16_t": reflect.TypeOf(int16(0)), "int32_t": reflect.TypeOf(int32(0)), "int64_t": reflect.TypeOf(int64(0)), "uint8_t": reflect.TypeOf(uint8(0)), "uint16_t": reflect.TypeOf(uint16(0)), "uint32_t": reflect.TypeOf(uint32(0)), "uint64_t": reflect.TypeOf(uint64(0)), "unsigned": reflect.TypeOf(uint32(0)), "unsigned char": reflect.TypeOf(uint8(0)), "unsigned short": reflect.TypeOf(uint16(0)), "unsigned int": reflect.TypeOf(uint32(0)), "unsigned long": reflect.TypeOf(uint64(0)), "char": reflect.TypeOf(int8(0)), "short": reflect.TypeOf(int16(0)), "int": reflect.TypeOf(int32(0)), "long": reflect.TypeOf(int64(0)), "float": reflect.TypeOf(float32(0)), "double": reflect.TypeOf(float64(0)), "string": reflect.TypeOf(""), "Bool_t": reflect.TypeOf(true), "Byte_t": reflect.TypeOf(uint8(0)), "Char_t": reflect.TypeOf(int8(0)), "UChar_t": reflect.TypeOf(uint8(0)), "Short_t": reflect.TypeOf(int16(0)), "UShort_t": reflect.TypeOf(uint16(0)), "Int_t": reflect.TypeOf(int32(0)), "UInt_t": reflect.TypeOf(uint32(0)), "Seek_t": reflect.TypeOf(int64(0)), "Long_t": reflect.TypeOf(int64(0)), "ULong_t": reflect.TypeOf(uint64(0)), "Long64_t": reflect.TypeOf(int64(0)), "ULong64_t": reflect.TypeOf(uint64(0)), "Float_t": reflect.TypeOf(float32(0)), "Float16_t": reflect.TypeOf(root.Float16(0)), "Double_t": reflect.TypeOf(float64(0)), "Double32_t": reflect.TypeOf(root.Double32(0)), "Version_t": reflect.TypeOf(int16(0)), "Option_t": reflect.TypeOf(""), "Ssiz_t": reflect.TypeOf(int(0)), "Real_t": reflect.TypeOf(float32(0)), "Axis_t": reflect.TypeOf(float64(0)), "Stat_t": reflect.TypeOf(float64(0)), "Font_t": reflect.TypeOf(int16(0)), "Style_t": reflect.TypeOf(int16(0)), "Marker_t": reflect.TypeOf(int16(0)), "Width_t": reflect.TypeOf(int16(0)), "Color_t": reflect.TypeOf(int16(0)), "SCoord_t": reflect.TypeOf(int16(0)), "Coord_t": reflect.TypeOf(float64(0)), "Angle_t": reflect.TypeOf(float32(0)), "Size_t": reflect.TypeOf(float32(0)), }
View Source
var GoType2Cxx = map[string]string{
"bool": "bool",
"byte": "unsigned char",
"uint": "unsigned int",
"uint8": "unsigned char",
"uint16": "unsigned short",
"uint32": "unsigned int",
"uint64": "unsigned long",
"int": "int",
"int8": "char",
"int16": "short",
"int32": "int",
"int64": "long",
"float32": "float",
"float64": "double",
}
View Source
var GoType2ROOTEnum = map[reflect.Type]Enum{ reflect.TypeOf(int8(0)): Char, reflect.TypeOf(int16(0)): Short, reflect.TypeOf(int32(0)): Int, reflect.TypeOf(int64(0)): Long, reflect.TypeOf(float32(0)): Float, reflect.TypeOf(float64(0)): Double, reflect.TypeOf(uint8(0)): UChar, reflect.TypeOf(uint16(0)): UShort, reflect.TypeOf(uint32(0)): UInt, reflect.TypeOf(uint64(0)): ULong, reflect.TypeOf(false): Bool, reflect.TypeOf(root.Float16(0)): Float16, reflect.TypeOf(root.Double32(0)): Double32, reflect.TypeOf(""): TString, }
Functions ¶
func STLNameFor ¶
STLNameFor creates a regular C++ STL container name given a STL enum type and a ROOT enum value for the contained element.
Types ¶
type CxxTemplate ¶ added in v0.31.0
type CxxTemplate struct { Name string // Name is the name of the template type Args []string // Args is the list of template arguments }
CxxTemplate represents a C++ template, such as 'vector<T>', 'map<K,V,Cmp>'.
func CxxTemplateFrom ¶ added in v0.31.0
func CxxTemplateFrom(typename string) CxxTemplate
CxxTemplateOf extracts the typenames of a C++ templated typename. Ex:
std::map<K,V> -> []string{"K", "V"} std::vector<T> -> []string{"T"} Foo<T1,T2,std::map<K,V>> -> []string{"T1", "T2", "std::map<K,V>"}
type ESTLType ¶
type ESTLType int32
const ( NotSTL ESTLType = 0 STLvector ESTLType = 1 STLlist ESTLType = 2 STLdeque ESTLType = 3 STLmap ESTLType = 4 STLmultimap ESTLType = 5 STLset ESTLType = 6 STLmultiset ESTLType = 7 STLbitset ESTLType = 8 // Here the c++11 containers start. Order counts. For example, // tstreamerelements in written rootfiles carry a value and we cannot // introduce shifts. STLforwardlist ESTLType = 9 STLunorderedset ESTLType = 10 STLunorderedmultiset ESTLType = 11 STLunorderedmap ESTLType = 12 STLunorderedmultimap ESTLType = 13 STLend ESTLType = 14 STLany ESTLType = 300 /* TVirtualStreamerInfo::kSTL */ STLstdstring = ESTLType(STLstring) /* TVirtualStreamerInfo::kSTLstring */ )
constants from core/foundation/inc/ESTLType.h
type Enum ¶
type Enum int32
Enum is the set of ROOT streamer enums
const ( Base Enum = 0 // Base class Char Enum = 1 Short Enum = 2 Int Enum = 3 Long Enum = 4 Float Enum = 5 Counter Enum = 6 // Counter for array size CharStar Enum = 7 // Pointer to array of char Double Enum = 8 Double32 Enum = 9 LegacyChar Enum = 10 // Equal to TDataType's kchar UChar Enum = 11 UShort Enum = 12 UInt Enum = 13 ULong Enum = 14 Bits Enum = 15 Long64 Enum = 16 ULong64 Enum = 17 Bool Enum = 18 Float16 Enum = 19 OffsetL Enum = 20 // Fixed size array OffsetP Enum = 40 // Pointer to object Object Enum = 61 // Class derived from TObject, or for TStreamerSTL::fCtype non-pointer elements Any Enum = 62 // Class not derived from TObject Objectp Enum = 63 // Class* derived from TObject and with comment field //->Class, or for TStreamerSTL::fCtype: pointer elements ObjectP Enum = 64 // Class* derived from TObject and with NO comment field //->Class TString Enum = 65 // TString, special case TObject Enum = 66 // TObject, special case TNamed Enum = 67 // TNamed, special case Anyp Enum = 68 // Class* not derived from TObject with comment field //->Class AnyP Enum = 69 // Class* not derived from TObject with NO comment field //->Class AnyPnoVT Enum = 70 // Class* not derived from TObject with NO comment field //->Class and Class has NO virtual table STLp Enum = 71 // Pointer to STL container Skip Enum = 100 SkipL Enum = 120 SkipP Enum = 140 Conv Enum = 200 ConvL Enum = 220 ConvP Enum = 240 STL Enum = 300 STLstring Enum = 365 Streamer Enum = 500 StreamLoop Enum = 501 Cache Enum = 600 /// Cache the value in memory than is not part of the object but is accessible via a SchemaRule Artificial Enum = 1000 CacheNew Enum = 1001 CacheDelete Enum = 1002 NeedObjectForVirtualBaseClass Enum = 99997 Missing Enum = 99999 )
constants for the streamers
const ( Int8 Enum = Char Int16 Enum = Short Int32 Enum = Int Int64 Enum = Long Uint8 Enum = UChar Uint16 Enum = UShort Uint32 Enum = UInt Uint64 Enum = ULong Float32 Enum = Float Float64 Enum = Double )
aliases for Go
func TypeName2Enum ¶ added in v0.28.0
TypeName2Enum returns the Enum corresponding to the provided C++ (or Go) typename.
Click to show internal directories.
Click to hide internal directories.