Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-07-12 10:05:32


Using the technique described in
http://www.egroups.com/files/boost/Feature+Modeling/feature_modeling.htm, I
have taken a first cut at building a smart pointer feature diagram.

For now, the feature diagram is in pure text form (see below) for
convenient email discussion. As it matures, it would be converted to HTML
so that the feature names can link to descriptions. See
http://www.egroups.com/files/boost/Feature+Modeling/smart_pointer_concept.htm
for what one of the descriptions might look like.

Long term readers of this list should (I hope) recognize most of the
features based on the names alone. Description pages would follow
eventually.

The motivation of this post is both to start a discussion of feature
modeling and generative programming techniques in general, and to actually
make some progress on smart pointers in particular.

--Beman

----- Smart Pointer Feature Diagram ----

Draft of 12 July 2000

smart-pointer ( ownership
                  release
                  T-visability
                  operations // dereference, get, etc.
                  size
                  [multi-ptr-aquisition-safe] // shared-in-ptr
                )

ownership ( tightly-held // scoped_ptr
                | transferable // auto_ptr
                | shared // shared_ptr, linked_ptr, etc.
                | weak // ??? weak_ptr
                | copyable // copy_ptr
                           )

release ( non-array
                | array
                | user-supplied
                )

T-visability ( complete
                | incomplete-OK-if-trivial-dtor
                | incomplete-OK
                )

operations ( with-conversion-to-T-star
                | without-conversion-to-T-star
                )

// Choosing a size forces some of the other features.
// Likewise, Choosing some of the other features forces size.
// This may be an example of an "aspect"; I need to read C&E more
// to be sure
size ( one-ptr // scoped_ptr, auto_ptr, copy_ptr
                | two_ptr // shared_ptr
                | three_ptr // linked_ptr
                )

shared ( invasive-reference-count // shared_in_ptr
                | separate-reference-count // shared_ptr
                | linked-list // linked_ptr
                )

separate-reference-count
                ( direct // shared_ptr
                | indirect // like shared_ptr but ptr stored with count
                )

---- end ----


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