|
Boost : |
From: Craig Henderson (craigh_at_[hidden])
Date: 2001-02-26 04:36:16
I am looking for a solution to the problem of iterating through a list of a
list using STL iterator technique, and wonder if boost provides any such
functionality.
for example, I have definitions such as
class Element;
typedef ElementList_t std::list<Element const *>;
typedef GroupList_t std::list<ElementList const *>;
and given a GroupList I need to iterator all the elements in a manner along
the lines of
GroupList_t group;
ElementList_t::const_iterator iter;
for (iter = group.first_element(); iter!=group.last_element(); iter++)
{
Element const *pElement = *iter;
...
}
Now, obviously the iterator is going to have to be intelligent enough to
iterate each ElementList in turn and move onto the next when appropriate.
Before I begin development of such an iterator I thought it worth asking the
question of my peers ;)
TIA
Craig Henderson (new to boost)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk