$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: rogeeff (rogeeff_at_[hidden])
Date: 2002-02-07 20:48:41
Hi,
I recently meet the need for joining iterator, i.e. iterator that
traverse through "concatenation" of two collections; first elements
of first collection then the second. Inducing example looked like
this:
Let say we have a storage of objects that need to provide an access
to them by integer ID. IDs could not constitute continuous set. But
we can insure that tere is a continuous subset of most frequently
accessed IDs. So storage implemented as combination of vector and map.
Now I need an iterator for this storage that will traverse through
all the objects. Here where joining iterator come to use.
Implementation and test module are located here:
http://groups.yahoo.com/group/boost/files/Joining%20Iterator%
20Adaptor/
If boosters will find it intersting and reusable I could also provide
example and docs.
There is one small flaw with current implementation: it could lie
sometimes about resulting iterator category. Does anybody know
elegant way to deduce most restrictive category of two provided?
Gennadiy.