|
Boost Users : |
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2008-03-04 11:26:53
Hello *,
I currently need to implement the following use case and was wondering if
this is possible with multi-index:
I have a class, for simplicity all members are public wihtout accessors and
mutators:
class entry
{
public:
field x;
field y;
filed z;
};
I need a multi-index index to remember the order in which the elements were
inserted and non uniquely index the inserted elements by hash of field x;
Now a client could do the following queries:
- get all entries in the order they were inserted (this is easy and I know
how to do it)
- get all entries which satisfy field x parameter in the order they were
inserted. I know that I can retrieve the values dependent on hash(x), but
these are probably not sorted. I know that I can project iterators, but can
I project (range_retireved_via_hashed_X) to
(range_retrieved_for_sequence_of_X)
May be I miss smth here or should split my data in some other way to satisfy
this condition.
With Kind Regards,
Ovanes Markarian
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