204 if (t && t[0] !=
'!')
210 if (strcmp(
name,
"unsigned char") != 0 &&
211 strncmp(
name,
"unsigned short",
sizeof (
"unsigned short")) != 0 &&
212 strcmp(
name,
"unsigned int") != 0 &&
213 strncmp(
name,
"unsigned long",
sizeof (
"unsigned long")) != 0)
244 if (strstr(
GetTitle(),
"*OPTION={")) {
252 TIter iEnumConst(enumDict->GetConstants());
256 enumConst->GetName(),enumConst->GetName());
381 const char* val =
gCling->DataMemberInfo_ValidArrayIndex(
fInfo);
404 if (dim < 0 || dim >=
fArrayDim)
return -1;
453 if (
fClass->GetDeclFileLine() < 0) {
468 char *rdmc = (
char*)rdm->
GetName();
471 if (this->
IsaPointer() && rdmc[0] ==
'*') rdmc++;
474 if (strcmp(rdmc,
GetName()) == 0) {
519 return sizeof(
Int_t);
526 if ( cl)
return cl->
Size();
583 DataMemberInfo_t *info
591 return newId !=
nullptr;
593 return fInfo !=
nullptr;
608 int propt =
gCling->DataMemberInfo_TypeProperty(
fInfo);
637 const char *optTitle = strstr(
GetTitle(),
"*OPTION={");
654 const char *ptr1 =
nullptr;
655 char *ptr2 =
nullptr;
656 char *ptr3 =
nullptr;
663 char *opt_ptr = strstr(cmt,
"*OPTION={");
669 ptr1 = R__STRTOK_R(opt_ptr,
"{}", &rest);
670 if (ptr1 ==
nullptr) {
671 Fatal(
"TDataMember",
"Internal error, found \"*OPTION={\" but not \"{}\" in %s.",
GetTitle());
674 ptr1 = R__STRTOK_R(
nullptr,
"{}", &rest);
675 if (ptr1 ==
nullptr) {
676 Fatal(
"TDataMember",
"Internal error, found \"*OPTION={\" but not \"{}\" in %s.",
GetTitle());
681 strlcpy(opt,ptr1,2048);
687 std::vector<std::string> tokens;
692 ptr1 = R__STRTOK_R((
char *)(cnt++ ?
nullptr : opt),
";", &rest);
694 tokens.emplace_back(ptr1);
700 for (i=0;i<token_cnt;i++) {
701 if (strstr(tokens[i].c_str(),
"GetMethod")) {
702 ptr1 = R__STRTOK_R(
const_cast<char *
>(tokens[i].c_str()),
"\"", &rest);
703 if (ptr1 ==
nullptr) {
704 Fatal(
"TDataMember",
"Internal error, found \"GetMethod\" but not \"\\\"\" in %s.",
GetTitle());
707 ptr1 = R__STRTOK_R(
nullptr,
"\"", &rest);
708 if (ptr1 ==
nullptr) {
709 Fatal(
"TDataMember",
"Internal error, found \"GetMethod\" but not \"\\\"\" in %s.",
GetTitle());
720 if (strstr(tokens[i].c_str(),
"SetMethod")) {
721 ptr1 = R__STRTOK_R(
const_cast<char *
>(tokens[i].c_str()),
"\"", &rest);
722 if (ptr1 ==
nullptr) {
723 Fatal(
"TDataMember",
"Internal error, found \"SetMethod\" but not \"\\\"\" in %s.",
GetTitle());
726 ptr1 = R__STRTOK_R(
nullptr,
"\"", &rest);
727 if (ptr1 ==
nullptr) {
728 Fatal(
"TDataMember",
"Internal error, found \"SetMethod\" but not \"\\\"\" in %s.",
GetTitle());
731 if (
GetClass()->GetMethod(ptr1,
"1"))
740 std::unique_ptr<TList> optionlist{
new TList()};
742 for (i=0;i<token_cnt;i++) {
743 if (strstr(tokens[i].c_str(),
"Items")) {
744 ptr1 = R__STRTOK_R(
const_cast<char *
>(tokens[i].c_str()),
"()", &rest);
745 if (ptr1 ==
nullptr) {
746 Fatal(
"TDataMember",
"Internal error, found \"Items\" but not \"()\" in %s.",
GetTitle());
749 ptr1 = R__STRTOK_R(
nullptr,
"()", &rest);
750 if (ptr1 ==
nullptr) {
751 Fatal(
"TDataMember",
"Internal error, found \"Items\" but not \"()\" in %s.",
GetTitle());
756 strlcpy(opts,ptr1,2048);
764 ptr1 = R__STRTOK_R(opt_cnt++ ?
nullptr : opts,
",", &rest);
779 TIter next(optionlist.get());
786 Bool_t islabel = (ptr1[0]==
'\"');
787 ptr2 = R__STRTOK_R((
char *)ptr1,
"=\"", &rest);
788 ptr3 = R__STRTOK_R(
nullptr,
"=\"", &rest);
796 Long_t l = std::strtol(ptr1, &strtolResult, 10);
797 bool isnumber = (strtolResult != ptr1);
806 TObject *obj =
fClass->GetListOfDataMembers(
false)->FindObject(ptr1);
812 Fatal(
"TDataMember",
"Internal error, couldn't recognize enum/global value %s.", ptr1);
820 optionlist->Remove(it);
864 const char *dataname =
GetName();
867 gettername.
Form(
"Get%s", dataname+1);
868 if (
GetClass()->GetMethod(gettername,
""))
870 gettername.
Form(
"Is%s", dataname+1);
871 if (
GetClass()->GetMethod(gettername,
""))
873 gettername.
Form(
"Has%s", dataname+1);
874 if (
GetClass()->GetMethod(gettername,
""))
910 const char *dataname =
GetName();
913 settername.
Form(
"Set%s", dataname+1);
914 if (strstr(settername,
"Is")) settername.
Form(
"Set%s", dataname+3);
915 if (
GetClass()->GetMethod(settername,
"0"))
918 if (
GetClass()->GetMethod(settername,
"true"))
944 if (info ==
nullptr) {
969 b.ReadClassBuffer(
Class(),
this);
985 b.WriteClassBuffer(
Class(),
this);
993 Long_t tglmask,
const char *
name,
const char *label)
int Int_t
Signed integer 4 bytes (int).
long Longptr_t
Integer large enough to hold a pointer (platform-dependent).
char Char_t
Character 1 byte (char).
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
bool Bool_t
Boolean (0=false, 1=true) (bool).
externTInterpreter * gCling
externTVirtualMutex * gInterpreterMutex
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
#define R__LOCKGUARD(mutex)
Buffer base class used for serializing objects.
TClass instances represent classes, structs and namespaces in the ROOT type system.
Int_t Size() const
Return size of object of this class.
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.
TObject * Clone(const char *newname="") const override
Make a clone of an collection using the Streamer facility.
All ROOT classes may have RTTI (run time type identification) support added.
virtual ~TDataMember()
TDataMember dtor deletes adopted CINT DataMemberInfo object.
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
TDataMember(const TDataMember &)
copy constructor
void Streamer(TBuffer &) override
Stream an object of TDataMember.
TMethodCall * SetterMethod(TClass *cl)
Return a TMethodCall method responsible for setting the value of data member.
virtual bool Update(DataMemberInfo_t *info)
Update the TFunction to reflect the new info.
TDataMember & operator=(const TDataMember &)
assignment operator
const char * GetTrueTypeName() const
Get the desugared type name of this data member, including const and volatile qualifiers.
Longptr_t GetOffsetCint() const
Get offset from "this" using the information in CINT only.
DataMemberInfo_t * fInfo
!pointer to CINT data member info
Long_t Property() const override
Get property description word. For meaning of bits see EProperty.
TMethodCall * fValueGetter
!method that returns a value;
Int_t GetArrayDim() const
Return number of array dimensions.
Bool_t IsEnum() const
Return true if data member is an enum.
TList * GetOptions()
Returns list of options - list of TOptionListItems.
void Init(bool afterReading)
Routines called by the constructor and Update to reset the member's information.
Int_t GetUnitSize() const
Get the sizeof the underlying type of the data member (i.e.
Bool_t IsBasic() const
Return true if data member is a basic type, e.g. char, int, long...
Int_t IsSTLContainer()
The return type is defined in TDictionary (kVector, kList, etc.).
Bool_t IsaPointer() const
Return true if data member is a pointer.
Bool_t IsValid()
Return true if this data member object is pointing to a currently loaded data member.
TMethodCall * GetterMethod(TClass *cl=nullptr)
Return a TMethodCall method responsible for getting the value of data member.
TClass * fClass
!pointer to the class
void ExtractOptionsFromComment()
Build TOptionListItems from the member comment *OPTION={.
TDataType * GetDataType() const
Longptr_t GetOffset() const
Get offset from "this".
const char * GetTypeName() const
Get the decayed type name of this data member, removing const and volatile qualifiers,...
DeclId_t GetDeclId() const
TMethodCall * fValueSetter
!method which sets value;
const char * GetArrayIndex() const
If the data member is pointer and has a valid array size in its comments GetArrayIndex returns a stri...
TDataType * fDataType
!pointer to data basic type descriptor
const char * GetFullTypeName() const
Get the concrete type name of this data member, including const and volatile qualifiers.
TClass * GetClass() const
static TDataType * GetDataType(EDataType type)
Given a EDataType type, get the TDataType* that represents it.
Int_t Size() const
Get size of basic typedef'ed type.
Bool_t UpdateInterpreterStateMarker()
TDictionary & operator=(const TDictionary &other)
The TEnumConstant class implements the constants of the enum type.
The TEnum class implements the enum type.
static TEnum * GetEnum(const std::type_info &ti, ESearchAction sa=kALoadAndInterpLookup)
Global variables class (global variables are obtained from CINT).
virtual void * GetAddress() const
Return address of global.
A collection of TDataMember objects designed for fast access given a DeclId_t and for keep track of T...
void Update(TDictionary *member)
Move the member or data member to the expect set of list.
Method or function calling interface.
TObject * Clone(const char *newname="") const override
Make a clone of an object using the Streamer facility.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
TObject()
TObject constructor.
TDataMember * fDataMember
!Data member to which this option belongs
The TRealData class manages the effective list of all data members for a given class.
const char * GetName() const override
Returns name of object.
TDataMember * GetDataMember() const
Long_t GetThisOffset() const
const char * Data() const
TString & Append(const char *cs)
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
std::string GetLong64_Name(const char *original)
Replace 'long long' and 'unsigned long long' by 'Long64_t' and 'ULong64_t'.
ROOT::ESTLType UnderlyingIsSTLCont(std::string_view type)
Return the type of STL collection, if any, that is the underlying type of the given type.