Autowiring
1.0.3
A C++ Inversion of Control Framework
|
A virtual container which may be used to enumerate all children of a particular context More...
#include <ContextEnumerator.h>
Classes | |
class | iterator |
The iterator class which is actually used in enumerating contexts. More... | |
Public Member Functions | |
ContextEnumerator (void) | |
Constructs a context enumerator for the current context More... | |
ContextEnumerator (CoreContext &root) | |
Constructs a context enumerator for the current context More... | |
ContextEnumerator (const std::shared_ptr< CoreContext > &root) | |
Constructs an enumerator which may enumerate all of the contexts rooted at the specified root More... | |
A virtual container which may be used to enumerate all children of a particular context
The context enumerator will enumerate contexts in a preorder traversal. A context enumerator is a minimally locked collection, and is guaranteed to iterate over a context's children safely in a multithreaded way even if the context being enumerated is modified while the enumeration takes place.
Iterators returned by this enumerator is guaranteed to traverse all children of the bound root context which were children at the time of the first call to iterator::operator++. It will also enumerate some of the children which were added after the call to operator++. It is guaranteed not to enumerate any context which is currently being destroyed.
All context enumerators are inclusive, meaning that they will also enumerate the root. The root is guaranteed to be enumerated before any children.
ContextEnumerator::ContextEnumerator | ( | void | ) |
Constructs a context enumerator for the current context
ContextEnumerator::ContextEnumerator | ( | CoreContext & | root | ) |
Constructs a context enumerator for the current context
ContextEnumerator::ContextEnumerator | ( | const std::shared_ptr< CoreContext > & | root | ) |
Constructs an enumerator which may enumerate all of the contexts rooted at the specified root
root | The root context, optionally null, in which case this type is instantiated as an end-iterator |