Boost logo

Boost :

Subject: Re: [boost] [paired ptr] Proposing a new smart pointer object formanaging bidirectional relationships between objects
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-05-03 11:46:40


----- Original Message -----
From: "Dan Walters" <dan683_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Sunday, May 02, 2010 12:28 PM
Subject: [boost] [paired ptr] Proposing a new smart pointer object formanaging bidirectional relationships between objects

Dear all,

I have been working on a proposal for a useful utility for managing
non hierarchal, bi-directional relationships between objects and as a
useful tool in object composition.

This utility is in the form of a type of templated smart pointer that
can connect to one single other pointer and manage the relationship
between the two pointers.

This paired_ptr object is intended for use as a member of (or at least
contained within) a user defined object and is conceptualized from the
needs of object composition.

_______________________________________________

There is also Boost.Bimap. Even if this is more general than what you are trying to achieve, maybe it is worth reading the documentation.

The advantage is that the CCat and the CDog classes can be independent one of each other.
_____________________
Vicente Juan Botet Escribá
http://viboes.blogspot.com/


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