Hello Maarten, In order to access protected member from interpreted derived class, you need to use special pragma statement in LinkDef.h #pragma link class+protected [classname]; Otherwise, offset to protected members are not properly recognized. Thank you Masaharu goto >Date: 03 Jul 2002 16:03:33 -0400 >From: Maarten Ballintijn <maartenb@mit.edu> >To: Masaharu Goto <MXJ02154@niftyserve.or.jp> >Cc: Fons Rademakers <Fons.Rademakers@cern.ch>, Rene Brun <Rene.Brun@cern.ch> >Subject: Problem with protected members in case of interpreted classderiving from compiled class > >Dear Masa, > >Can you please help with the following. For the TSelector mechanism >in ROOT we use a proxy class to be able to support (in a limited way) >an interpreted class deriving from a compiled class. It seems a problem >has developed which is related to the use of protected members >in the compiled class. > >To illustrate the problem I created a simple version of the code. >(See attached files, build the library and run do.C to see the >problem). If I uncomment the 'protected:' statement the >code starts to behave differently. It seems there are offset errors >in accessing the object members. (see e.g. fUniqueID from the Dump()) > >Let me know if you need more details! > >Thanks in advance, > >Maarten. > >-- >Dr. Maarten Ballintijn > >MASSACHUSETTS INSTITUTE OF TECHNOLOGY Email: maartenb@mit.edu >Room 24-410 Phone: +1 (617) 253 4184 >77 Massachusetts Avenue Fax: +1 (617) 253 4360 >Cambridge, MA 02139, USA http://www.mit.edu/~maartenb >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:59 MET