On Wed, Oct 30, 2002 at 04:00:51PM +0100, Lars Gullik Bjønnes wrote:

> and I didn't really understand the complete Andre method. Care to give
> me a recap?

class Base {

        virtual AInset * asAInset() { return 0 } 
        virtual BInset * asBInset() { return 0 } 
        virtual CInset * asCInset() { return 0 } 
}

class AInset : public Base {

        virtual AInset * asAInset() { return this; }

}

...

        AInset * a(inset->asAInset());
        if (!a)
                break;

        a->someAMethod();


-- 
""All the people we like are We, and everyone else is They."
        - Kipling

Reply via email to