33#include <unordered_map>
39#define RTLD_DEFAULT ((void *)::GetModuleHandle(NULL))
40#define dlsym(library, function_name) ::GetProcAddress((HMODULE)library, function_name)
55 TNamed(*cl), fBase(cl->GetListOfBases()),
56 fEnums(cl->GetListOfEnums()), fSizeof(cl->Size()), fCheckSum(cl->fCheckSum),
57 fCanSplit(cl->fCanSplit), fStreamerType(cl->fStreamerType), fProperty(cl->fProperty),
58 fClassProperty(cl->fClassProperty)
84 std::vector<TString> &fDepClasses;
89 R__ASSERT(fDepClasses.empty() &&
"Expected fDepClasses to be empty before fililng it!");
95 ::Error(
"TProtoClass::DepClassDedup::~DepClassDedup",
96 "Mismatching size of fDepClasses and index map! Please report.");
99 int GetIdx(
const char *
name) {
102 fDepClasses.emplace_back(
name);
104 return itins.first->second;
116 if (!
rd->GetDataMember())
218 Info(
"FillTClass",
"Returning w/o doing anything. %s is a STL collection.",cl->
GetName());
223 Info(
"FillTClass",
"Returning w/o doing anything. %s is a namespace.",cl->
GetName());
226 Error(
"FillTClass",
"TClass %s already initialized!", cl->
GetName());
230 Fatal(
"FillTClass",
"Filling TClass %s a second time but none of the info is in the TClass instance ... ", cl->
GetName());
299 "For %s the sizeof provided by GenerateInitInstance (%d) is different from the one provided by TProtoClass (%d)",
309 if (cl->
fBase.load()) {
310 for (
auto base: *cl->
fBase) {
315 for (
auto dm: *cl->
fData) {
370 "Cannot find TClass for %s; Creating an empty one in the kForwardDeclared state.", classname);
384 Info(
"FillTClass",
"Real data for class %s is not empty - make a new one",cl->
GetName() );
401 Info(
"FillTClas",
"Real data for class %s is not empty - make a new one. Class has no Proto-realdata",cl->
GetName() );
432 fOffset(
rd->GetThisOffset()),
475 "Cannot find data member # %d of class %s for parent %s!", fDMIndex,
dmClass->GetName(),
485 else if (
dmClass->fIsSyntheticPair) {
518 for (
int i = 0; i <
prevLevel-fLevel+1; ++i) {
531 if (TestFlag(kIsTransient)) {
534 rd->SetIsObject(TestFlag(kIsObject) );
546 for (
auto * obj : *
dmList) {
554 ::Error(
"TProtoClass::DataMemberIndex",
"data member %s is not found in class %s",
name, cl->
GetName());
566 for (
auto * obj : *
dmList) {
575 ::Error(
"TProtoClass::FindDataMember",
"data member with index %d is not found in class %s",
index,cl->
GetName());
static bool IsFromRootCling()
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Int_t gErrorIgnoreLevel
Error handling routines.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
R__EXTERN TInterpreter * gCling
static bool IsFromRootCling()
Each class (see TClass) has a linked list of its base class(es).
TClass instances represent classes, structs and namespaces in the ROOT type system.
ROOT::ESTLType GetCollectionType() const
Return the 'type' of the STL the TClass is representing.
EState fState
cached of the streaming method to use
std::atomic< TList * > fBase
std::atomic< Char_t > fCanSplit
Bool_t fIsSyntheticPair
Indicates whether this class can be split or not. Values are -1, 0, 1, 2.
std::atomic< UInt_t > fCheckSum
std::atomic< TListOfEnums * > fEnums
Bool_t HasInterpreterInfo() const
std::atomic< Long_t > fProperty
void BuildRealData(void *pointer=nullptr, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
void SetStreamerImpl(Int_t streamerType)
Internal routine to set fStreamerImpl based on the value of fStreamerType.
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
TList * GetListOfRealData() const
Longptr_t fOffsetStreamer
Properties that can only be evaluated at run-time.
std::atomic< TListOfDataMembers * > fData
ClassInfo_t * GetClassInfo() const
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
void CalculateStreamerOffset() const
Calculate the offset between an object of this class to its base class TObject.
Long_t Property() const override
Returns the properties of the TClass as a bit field stored as a Long_t value.
Long_t fClassProperty
Property See TClass::Property() for details.
std::atomic< Bool_t > fHasRootPcmInfo
C++ Property of the class (is abstract, has virtual table, etc.)
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
All ROOT classes may have RTTI (run time type identification) support added.
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
Long_t Property() const override
Get property description word. For meaning of bits see EProperty.
Int_t GetArrayDim() const
Return number of array dimensions.
const char * GetTypeName() const
Get the decayed type name of this data member, removing const and volatile qualifiers,...
TClass * GetClass() const
The TEnum class implements the enum type.
virtual int ClassInfo_Size(ClassInfo_t *) const
A collection of TDataMember objects designed for fast access given a DeclId_t and for keep track of T...
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
void Clear(Option_t *option="") override
Remove all objects from the list.
void AddLast(TObject *obj) override
Add object at the end of the list.
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
Mother of all ROOT objects.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
Int_t TestBits(UInt_t f) const
Bool_t FillTClass(TClass *pcl)
Move data from this TProtoClass into cl.
virtual ~TProtoClass()
Destructor.
const char * GetClassName(Int_t index) const
std::vector< TDataMember * > fData
std::vector< TProtoRealData > fPRealData
void Delete(Option_t *opt="") override
Delete the containers that are usually owned by their TClass.
std::vector< TString > fDepClasses
static Int_t DataMemberIndex(TClass *cl, const char *name)
static TDataMember * FindDataMember(TClass *cl, Int_t index)
The TRealData class manages the effective list of all data members for a given class.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
virtual Int_t GetProperties() const
Return miscallenous properties of the proxy (see TVirtualCollectionProxy::EProperty)
bool IsStdArray(std::string_view name)
bool IsStdPair(std::string_view name)
bool GetStdArrayProperties(const char *typeName, std::string &typeNameBuf, std::array< int, 5 > &maxIndices, int &ndim)
void SetFlag(UInt_t f, Bool_t on=kTRUE)
TRealData * CreateRealData(TClass *currentClass, TClass *parent, TRealData *parentData, int prevLevel) const
Create a TRealData from this, with its data member coming from dmClass.
virtual ~TProtoRealData()
Destructor to pin vtable.