Key iterators

hierclass::base::iterator b=h->begin(), e=h->end();

const std::list<keyClass> &name=*b;

hierclass::base::readlock lock=b.clone();

begin() acquires a reader lock on the container, then return a beginning value for an input iterator over a sequence of keys that have values in the container. end() returns the ending iterator value. end() does not acquire a reader lock. A non ending-valued iterator releases its read lock when it reaches the ending iterator value.

When the container is empty, begin() acquires a reader lock, releases it, then returns the ending iterator value.

A non-ending iterator also implements clone(), which clones a reader lock, positioned at the node referenced by the iterator's current key value.