Changeset 11432 for trunk/Mars


Ignore:
Timestamp:
07/18/11 09:30:07 (13 years ago)
Author:
tbretz
Message:
Added function DataMember which will return a pointer to a data member from the dictionary.
Location:
trunk/Mars/mbase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mbase/MParContainer.cc

    r9578 r11432  
    724724}
    725725
     726void *MParContainer::DataMember(const char *member)
     727{
     728    const Long_t off = IsA()->GetDataMemberOffset(member);
     729    if (off>0)
     730        return reinterpret_cast<char*>(this)+off;
     731
     732    *fLog << err << "Data member '" << member << "' not found in " << GetDescriptor() << endl;
     733    return 0;
     734}
     735
    726736// --------------------------------------------------------------------------
    727737//
  • trunk/Mars/mbase/MParContainer.h

    r9578 r11432  
    115115
    116116    virtual TMethodCall *GetterMethod(const char *name) const;
     117    virtual void        *DataMember(const char *name);
    117118
    118119    Bool_t WriteDataMember(ostream &out, const char *member, Double_t scale=1) const;
Note: See TracChangeset for help on using the changeset viewer.