Hi,

 

in Example 1 there is a structure:

 

struct employee
{
  int         id;
  std::string name;
  int         age;
  …
};

 

Is it possible to create automatically

A)      container with id as an index  

B)      a view with name as index

C)      a view with age as index ?

 

For this example it is easy to create the containers and views by hand but I plan to
use at least 10 structures with many dimensions.

For some containers I also need hash_indices -  so there is really a lot of similar code, which

I don’t want to have.

 

Also I want to provide iterators or one general (template) iterator for all dimensions. How would
you write such a general iterator?

There should be a function that takes for example “employee_name” or “employee_id” as a parameter to query
the employee container. It would also be interesting to have a function that creates an iterator based only on the

Information, for example,  multi_index::container(1)_index(2).

 

Is there a function that calculates the max.  index number of a certain container?

 

Thank you very much,

 

Alex Schuh

 

 

 

 

 

 


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.1/104 - Release Date: 16.09.2005