|
Boost : |
From: Kevin Atkinson (kevinatk_at_[hidden])
Date: 2000-03-08 14:23:02
On Wed, 8 Mar 2000, Beman Dawes wrote:
> At 05:05 AM 3/8/00 -0500, Kevin Atkinson wrote:
>
> >Hopefully now that you finally understand the point of these classes
> you
> >can understand the more generic code.
>
> Let's make sure I understand the ideas first.
>
> In CopyPtr, you are introducing two smart pointer techniques:
>
> 1) Deep copy semantics. The current boost smart pointers used
> shallow copy semantics. It isn't that one set of semantics is better
> than the other; both have their appropriate uses.
Could you please define those terms I am not 100% as what you mean.
>
> 2) Incomplete type support via implementation in a separate header
> of member functions requiring complete types. This can lead to
> better designs by keeping implementation details opaque (hidden
> behind an incomplete type) and reducing compilation
> interdependencies.
>
> The two techniques are somewhat orthogonal. Incomplete type support
> is particularly appropriate for deep copy semantics, but it could
> also be used in variations of the current boost smart pointers so
> they could work with opaque types having non-trivial destructors.
>
> In other words, it would be complete (although not necessarily
> desirable) to have:
>
> deep_opaque_ptr // also known as CopyPtr
> deep_ptr
> shared_opaque_ptr
> shared_ptr // same as current
> scoped_opaque_ptr
> scoped_ptr // same as current
Yes it would but The more diffrent varites of pointers we have the more
combinations we will get. There has got to be a better way.
Also what is the point of deep_ptr? Why not just store the object
directly with out any pointers?
I have also intrudced a more generic pointer by allowing any sort of
memory managment to be used......
--- Kevin Atkinson kevinatk_at_[hidden] http://metalab.unc.edu/kevina/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk