refined and clarified planning of Scope and QueryFocus

This commit is contained in:
Fischlurch 2009-10-16 21:20:30 +02:00
parent 9451a6888f
commit cfc17e75ba
12 changed files with 55 additions and 22 deletions

View file

@ -19,6 +19,8 @@
<p>Declaration :</p><ul><li>C++ : class Scope </li></ul><div class="sub">
<a name="refrelation177541"></a>
<table><tr><td><div class="element">Relation <b>&lt;unidirectional association&gt;</b></div></td></tr></table><p>Declaration :</p><ul><li>Uml : # : <a href="class152453.html#refclass152453"><b>PlacementRef</b></a>, multiplicity : 1</li><li>C++ : protected: <a href="class152453.html#refclass152453"><b>PlacementRef</b></a>* </li></ul><p>Stereotype: holds</p>
</div>
<a name="refoperation138885"></a>
<table><tr><td><div class="element">Operation <b>getParent</b></div></td></tr></table><p>Declaration :</p><ul><li>Uml : + getParent() : <a href="class153349.html#refclass153349"><b>Scope</b></a></li><li>C++ : public: <a href="class153349.html#refclass153349"><b>Scope</b></a> getParent () </li></ul></div>
<p>All public operations : <a href="class153349.html#refoperation138885"><b>getParent</b></a> </p>
</body>
</html>

View file

@ -18,7 +18,7 @@
<a name="refclass153605"></a>
<p>Declaration :</p><ul><li>C++ : class QueryFocus </li></ul><div class="sub">
<a name="refrelation177797"></a>
<table><tr><td><div class="element">Relation <b>scopes (&lt;unidirectional association&gt;)</b></div></td></tr></table><p>Declaration :</p><ul><li>Uml : # scopes : <a href="class153477.html#refclass153477"><b>ScopePath</b></a></li><li>C++ : protected: <a href="class153477.html#refclass153477"><b>ScopePath</b></a>* scopes</li></ul><p>Stereotype: has_a</p>
<table><tr><td><div class="element">Relation <b>scopes (&lt;unidirectional association&gt;)</b></div></td></tr></table><p>Declaration :</p><ul><li>Uml : # scopes : <a href="class153477.html#refclass153477"><b>ScopePath</b></a></li><li>C++ : protected: <a href="class153477.html#refclass153477"><b>ScopePath</b></a>* scopes</li></ul><p>Stereotype: owns</p>
</div>
</body>
</html>

View file

@ -20,7 +20,7 @@
<div class="sub">
<a name="refrelation178181"></a>
<table><tr><td><div class="element">Relation <b>&lt;unidirectional association&gt;</b></div></td></tr></table><p>Declaration :</p><ul><li>Uml : # : <a href="class153733.html#refclass153733"><b>QueryFocusStack</b></a></li><li>C++ : protected: <a href="class153733.html#refclass153733"><b>QueryFocusStack</b></a>* </li></ul><a name="refrelation178565"></a>
<table><tr><td><div class="element">Relation <b>&lt;unidirectional association&gt;</b></div></td></tr></table><p>Declaration :</p><ul><li>Uml : # : <a href="class153989.html#refclass153989"><b>QueryResolver</b></a></li><li>C++ : protected: <a href="class153989.html#refclass153989"><b>QueryResolver</b></a>* </li></ul><p>Stereotype: use</p>
<table><tr><td><div class="element">Relation <b>&lt;unidirectional association&gt;</b></div></td></tr></table><p>Declaration :</p><ul><li>Uml : # : <a href="class153989.html#refclass153989"><b>QueryResolver</b></a></li><li>C++ : protected: <a href="class153989.html#refclass153989"><b>QueryResolver</b></a>* </li></ul><p>Stereotype: uses</p>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View file

@ -38,6 +38,7 @@
<tr bgcolor=#f0f0f0><td><a href="index.html#refoperation133637" target = "projectFrame"><b>getFixture</b></a></td><td>operation</td><td>While the session can be comprised of several EDLs, <br />there is only one Fixture, which represents the actual<br />configuration of all Objects to be rendered</td></tr>
<tr bgcolor=#f0f0f0><td><a href="index.html#refoperation128181" target = "projectFrame"><b>getFrame</b></a></td><td>operation</td><td>mode = READ, WRITE, ...</td></tr>
<tr bgcolor=#f0f0f0><td><a href="index.html#refoperation133125" target = "projectFrame"><b>getID</b></a></td><td>operation</td><td></td></tr>
<tr bgcolor=#f0f0f0><td><a href="index.html#refoperation138885" target = "projectFrame"><b>getParent</b></a></td><td>operation</td><td></td></tr>
<tr bgcolor=#f0f0f0><td><a href="index.html#refoperation132101" target = "projectFrame"><b>getParents</b></a></td><td>operation</td><td>List of entities this asset depends on or requires to be functional. May be empty. The head of this list can be considered the primary prerequisite</td></tr>
<tr bgcolor=#f0f0f0><td><a href="index.html#refoperation128645" target = "projectFrame"><b>getPlaylistForRender</b></a></td><td>operation</td><td></td></tr>
<tr bgcolor=#f0f0f0><td><a href="index.html#refoperation128389" target = "projectFrame"><b>getStateProxy</b></a></td><td>operation</td><td></td></tr>

View file

@ -44,6 +44,7 @@
<tr bgcolor=#f0f0f0><td><a href="class139653.html#refoperation133637"><b>getFixture</b></a></td><td><a href="class139653.html#refclass139653"><b>Session</b></a></td><td>While the session can be comprised of several EDLs, <br />there is only one Fixture, which represents the actual<br />configuration of all Objects to be rendered</td></tr>
<tr bgcolor=#f0f0f0><td><a href="class128181.html#refoperation128181"><b>getFrame</b></a></td><td><a href="class128181.html#refclass128181"><b>File</b></a></td><td>mode = READ, WRITE, ...</td></tr>
<tr bgcolor=#f0f0f0><td><a href="class136581.html#refoperation133125"><b>getID</b></a></td><td><a href="class136581.html#refclass136581"><b>AssetManager</b></a></td><td></td></tr>
<tr bgcolor=#f0f0f0><td><a href="class153349.html#refoperation138885"><b>getParent</b></a></td><td><a href="class153349.html#refclass153349"><b>Scope</b></a></td><td></td></tr>
<tr bgcolor=#f0f0f0><td><a href="class136453.html#refoperation132101"><b>getParents</b></a></td><td><a href="class136453.html#refclass136453"><b>Asset</b></a></td><td>List of entities this asset depends on or requires to be functional. May be empty. The head of this list can be considered the primary prerequisite</td></tr>
<tr bgcolor=#f0f0f0><td><a href="class128261.html#refoperation128645"><b>getPlaylistForRender</b></a></td><td><a href="class128261.html#refclass128261"><b>Fixture</b></a></td><td></td></tr>
<tr bgcolor=#f0f0f0><td><a href="class130949.html#refoperation128389"><b>getStateProxy</b></a></td><td><a href="class130949.html#refclass130949"><b>RenderState</b></a></td><td></td></tr>

View file

@ -22,6 +22,7 @@
#include "proc/mobject/session/scope.hpp"
#include "proc/mobject/session/query-focus-stack.hpp"
#include "proc/mobject/mobject.hpp"
//#include "proc/mobject/session/track.hpp"
//#include "proc/mobject/placement.hpp"
@ -42,6 +43,7 @@ namespace session {
ScopeLocator::ScopeLocator()
: focusStack_(new QueryFocusStack)
{
}

View file

@ -30,6 +30,7 @@
#include "proc/mobject/placement-ref.hpp"
#include "lib/singleton.hpp"
#include <boost/scoped_ptr.hpp>
//#include <vector>
//#include <string>
@ -39,8 +40,10 @@
namespace mobject {
namespace session {
using boost::scoped_ptr;
class ScopeLocator;
class QueryFocusStack;
/**
@ -53,11 +56,16 @@ namespace session {
public:
Scope (PlacementMO const& constitutingPlacement);
static Scope const& containing (PlacementMO const& aPlacement);
static Scope const& containing (RefPlacement const& refPlacement);
Scope const& getParent() const;
};
class ScopeLocator
{
scoped_ptr<QueryFocusStack> focusStack_;
public:
ScopeLocator();

View file

@ -1,6 +1,6 @@
format 58
"Placement" // ProcessingLayer::MObject::Placement
revision 1
revision 2
modified_by 5 "hiv"
// class settings
//class diagram settings
@ -68,6 +68,23 @@ ${inlines}
"
classrelation_ref 177541 // <unidirectional association>
b multiplicity "1" parent class_ref 152453 // PlacementRef
end
operation 138885 "getParent"
public return_type class_ref 153349 // Scope
nparams 0
cpp_decl " ${comment}${friend}${static}${inline}${virtual}${type} ${name} ${(}${)}${const}${volatile} ${throw}${abstract};"
cpp_def "${comment}${inline}${type}
${class}::${name} ${(}${)}${const}${volatile} ${throw}${staticnl}
{
${body}
}
"
end
end
@ -110,7 +127,7 @@ ${inlines}
classrelation 177797 // scopes (<unidirectional association>)
relation 167813 --->
stereotype "has_a"
stereotype "owns"
a role_name "scopes" protected
cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value};
"
@ -176,7 +193,7 @@ ${inlines}
classrelation 178565 // <unidirectional association>
relation 168581 --->
stereotype "use"
stereotype "uses"
a role_name "" protected
cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value};
"

View file

@ -10,7 +10,7 @@ classcanvas 128133 class_ref 152453 // PlacementRef
end
classcanvas 128261 class_ref 153349 // Scope
draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default show_stereotype_properties default
xyz 214 212 2000
xyz 204 208 2000
end
classcanvas 128517 class_ref 153477 // ScopePath
draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default show_stereotype_properties default
@ -29,8 +29,8 @@ classcanvas 129413 class_ref 152069 // PlacementIndex
xyz 340 345 2004
end
note 129669 "actually
implemented through"
xyzwh 250 303 2000 131 50
implemented through the:"
xyzwh 241 308 2000 140 45
classcanvas 129797 class_ref 153861 // ScopeLocator
draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default show_stereotype_properties default
xyz 196 17 2000
@ -42,18 +42,18 @@ end
note 131333 "this connection is established by the current session"
xyzwh 361 39 2000 158 47
relationcanvas 128389 relation_ref 167557 // <unidirectional association>
from ref 128261 z 1999 stereotype "<<holds>>" xyz 277 231 3000 to ref 128133
from ref 128261 z 1999 stereotype "<<holds>>" xyz 281 219 3000 to ref 128133
no_role_a no_role_b
multiplicity_a_pos 328 237 3000 multiplicity_b_pos 268 237 3000
multiplicity_a_pos 328 237 3000 multiplicity_b_pos 278 237 3000
end
relationcanvas 128645 relation_ref 167685 // <directional composition>
from ref 128517 z 1999 stereotype "<<vector>>" xyz 135 231 3000 to ref 128261
role_a_pos 176 214 3000 no_role_b
from ref 128517 z 1999 stereotype "<<vector>>" xyz 130 231 3000 to ref 128261
role_a_pos 166 214 3000 no_role_b
no_multiplicity_a no_multiplicity_b
end
relationcanvas 128901 relation_ref 167813 // <unidirectional association>
from ref 128773 z 1999 stereotype "<<has_a>>" xyz 49 181 3000 to ref 128517
role_a_pos 86 195 3000 no_role_b
from ref 128773 z 1999 stereotype "<<owns>>" xyz 54 182 3000 to ref 128517
role_a_pos 88 194 3000 no_role_b
no_multiplicity_a no_multiplicity_b
end
relationcanvas 129157 relation_ref 167941 // <directional composition>
@ -64,7 +64,7 @@ relationcanvas 129157 relation_ref 167941 // <directional composition>
no_multiplicity_a no_multiplicity_b
end
relationcanvas 129285 relation_ref 168069 // <dependency>
from ref 128005 z 1999 stereotype "<<belongs_into>>" xyz 193 286 3000 to ref 128261
from ref 128005 z 1999 stereotype "<<belongs_into>>" xyz 193 289 3000 to ref 128261
no_role_a no_role_b
no_multiplicity_a no_multiplicity_b
end
@ -81,7 +81,7 @@ relationcanvas 130053 relation_ref 168197 // <unidirectional association>
no_multiplicity_a no_multiplicity_b
end
relationcanvas 130309 relation_ref 168325 // <dependency>
from ref 129797 z 1999 stereotype "<<resolves>>" xyz 237 141 3000 to ref 128261
from ref 129797 z 1999 stereotype "<<resolves>>" xyz 237 139 3000 to ref 128261
no_role_a no_role_b
no_multiplicity_a no_multiplicity_b
end
@ -92,7 +92,7 @@ relationcanvas 130949 relation_ref 168453 // <realization>
no_multiplicity_a no_multiplicity_b
end
relationcanvas 131205 relation_ref 168581 // <unidirectional association>
from ref 129797 z 1999 stereotype "<<use>>" xyz 339 91 3000 to ref 130437
from ref 129797 z 1999 stereotype "<<uses>>" xyz 338 92 3000 to ref 130437
no_role_a no_role_b
no_multiplicity_a no_multiplicity_b
end

View file

@ -1,6 +1,6 @@
format 58
"lumiera"
revision 54
revision 55
modified_by 5 "hiv"
cpp_root_dir "../../src/"

View file

@ -3051,10 +3051,10 @@ Placement references mimic the behaviour of a real placement, i.e. they proxy th
{{red{WIP}}}
</pre>
</div>
<div title="PlacementScope" modifier="Ichthyostega" modified="200910120543" created="200905120304" tags="SessionLogic spec img" changecount="13">
<div title="PlacementScope" modifier="Ichthyostega" modified="200910161841" created="200905120304" tags="SessionLogic spec img" changecount="15">
<pre>MObjects are attached into the [[Session]] by adding a [[Placement]]. Because this especially includes the case of //grouping or container objects,// e.g. tracks or [[meta-clips|VirtualClip]], any placement may optionally define and root a scope, and every placement is at least contained in one encompassing scope &amp;mdash; of course with the exception of the absolute top level, which can be thought off as being contained in a scope of handling rules.
Thus, while the [[sequences (former called EDL)|EDL]] act as generic container holding a pile of placments, actually there is a more fine grained structure based on the nesting of the tracks, which especially in Lumiera's HighLevelModel belong to the sequence (they aren't a property of the top level timeline as one might expect). Building upon these observations, we actually require each addition of a placement to specify a scope. The implementation of this tie-to-scope is provided by the same mechanism as utilised for relative placements, i.e. an directional placement relation. This relation actually is implemented by the PlacementIndex
Thus, while the [[sequences (former called EDL)|EDL]] act as generic container holding a pile of placments, actually there is a more fine grained structure based on the nesting of the tracks, which especially in Lumiera's HighLevelModel belong to the sequence (they aren't a property of the top level timeline as one might expect). Building upon these observations, we actually require each addition of a placement to specify a scope. Consequently, for each Placement at hand it is possible to determine an //containing scope,// which in turn is associated with some Placement of a top-level ~MObject for this scope. An example would be the {{{Placement&lt;Track&gt;}}} acting as scope of all the clips placed onto this track. The //implementation//&amp;nbsp; of this tie-to-scope is provided by the same mechanism as utilised for relative placements, i.e. an directional placement relation. Actually, this relation is implemented by the PlacementIndex within the current [[Session]].
[&gt;img[Structure of Placment Scopes|draw/ScopeStructure1.png]]
@ -3382,7 +3382,7 @@ Viewed as a micro program, the processing patterns are ''weak typed'' &amp;mdash
<pre>a given Render Engine configuration is a list of Processors. Each Processor in turn contains a Graph of ProcNode.s to do the acutal data processing. In order to cary out any calculations, the Processor needs to be called with a StateProxy containing the state information for this RenderProcess
</pre>
</div>
<div title="QueryFocus" modifier="Ichthyostega" modified="200910152346" created="200910140244" tags="def spec img" changecount="9">
<div title="QueryFocus" modifier="Ichthyostega" modified="200910161910" created="200910140244" tags="def spec img" changecount="10">
<pre>When querying contents of the session or sub-containers within the session, the QueryFocus follows the current point-of-query. As such queries can be issued to explore the content of container-like objects holding other MObjects, the focus is always attached to a container, which also acts as [[scope|PlacementScope]] for the contained objects. QueryFocus is an implicit state (the current point of interrest). This sate especially remembers the path down from the root of the HighLevelModel, which was used to access the current scope. Because this path constitutes a hierarchy of scopes, it can be relevant for querying and resolving placement properties. (&amp;rarr; SessionStructureQuery)
!provided operations
@ -3392,6 +3392,8 @@ Viewed as a micro program, the processing patterns are ''weak typed'' &amp;mdash
* get the current scope, which is implemented as Placement
* get the current ScopePath from root (session globals) down to the current scope
[&gt;img[Scope Locating|uml/fig136325.png]]
!!!relation to Scope
There is a tight integration with PlacementScope through the ScopeLocator, which establishes the //current scope.// But QueryFocus is more of a //binding// &amp;mdash; it links or focusses the current state and into a specific scope with a ScopePath depending on the current state. Thus, while Scope is just a passive container allowing locate and navigate, QueryFocus by virtue of this binding allows to query this current location.
!implementation notes
we provide a static access API, meaning that there is a singleton behind the scenes, which manages the mentioned scope stack. Moreover, there is an link to the current session. This link works by the current session grabbing the query focus and attaching to it. This attachment is shallow, i.e. the QueryFocus doesn't have knowledge about the session, which allows the focus to be unit tested.