Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
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 57 of file scope-locator.hpp.

Static Public Attributes

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

Public Member Functions

ScopePathcurrPath ()
 establishes the current query focus location.
 
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 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 query (Scope const &)
 use the contents-resolving facility exposed by the session to discover depth-first any object within this 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.
 
ScopeQuery< MObject >::iterator getRawPath (Scope const &)
 
lib::IterSource< constScope >::iterator locate (Scope const &target)
 navigate the current QueryFocus scope location.
 
size_t stackSize () const
 
 ~ScopeLocator ()
 

Friends

class lib::DependencyFactory< ScopeLocator >
 

Protected Member Functions

 ScopeLocator ()
 

Private Member Functions

lumiera::QueryResolver const & theResolver ()
 

Private Attributes

std::unique_ptr< QueryFocusStackfocusStack_
 

Constructor & Destructor Documentation

◆ ~ScopeLocator()

Definition at line 105 of file scope.cpp.

◆ ScopeLocator()

ScopeLocator ( )
protected

Definition at line 101 of file scope.cpp.

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 143 of file scope.cpp.

References ScopeLocator::focusStack_.

◆ pushPath()

ScopePath & pushPath ( )

push aside the current focus location and open a new ScopePath frame, to serve as current location until released

Definition at line 154 of file scope.cpp.

References ScopeLocator::focusStack_, and SessionServiceExploreScope::getScopeRoot().

+ Here is the call graph for this function:

◆ explore()

template<typename MO >
ScopeQuery< MO >::iterator explore ( Scope const &  scope)
inline

use the contents-resolving facility exposed by the session to enumerate the contents (children) of the given scope

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

References steam::mobject::session::CHILDREN, Query< RES >::resolveBy(), and ScopeLocator::theResolver().

+ Here is the call graph for this function:

◆ query()

template<typename MO >
ScopeQuery< MO >::iterator query ( Scope const &  scope)
inline

use the contents-resolving facility exposed by the session to discover depth-first any object within this scope

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

References steam::mobject::session::CONTENTS, Query< RES >::resolveBy(), and ScopeLocator::theResolver().

+ Here is the call graph for this function:

◆ getRawPath() [1/2]

template<typename MO >
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 135 of file scope-locator.hpp.

References steam::mobject::session::PATH, Query< RES >::resolveBy(), and ScopeLocator::theResolver().

+ Here is the call graph for this function:

◆ getRawPath() [2/2]

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

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

References steam::mobject::session::PATH, Query< RES >::resolveBy(), and ScopeLocator::theResolver().

+ Here is the call graph for this function:

◆ locate()

IterSource< constScope >::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 173 of file scope.cpp.

References ScopePath::begin(), ScopeLocator::focusStack_, and ScopePath::navigate().

+ Here is the call graph for this function:

◆ stackSize()

size_t stackSize ( ) const

Definition at line 126 of file scope.cpp.

References ScopeLocator::focusStack_.

◆ 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 119 of file scope.cpp.

References SessionServiceExploreScope::getResolver().

Referenced by ScopeLocator::explore(), ScopeLocator::getRawPath(), and ScopeLocator::query().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ focusStack_

std::unique_ptr<QueryFocusStack> focusStack_
private

◆ instance

Friends And Related Symbol Documentation

◆ lib::DependencyFactory< ScopeLocator >

friend class lib::DependencyFactory< ScopeLocator >
friend

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

+ Collaboration diagram for ScopeLocator:

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