Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
An Object representing a sequence of nested scopes within the Session.
MObjects are being attached to the model by Placements, and each Placement is added as belonging into another Placement, which defines the Scope of the addition. There is one (formal) root element, containing the timelines; from there a nested sequence of scopes leads down to each Placement. Ascending this path yields all the scopes to search or query in proper order to be used when resolving some attribute of placement. Placements use visibility rules comparable to visibility of scoped definitions in common programming languages or in cascading style sheets, where a local definition can shadow a global one. In a similar way, properties not defined locally may be resolved by querying up the sequence of nested scopes.
A scope path is represented as sequence of scopes, where each Scope is implemented by a PlacementRef pointing to the »scope top«, i.e. the placement in the session constituting this scope. The leaf of this path can be considered the current scope. ScopePath is intended to be used for remembering a current location within the model, usable for resolving queries and discovering contents.
In addition to some search and query functions, a scope path has the ability to navigate to a given target scope, which must be reachable by ascending and descending into the branches of the overall tree or DAG (in the general case). Navigating is a mutating operation which usually happens when the current "focus" shifts while operating on the model.
ScopePath::INVALID
tokenbool(false)
(rationale is that any valid, usable path is below just root).ScopeLocator holds the QueryFocusStack, which contains ScopePath objects. Each of these stack frames represents the current location for some evaluation context; it is organised as stack to allow intermediate evaluations. Management of these stack frames is automated, with the assistance of ScopePath by incorporating a ref-count. Client code usually accesses this mechanism through QueryFocus objects as frontend, which is reflected in the mentioned embedded refcount
Definition in file scope-path.hpp.
#include "steam/mobject/session/scope.hpp"
#include "lib/iter-adapter.hpp"
#include "lib/error.hpp"
#include <vector>
#include <string>
Classes | |
class | ScopePath |
Sequence of nested scopes within the high-level model. More... | |
struct | ValueTypeBinding< vector< Scope >::const_reverse_iterator > |
this explicit specialisation allows to build a RangeIter to yield const Scope elements, based on the const_reverse_iterator used internally within ScopePath. More... | |
Functions | |
void | intrusive_ptr_add_ref (ScopePath *pathFrame) |
management function for boost::intrusive_ptr to be picked up by ADL | |
void | intrusive_ptr_release (ScopePath *pathFrame) |
bool | operator!= (ScopePath const &path1, ScopePath const &path2) |
bool | operator== (ScopePath const &path1, ScopePath const &path2) |
Namespaces | |
lib | |
Implementation namespace for support and library code. | |
steam | |
Steam-Layer implementation namespace root. | |
steam::mobject | |
Media-Objects, edit operations and high-level session. | |
steam::mobject::session | |
Namespace of Session and user visible high-level objects. | |