46 using std::placeholders::_1;
64 inline function<bool(PDummy)>
67 return [=] (PDummy candidate)
69 REQUIRE (candidate.isValid());
70 string desc(candidate->operator
string());
71 return contains(desc, expectedText);
106 CHECK (dummy1->isValid());
109 string elementID = dummy1->operator string();
110 CHECK (contains (elementID,
"MO2"));
112 string specificID = elementID.substr(10);
117 CHECK (dummy2->isValid());
118 CHECK (dummy2 == dummy1);
122 PDum newPlacement(dummy1.getPlacement());
123 CHECK (testSession->contains(dummy1));
124 CHECK (!testSession->contains(newPlacement));
127 testSession->clear (dummy1);
128 CHECK (!testSession->contains(dummy1));
136 testSession->insert(newPlacement, otherElm);
139 CHECK (dummy2 != dummy1);
140 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.
Simple 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.