68 PMO& root = index->getRoot();
80 CHECK (scopePosition ==
Scope(currentFocus));
81 CHECK (currentFocus == theFocus);
82 CHECK (2 == refs(currentFocus));
83 CHECK (2 == refs(theFocus));
94 CHECK (
Scope(focus).isRoot());
100 CHECK (
Scope(focus).isRoot());
101 focus.
shift (someObj);
102 CHECK (!
Scope(focus).isRoot());
104 CHECK (someObj == path.
getLeaf());
105 CHECK (
Scope(focus).getParent().getParent().isRoot());
109 CHECK (someObj !=
Scope(focus));
126 uint num_refs = refs (original);
127 CHECK (num_refs > 1);
130 cout << subF << endl;
131 CHECK (subF == original);
133 CHECK ( 1 == refs(subF) );
134 CHECK (num_refs == refs(original));
138 CHECK (subF2 != subF);
139 CHECK (subF == original);
140 cout << subF2 << endl;
146 cout << subF2 << endl;
149 cout << subF2 <<
"<<<--discovery exhausted" << endl;
152 cout << subF2 <<
"<<<--after pop()" << endl;
153 CHECK (subF2 == subF);
154 CHECK (2 == refs(subF2));
155 CHECK (2 == refs(subF));
158 cout << subF << endl;
160 CHECK ( 1 == refs(subF));
161 CHECK (num_refs == refs(original));
Current focus location to use as point-of reference for contents and location discovery queries.
QueryFocus & shift(Scope const &)
shift this QueryFocus to a container-like scope, causing it to navigate, changing the current ScopePa...
ScopePath const & currentPath() const
QueryFocus & pop()
cease to use this specific reference to the current frame.
ScopeQuery< MO >::iterator query() const
discover depth-first any matching object within current focus.
ScopeQuery< MO >::iterator explore() const
discover any matching object contained as immediate Child within current focus.
QueryFocus & reset()
discard any state and navigate current focus path to model root
static QueryFocus push()
push the "current QueryFocus" aside and open a new focus frame, which starts out at the same location...
Sequence of nested scopes within the high-level model.
Scope const & getLeaf() const
bool contains(Scope const &) const
_Parent::iterator iterator
A Placement scope within the high-level-model.
Scope getParent() const
retrieve the parent scope which encloses this scope.
void checkNavigation(QueryFocus &focus)
void manipulate_subFocus()
size_t refs(QueryFocus const &focus)
Helper: extract the refcount of the current path referred by the given focus.
PPIdx build_testScopes()
helper for tests: create a pseudo-session (actually just a PlacementIndex), which contains some neste...
std::shared_ptr< PlacementIndex > PPIdx
Namespace of Session and user visible high-level objects.
Steam-Layer implementation namespace root.
Test runner and basic definitions for tests.
Core of the session implementation datastructure.
Representation of the current scope when navigating the session model.
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
Subclass-1 is not defined "processible", thus will always be handled as DummyMO...
Unit test helper to generate a system of nested test scopes.