diff --git a/doc/devel/uml/fig136325.png b/doc/devel/uml/fig136325.png index 7aa5b5289..4df084bb6 100644 Binary files a/doc/devel/uml/fig136325.png and b/doc/devel/uml/fig136325.png differ diff --git a/doc/devel/uml/index.html b/doc/devel/uml/index.html index a45c5e406..89c2dc30a 100644 --- a/doc/devel/uml/index.html +++ b/doc/devel/uml/index.html @@ -147,7 +147,7 @@ Documentation
Artifact Lumiera

the main executable to be built

Depends on common

Depends on gui

Depends on proc

Depends on backend

Stereotype: executable

-

executable associated with : effect, buildertool, segmentationtool, link, parameter, renderengine, glbuf, procnode, stateproxy, edl, fixture, glpipe, main, conmanager, clip, vrender, placement, sessionimpl, builderfacade, aframe, assembler, trafo, allocation, vframe, toolfactory, hub, buildable, abstractmo, exitnode, pathmanager, track, meta, fixedlocation, relativelocation, controllerfacade, rendergraph, pluginadapter, explicitplacement, auto, glrender, arender, renderstate, label, nodecreatertool, projector, interpolator, paramprovider, mask, mobject, source, frame

+

executable associated with : explicitplacement, auto, glrender, arender, renderstate, label, nodecreatertool, projector, interpolator, paramprovider, mask, mobject, source, frame, effect, buildertool, segmentationtool, link, parameter, renderengine, glbuf, procnode, stateproxy, edl, fixture, glpipe, main, conmanager, clip, vrender, placement, sessionimpl, builderfacade, aframe, assembler, trafo, allocation, vframe, toolfactory, hub, buildable, abstractmo, exitnode, pathmanager, track, meta, fixedlocation, relativelocation, controllerfacade, rendergraph, pluginadapter

Artifact main

Stereotype: source

diff --git a/tests/components/proc/mobject/placement-scope-test.cpp b/tests/components/proc/mobject/placement-scope-test.cpp index 29e1352f3..f89cc4f4d 100644 --- a/tests/components/proc/mobject/placement-scope-test.cpp +++ b/tests/components/proc/mobject/placement-scope-test.cpp @@ -22,21 +22,23 @@ #include "lib/test/run.hpp" +#include "lib/test/test-helper.hpp" +#include "proc/mobject/session/scope.hpp" #include "proc/mobject/session/test-scopes.hpp" //#include "lib/lumitime.hpp" //#include "proc/mobject/placement-ref.hpp" //#include "proc/mobject/placement-index.hpp" //#include "proc/mobject/test-dummy-mobject.hpp" -//#include "lib/util.hpp" +#include "lib/util.hpp" -//#include +#include //#include -//using util::isSameObject; +using util::isSameObject; //using lumiera::Time; //using std::string; -//using std::cout; -//using std::endl; +using std::cout; +using std::endl; namespace mobject { @@ -69,6 +71,65 @@ namespace test { PIdx index = build_testScopes(); UNIMPLEMENTED ("function test of placement scope interface"); + verifyLookup (index); + verifyNavigation (index); + } + + + typedef PlacementIndex::Query::iterator _Iter; + + /** @test for each Placement in our test "session", + * find the scope and verify it's in line with the index + */ + void + verifyLookup (PIdx ref_index) + { + for (_Iter elm = ref_index.query(); elm; ++elm) + { + ASSERT (elm->isValid()); + cout << *elm << endl; + Scope& scope1 = Scope::containing(*elm); + + RefPlacement ref (*elm); + Scope& scope2 = Scope::containing(ref); + + // verify this with the scope registered within the index... + PlacementMO& scopeTop = ref_index->getScope(*elm); + ASSERT (scope1 == scopeTop); + ASSERT (scope2 == scopeTop); + ASSERT (scope1 == scope2); + + ASSERT (isSameObject (scope1,scope2)); + } + } + + + /** @test navigate to root, starting from each Placement */ + void + verifyNavigation (PIdx ref_index) + { + for (_Iter elm = ref_index.query(); elm; ++elm) + { + Scope& scope = Scope::containing(*elm); + ASSERT (scope == *scope.ascend()); + for (Scope::iterator sco = scope.ascend(); sco; ++sco) + if (sco->isRoot()) + { + VERIFY_ERROR (INVALID, sco->getParent() ); + RefPlacement top = sco->getTop(); + RefPlacement root = ref_index->getRoot(); + + ASSERT (isSameObject (top,root)); + } + else + { + Scope& parent = sco->getParent(); + RefPlacement top = sco->getTop(); + Scope& parentsScope = Scope::containing(top); + RefPlacement topsTop = ref_index->getScope(top); ///////////////////TODO impact of Binding a Sequence? see Ticket #311 + ASSERT (topsTop == parentsScope); + ASSERT (isSameObject (topsTop, parentsScope.getTop())); + } } } }; diff --git a/uml/lumiera/136325.diagram b/uml/lumiera/136325.diagram index 80ebfe88a..2111137af 100644 --- a/uml/lumiera/136325.diagram +++ b/uml/lumiera/136325.diagram @@ -41,6 +41,8 @@ classcanvas 130437 class_ref 153989 // QueryResolver end note 131333 "this connection is established by the current session" xyzwh 361 39 2000 158 47 +textcanvas 131461 "the \"scope top\"" + xyzwh 357 180 2010 73 13 relationcanvas 128389 relation_ref 167557 // from ref 128261 z 1999 stereotype "<>" xyz 281 219 3000 to ref 128133 no_role_a no_role_b