Boost logo

Boost Users :

Subject: [Boost-users] Doubt about using boost:multiindex containers with classes
From: José Augusto Jr. (jamajbr_at_[hidden])
Date: 2010-11-14 16:47:15


Dear All,

I've written a set of classes. Suppose I have a class called WorkCenter and
another called Machine. I created a smart pointer to each Machine object.
Each Workcenter has one or more Machines.
I could create a vector of MachineSmartPointers. But I will need to search
for Machines by some different index keys, like by the unique ID (an Int) or
by Tag (a String).

I could not find any example like that. In the Boost documentation the
example is made with a struct. I know that a class, in C++, is very similar
to a Struct. But I dont know how to write this code.
Could someone give me a light on this?

Thanks in advance.

-- 
sds.
Written by - Escrito por:
José Augusto M. Andrade Jr. - JamaJ


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net