|
Boost : |
From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2004-04-12 11:43:58
Rob Stewart ha escrito:
> From: "Thorsten Ottosen" <nesotto_at_[hidden]>
> > "JOAQUIN LOPEZ MU?Z" <joaquin_at_[hidden]> wrote in message
> > news:31c83531e9c8.31e9c831c835_at_tid.es...
> > >
> > >namespace boost{
> > > namespace multi_index{
> > > template<...>
> > > class indexed_container;
> > > }
> > > using multi_index::indexed_container;
> > >}
> >
> > I think multi_indexed_container (or multi_index_container) would be a
> > better name. A long name doesn't hurt here since
> > the container will take some lines to setup with typedef etc anyway.
> >
> > Then the class could be in the boost namespace and there could be a
> > helper namespace, index, which stored the index_list, unique etc.
> >
> > This would make the setup of the container look quite good IMO:
> >
> > typedef multi_indexed_container<
> > employee,
> > index::index_list<
> ^^^^^^^^^^
>
> Why not just "index::list?"
"list" seems too terse to me. It could lead the reader
to think it is some sort of container (which is not). Take into
account the namespace can be populated in the future
with other containers derived from the main one.
>
>
> > index::ordered_unique<index::identity<employee> >,
> > index::ordered_non_unique<index::member<employee,int,&employee:age> >,
> > index::sequenced<>
> > >
> > > employee_set;
> >
> > Before I wasn't sure where member, identity etc came from.
>
> It was the same namespace before, but I very much like your
> suggestion. The lingering question in my mind is whether your
> "index" namespace should be called "multi_index." That would tie
> the namespace to the class better and means that the library
> could be called Boost.MultiIndex without leading to confusion.
>
FWIW, I too prefer multi_index. boost::index seems way too
generic a name for a library of multi-indexed containers (specially
if we don't move inside boost::container.)
To sum it up, my 2nd proposal was:
namespace boost::multi_index, container boost::indexed_container
and Thorten's, with your proposed refinements, is
namespace boost::multi_index, container boost::multi_index_container
So it all boils down to choosing between
indexed_container/multi_index_container. No strong opinions
from my part here. There's still the pending issue of whether
to move into boost::container.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk