Boost logo

Boost :

Subject: Re: [boost] [intrusive] rtti_base class proposition
From: Ireneusz Szpilewski (irek_at_[hidden])
Date: 2009-10-22 16:38:56


----- Original Message -----
From: "Stewart, Robert" <Robert.Stewart_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, October 22, 2009 5:04 PM
Subject: Re: [boost] [intrusive] rtti_base class proposition

> Ireneusz Szpilewski wrote:
>> Joel Falcou wrote:
>>
>> > you just have to have Cat and Dog inherit from
>> > FactoryProduct and not
>> > from an arbitrary cosmic base class that has no meaning in
>> > the model.
>>
>> OK, lets call it boost::object :-).
>
> You're missing the point. It isn't the name he's faulting. It's the use
> of a meaningless ABC just to add RTTI support. As I said before, you
> create an ABC that represents the root of a hierarchy for the given use
> case, not use a one-size-fits-all ABC.

>In this case, as Joel noted, Product is your ABC. Give it appropriate
>virtual functions and a virtual destructor and create collections of
>Products to your hearts content. Why would you need a container of
>Products
>and Organs (as in body parts) when one belongs to a factory and the other
>to
>a hospital? They are unrelated, so they shouldn't derive from a common
>base
>class

Because I am a Juggler.

OK I give up, thanks :-)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk