37 using std::placeholders::_1;
55 inline function<bool(PDummy)>
58 return [=] (PDummy candidate)
60 REQUIRE (candidate.isValid());
61 string desc(candidate->operator
string());
62 return contains(desc, expectedText);
97 CHECK (dummy1->isValid());
100 string elementID = dummy1->operator string();
101 CHECK (contains (elementID,
"MO2"));
103 string specificID = elementID.substr(10);
108 CHECK (dummy2->isValid());
109 CHECK (dummy2 == dummy1);
113 PDum newPlacement(dummy1.getPlacement());
114 CHECK (testSession->contains(dummy1));
115 CHECK (!testSession->contains(newPlacement));
118 testSession->clear (dummy1);
119 CHECK (!testSession->contains(dummy1));
127 testSession->insert(newPlacement, otherElm);
130 CHECK (dummy2 != dummy1);
131 CHECK (dummy2 != newPlacement);
_PickRes< PRED >::Result pick(PRED const &searchPredicate)
pick the first element from session satisfying a predicate.
An active (smart-ptr like) external reference to a specifically placed MObject "instance" within the ...
CStr cStr(std::string const &rendered)
convenience shortcut: forced conversion to c-String via string.
PPIdx build_testScopes()
helper for tests: create a pseudo-session (actually just a PlacementIndex), which contains some neste...
bool isSharedPointee(MORef< MOX > const &ref1, MORef< MOY > const &ref2)
check if the two references actually share ownership on the same underlying MObject (as opposed to re...
static Scope containing(PlacementMO const &aPlacement)
discover the enclosing scope of a given Placement
Steam-Layer implementation namespace root.
Namespace of Session and user visible high-level objects.
Sequence of nested scopes within the high-level model.
A Placement scope within the high-level-model.
Unit test helper to generate a system of nested test scopes.
External MObject/Placement reference.
Simplistic test class runner.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
Search and query services to discover contents of the session.
function< bool(PDummy)> elementID_contains(string expectedText)
a filter predicate to pick some objects from a resultset, based on string match with the element's se...
An Object representing a sequence of nested scopes within the Session.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
PlacementRef< MO > const & getRef() const
allow to use a MObjectRef like a (bare) PlacementRef
bool contains(SEQ const &cont, typename SEQ::const_reference val)
shortcut for brute-force containment test in any sequential container
Access point to session global search and query functions.