214 if (strcmp(name,
"unsigned char") != 0 &&
215 strncmp(name,
"unsigned short",
sizeof (
"unsigned short")) != 0 &&
216 strcmp(name,
"unsigned int") != 0 &&
217 strncmp(name,
"unsigned long",
sizeof (
"unsigned long")) != 0)
258 const char *
ptr1 = 0;
268 if ((opt_ptr=strstr(cmt,
"*OPTION={"))) {
273 ptr1 = strtok(opt_ptr ,
"{}");
275 Fatal(
"TDataMember",
"Internal error, found \"*OPTION={\" but not \"{}\" in %s.",
GetTitle());
278 ptr1 = strtok((
char*)0,
"{}");
280 Fatal(
"TDataMember",
"Internal error, found \"*OPTION={\" but not \"{}\" in %s.",
GetTitle());
285 strlcpy(opt,ptr1,2048);
296 ptr1=strtok((
char*) (cnt++ ? 0:opt),
";");
298 Int_t nch = strlen(ptr1)+1;
300 strlcpy(tok,ptr1,nch);
301 tokens[token_cnt]=tok;
307 for (i=0;i<token_cnt;i++) {
309 if (strstr(tokens[i],
"GetMethod")) {
310 ptr1 = strtok(tokens[i],
"\"");
312 Fatal(
"TDataMember",
"Internal error, found \"GetMethod\" but not \"\\\"\" in %s.",
GetTitle());
315 ptr1 = strtok(0,
"\"");
317 Fatal(
"TDataMember",
"Internal error, found \"GetMethod\" but not \"\\\"\" in %s.",
GetTitle());
328 if (strstr(tokens[i],
"SetMethod")) {
329 ptr1 = strtok(tokens[i],
"\"");
331 Fatal(
"TDataMember",
"Internal error, found \"SetMethod\" but not \"\\\"\" in %s.",
GetTitle());
334 ptr1 = strtok((
char*)0,
"\"");
336 Fatal(
"TDataMember",
"Internal error, found \"SetMethod\" but not \"\\\"\" in %s.",
GetTitle());
350 for (i=0;i<token_cnt;i++) {
351 if (strstr(tokens[i],
"Items")) {
352 ptr1 = strtok(tokens[i],
"()");
354 Fatal(
"TDataMember",
"Internal error, found \"Items\" but not \"()\" in %s.",
GetTitle());
357 ptr1 = strtok((
char*)0,
"()");
359 Fatal(
"TDataMember",
"Internal error, found \"Items\" but not \"()\" in %s.",
GetTitle());
364 strlcpy(opts,ptr1,2048);
373 ptr1 = strtok(opt_cnt++ ? (
char*)0:opts,
",");
388 TIter next(optionlist);
395 Bool_t islabel = (ptr1[0]==
'\"');
396 ptr2 = strtok((
char*)ptr1,
"=\"");
397 ptr3 = strtok(0,
"=\"");
405 Long_t l = std::strtol(ptr1, &strtolResult, 10);
406 bool isnumber = (strtolResult !=
ptr1);
421 Fatal(
"TDataMember",
"Internal error, couldn't recognize enum/global value %s.", ptr1);
440 for (i=0;i<token_cnt;i++)
if(tokens[i])
delete [] tokens[i];
446 TIter iEnumConst(enumDict->GetConstants());
450 enumConst->GetName(),enumConst->GetName());
597 if (dim < 0 || dim >=
fArrayDim)
return -1;
653 char *rdmc = (
char*)rdm->
GetName();
656 if (this->
IsaPointer() && rdmc[0] ==
'*') rdmc++;
658 if (rdm->GetDataMember() !=
this)
continue;
659 if (strcmp(rdmc,
GetName()) == 0) {
660 offset = rdm->GetThisOffset();
663 if (strcmp(rdm->GetName(),
GetName()) == 0) {
664 if (rdm->IsObject()) {
665 offset = rdm->GetThisOffset();
669 if (strstr(rdm->GetName(),dmbracket.
Data())) {
670 offset = rdm->GetThisOffset();
704 if ( cl)
return cl->
Size();
761 DataMemberInfo_t *info
833 const char *dataname =
GetName();
836 gettername.
Form(
"Get%s", dataname+1);
839 gettername.
Form(
"Is%s", dataname+1);
842 gettername.
Form(
"Has%s", dataname+1);
879 const char *dataname =
GetName();
882 settername.
Form(
"Set%s", dataname+1);
883 if (strstr(settername,
"Is")) settername.
Form(
"Set%s", dataname+3);
936 void TDataMember::Streamer(
TBuffer&
b) {
962 Long_t tglmask,
const char *
name,
const char *label)
966 fValueMaskBit = valmask;
967 fToggleMaskBit = tglmask;
void Init(bool afterReading)
Routines called by the constructor and Update to reset the member's information.
virtual const char * GetName() const
Returns name of object.
TMethodCall * SetterMethod(TClass *cl)
Return a TMethodCall method responsible for setting the value of data member.
A collection of TDataMember objects designed for fast access given a DeclId_t and for keep track of T...
The TEnum class implements the enum type.
TMethodCall * GetterMethod(TClass *cl=0)
Return a TMethodCall method responsible for getting the value of data member.
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual const char * DataMemberInfo_ValidArrayIndex(DataMemberInfo_t *) const
const char * GetFullTypeName() const
Get full type description of data member, e,g.: "class TDirectory*".
Long_t GetOffsetCint() const
Get offset from "this" using the information in CINT only.
Bool_t UpdateInterpreterStateMarker()
the Cling ID of the transaction that last updated the object
All ROOT classes may have RTTI (run time type identification) support added.
Short_t GetDeclFileLine() const
R__EXTERN TVirtualMutex * gInterpreterMutex
Bool_t IsEnum() const
Return true if data member is an enum.
TDictionary & operator=(const TDictionary &other)
Int_t GetUnitSize() const
Get the sizeof the underlying type of the data member (i.e.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual Bool_t DataMemberInfo_IsValid(DataMemberInfo_t *) const
const char * GetTypeName() const
Get type of data member, e,g.: "class TDirectory*" -> "TDirectory".
virtual DataMemberInfo_t * DataMemberInfo_FactoryCopy(DataMemberInfo_t *) const
Buffer base class used for serializing objects.
TMethodCall * fValueSetter
method that returns a value;
TList * GetOptions() const
Returns list of options - list of TOptionListItems.
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
virtual void * GetAddress() const
Return address of global.
virtual TObject * Clone(const char *newname="") const
Make a clone of an collection using the Streamer facility.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
TMethodCall * fValueGetter
Bool_t IsValid()
Return true if this data member object is pointing to a currently loaded data member.
virtual const char * DataMemberInfo_Title(DataMemberInfo_t *) const
Bool_t IsBasic() const
Return true if data member is a basic type, e.g. char, int, long...
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
void Clear()
Clear string without changing its capacity.
TString & Append(const char *cs)
TClass * fClass
pointer to CINT data member info
ClassInfo_t * GetClassInfo() const
TDataType * GetDataType() const
virtual bool Update(DataMemberInfo_t *info)
Update the TFunction to reflect the new info.
virtual Long_t DataMemberInfo_Property(DataMemberInfo_t *) const
virtual ~TDataMember()
TDataMember dtor deletes adopted CINT DataMemberInfo object.
Method or function calling interface.
virtual const char * TypeName(const char *s)=0
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...
TDataMember & operator=(const TDataMember &)
assignment operator
TCppMethod_t GetMethod(TCppScope_t scope, TCppIndex_t imeth)
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
const char * GetMethodName() const
virtual int DataMemberInfo_MaxIndex(DataMemberInfo_t *, Int_t) const
void BuildRealData(void *pointer=0, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
virtual const char * DataMemberInfo_TypeName(DataMemberInfo_t *) const
virtual void DataMemberInfo_Delete(DataMemberInfo_t *) const
TList * fOptions
method which sets value;
This class defines an abstract interface that must be implemented by all classes that contain diction...
void Update(TDictionary *member)
Move the member or data member to the expect set of list.
virtual Long_t DataMemberInfo_TypeProperty(DataMemberInfo_t *) const
virtual TObject * Remove(TObject *obj)
Remove object from the list.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
char * Form(const char *fmt,...)
Int_t Size() const
Return size of object of this class.
The TRealData class manages the effective list of all data members for a given class.
The TEnumConstant class implements the constants of the enum type.
Int_t GetArrayDim() const
Return number of array dimensions.
The ROOT global object gROOT contains a list of all defined classes.
Global variables class (global variables are obtained from CINT).
Long_t GetOffset() const
Get offset from "this".
virtual Long_t DataMemberInfo_Offset(DataMemberInfo_t *) const
const char * GetParams() const
const char * GetTrueTypeName() const
Get full type description of data member, e,g.: "class TDirectory*".
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
TList * GetListOfRealData() const
TDataType * fDataType
pointer to the class
#define R__LOCKGUARD(mutex)
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.
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
virtual const char * DataMemberInfo_Name(DataMemberInfo_t *) const
Mother of all ROOT objects.
Int_t IsSTLContainer()
The return type is defined in TDictionary (kVector, kList, etc.)
Long_t fOffset
pointer to data basic type descriptor
static TEnum * GetEnum(const std::type_info &ti, ESearchAction sa=kALoadAndInterpLookup)
virtual void Add(TObject *obj)
const char * GetArrayIndex() const
If the data member is pointer and has a valid array size in its comments GetArrayIndex returns a stri...
virtual const char * DataMemberInfo_TypeTrueName(DataMemberInfo_t *) const
Int_t Size() const
Get size of basic typedef'ed type.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
virtual int DataMemberInfo_ArrayDim(DataMemberInfo_t *) const
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
TDataMember(const TDataMember &)
copy constructor
R__EXTERN TInterpreter * gCling
virtual const char * GetName() const
Returns name of object.
TClass * GetClass() const
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Bool_t IsaPointer() const
Return true if data member is a pointer.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual const char * GetTitle() const
Returns title of object.
DeclId_t GetDeclId() const
const char * Data() const