Dear Nick,
this was indeed supported. The support has vanished during an optimization of the dictionary size: we now assume that the base class provides the function access for the interpreter. I will add a check for the base class's dictionary.
Thanks for reporting!
Cheers, Axel.
Nick West wrote:
> Dear Roottalk,
>
> We have come across a problem where from CINT we are unable to call
> methods of a class that has been built with its rootcint dictionary.
> It only occurs when the class subclasses one that does not have a
> dictionary and the method called overrides a method in the base class.
>
> For example if we have class A:-
>
> class A {
>
> public:
> A() {}
> virtual ~A() {}
> virtual void Speak();
> };
>
> and a subclass B:-
>
> class B : public A {
>
> public:
> B() {}
> virtual ~B() {}
> virtual void Speak();
> virtual void Talk();
> ClassDef(B,0)
> };
>
> method Talk() can be called as it doesn't override anything in A but
> attempting to use B::Speak() fails:-
>
> Error: Speak() header declared but not defined (tmpfile):1:
> *** Interpreter error recovered ***
>
> This used to work, at least as late as 5.12, but perhaps we were lucky
> and the case where a subclass has a dictionary but its base class
> does not, isn't supported. If this case is supposed to work then the
> following little tar file, which builds a shareable library from A.h,
> A.cxx and B.h, B.cxx demonstrates the problem. To test:-
>
> 1) Create a scratch directory
>
> 2) Setup ROOTSYS as required
>
> 3) Unwind the tar file and type
>
> ./test.sh
>
> and should produce:-
>
> CINT/ROOT C/C++ Interpreter version...
> Type ? for help. Commands must be C++ statements.
> Enclose multiple statements between { }.
> B <== This is
> calling B:Talk()
> Error: Speak() header declared but not defined (tmpfile):1: <== This is
> calling B:Speak()
> *** Interpreter error recovered ***
>
> Thanks,
>
> Nick West.
>
>
Received on Tue Feb 05 2008 - 09:49:05 CET
This archive was generated by hypermail 2.2.0 : Tue Feb 05 2008 - 17:50:01 CET