Boost logo

Boost :

From: JOAQUIN LOPEZ MU?Z (joaquin_at_[hidden])
Date: 2004-04-11 12:38:29


Hi Pavel,

----- Mensaje original -----
De: Pavel Vozenilek <pavel_vozenilek_at_[hidden]>
Fecha: Sábado, Abril 10, 2004 11:50 pm
Asunto: [boost] Re: [indexed_set] revised naming proposal

>
> "JOAQUIN LOPEZ MU?Z" <joaquin_at_[hidden]> wrote
>
> > This is my 2nd proprosal for naming of the library
> > formerly known as Boost.IndexedSet.
> >
> It may be helpful to add examples for each
> suggested name, for easier orientation.
>

With pleasure:

NAMESPACE+CONTAINER NAME

Current:

namespace boost{
  namespace indexed_sets{
    template<...>
    class indexed_set;
  }
  using indexed_sets::indexed_set;
}

Proposed:

namespace boost{
  namespace multi_index{
    template<...>
    class indexed_container;
  }
  using multi_index::indexed_container;
}

INDEX NAMING

Current:

typedef indexed_set<
  employee,
  index_list<
    unique<identity<employee> >,
    non_unique<member<employee,int,&employee:age> >,
    sequenced<>
>
> employee_set;

Proposed:

typedef indexed_container<
  employee,
  index_list<
    ordered_unique<identity<employee> >,
    ordered_non_unique<member<employee,int,&employee:age> >,
    sequenced<>
>
> employee_set;

NTH_INDEX_TYPE AND FAMILIY

Current:

  typedef index_type<indexed_t,some_tag>::type index_t;
  typedef nth_index_type<indexed_t,n>::type index_t2;
  typedef indexed_t::index_type<some_tag>::type index_t3;
  typedef indexed_t::nth_index_type<n>::type index_t4;
  typedef iterator_type<indexed_t,some_tag>::type iterator_t;
  typedef nth_iterator_type<indexed_t,n>::type iterator_t2;
  etc.

Proposed:

  typedef index<indexed_t,some_tag>::type index_t;
  typedef nth_index<indexed_t,n>::type index_t2;
  typedef indexed_t::index<some_tag>::type index_t3;
  typedef indexed_t::nth_index<n>::type index_t4;
  typedef index_iterator<indexed_t,some_tag>::type iterator_t;
  typedef nth_index_iterator<indexed_t,n>::type iterator_t2;
  etc.

UPDATE MEMFUN

Current:

  employee_set es;
  es.update(it,new_value);

Proposed:

  employee_set es;
  es.replace(it,new_value);

Best,

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