Lumiera  0.pre.03
»edit your freedom«
ScopeLocator Class Reference

#include "steam/mobject/session/scope-locator.hpp"

Description

Singleton service establishing a link to relate any compound of nested placement scopes to the current session and the current focus for querying and exploring this structure.

While it is OK to use this service directly, clients usually would prefer to use QueryFocus as a frontend.

ScopeLocator is the access point both to the current query scope location (as maintained with the help of the QueryFocusStack) and allows to explore the current session data structures (building on a QueryResolver service exposed by the session).

Note
in its current form (11/09), ScopeLocator is deliberately not threadsafe

Definition at line 66 of file scope-locator.hpp.

Public Member Functions

ScopePathcurrPath ()
 establishes the current query focus location. More...
 
template<typename MO >
ScopeQuery< MO >::iterator explore (Scope const &)
 use the contents-resolving facility exposed by the session to enumerate the contents (children) of the given scope
 
template<typename MO >
ScopeQuery< MO >::iterator getRawPath (Scope const &)
 use the contents-resolving facility exposed by the session to discover the path up from the given scope to model root. More...
 
ScopeQuery< MObject >::iterator getRawPath (Scope const &)
 
lib::IterSource< const Scope >::iterator locate (Scope const &target)
 navigate the current QueryFocus scope location. More...
 
ScopePathpushPath ()
 push aside the current focus location and open a new ScopePath frame, to serve as current location until released
 
template<typename MO >
ScopeQuery< MO >::iterator query (Scope const &)
 use the contents-resolving facility exposed by the session to discover depth-first any object within this scope
 
size_t stackSize () const
 

Static Public Attributes

static lib::Depend< ScopeLocatorinstance
 Storage holding the single ScopeLocator instance.
 

Friends

class lib::DependencyFactory< ScopeLocator >
 

Private Member Functions

lumiera::QueryResolver const & theResolver ()
 

Private Attributes

std::unique_ptr< QueryFocusStackfocusStack_
 

Member Function Documentation

◆ currPath()

ScopePath & currPath ( )

establishes the current query focus location.

Relies on the state of the QueryFocusStack. If there is no current focus location, a new one is created, referring to the root Scope.

Returns
the current path corresponding to the most recently used QueryFocus, which is actually still referred from somewhere.
Note
may cause the QueryFocusStack to pop path entries no longer in use.

Definition at line 152 of file scope.cpp.

◆ getRawPath()

ScopeQuery< MO >::iterator getRawPath ( Scope const &  scope)
inline

use the contents-resolving facility exposed by the session to discover the path up from the given scope to model root.

Note
this yields the raw path (basic containment hierarchy), as opposed to an effective or virtual path, which should reflect the attachment of Sequences to Timelines or meta-clips. That is, you'll always get the top-level fork root of any sequence as direct child of the root node and timelines (BindingMO) just appear to be "dead ends"

Definition at line 144 of file scope-locator.hpp.

◆ locate()

IterSource< const Scope >::iterator locate ( Scope const &  scope)

navigate the current QueryFocus scope location.

The resulting access path to the new location is chosen such as to be most closely related to the original location; this includes picking a timeline or meta-clip attachment most similar to the one used in the original path. So effectively you'll see things through the same "scoping perspective" as given by the original path, if possible to the new location given as parameter. use the contents-resolving facility exposed by the session

Note
changes the current QueryFocus as a sideeffect
Parameters
scopethe new target location to navigate
Returns
an iterator yielding the nested scopes from the new location up to root, in a way likely to be similar to the original location

Definition at line 182 of file scope.cpp.

◆ theResolver()

lumiera::QueryResolver const & theResolver ( )
private

the one (and only) access point actually to link the system of Scope and QueryFocus to the current session, by delegating resolution of contents discovery queries to the PlacementIndex managed within the session

Definition at line 128 of file scope.cpp.

References SessionServiceExploreScope::getResolver().

+ Here is the call graph for this function:
+ Collaboration diagram for ScopeLocator:

The documentation for this class was generated from the following files: