|
Boost : |
From: Daryle Walker (darylew_at_[hidden])
Date: 2004-01-02 13:53:24
On 1/1/04 9:58 PM, "Thorsten Ottosen" <nesotto_at_[hidden]> wrote:
> "Daryle Walker" <darylew_at_[hidden]> wrote in message
> news:BC19CB19.4515%darylew_at_hotmail.com...
>> On 12/27/03 8:23 AM, "Thorsten Ottosen" <nesotto_at_[hidden]> wrote:
> [snip]
>>> Is this a riddle of some kind :-) I'm sorry Daryle, but I don't quite
>>> understand. There is one other name I have though of, smart containers, but
>>> that seems a bit pop-smart.
>>
>> You can think of a class as:
>> 1. How it is implemented
>> 2. What problems it solves
>>
>> You keep focusing on [1] (cool method of using pointers within containers).
>> As an user, I don't care about [1]; I only care about [2] (storing
>> Polymorphic Heterogeneous objects in the same container). Your naming could
>> reflect that (e.g. "ph_vector").
>
> There is no requierement about the objects being polymorphic.
I know that, but I don't think that the non-polymorphic cases are useful.
If all the elements are the same type, you can use a standard container. If
the elements are of differing un-related types, then you are restricted in
what you can do (like no deletion) unless you give element-pointers the
properties of full-blown smart pointers, which is probably overkill for most
applications.
Are there common cases where you would need non-polymorphic capability?
-- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk