37 using std::unique_ptr;
42 using lumiera::getResultTypeID;
221 Cursor& cursor =
static_cast<Cursor&
> (res);
228 cursor.point_at (elm);
255 template<
typename QUERY>
259 return query.contentFilter();
267 return acceptAllObjects;
271 template<
typename MO>
293 : _getIndex(UseThisIndex (theIndex))
300 : _getIndex(accessIndex)
309 defineHandling<MObject>();
310 defineHandling<Clip>();
311 defineHandling<Effect>();
314 defineHandling<mobject::test::DummyMO >();
315 defineHandling<mobject::test::TestSubMO1 >();
316 defineHandling<mobject::test::TestSubMO2 >();
317 defineHandling<mobject::test::TestSubMO21>();
340 template<
typename MO>
345 , bind (&PlacementIndexQueryResolver::resolutionFunction<MO>,
359 template<
typename MO>
364 REQUIRE (qID == whenQueryingFor<MO>());
372 this, scopeID, direction)
373 , getContentFilter(query)
Single Solution, possibly part of a result set.
Query ABC: unspecific goal for resolution or retrieval.
QueryID const & getQID() const
void installResolutionCase(Goal::QueryID const &, ResolutionMechanism)
Generic interface to express a query for specifically typed result elements exposing some capabilitie...
ABC representing the result set of an individual query resolution.
Strategy: explore the structure just by following the given iterator; usually this yields an element'...
ChildExplorer(PIter start)
Strategy: explore the structure depth first.
DeepExplorer(PIter start, PIdx idx)
std::stack< PIter > scopes_
Interface: strategy for exploring the structure.
virtual bool exhausted()=0
lumiera::Resolution * resolutionFunction(Goal const &goal)
PlacementIndexQueryResolver(PlacementIndex &theIndex)
virtual bool canHandleQuery(Goal::QueryID const &) const override
function< IndexLink > _getIndex
void preGenerateInvocationContext()
Explorer * setupExploration(PlacementIndex::ID startID, ScopeQueryKind direction)
the builder function used to set up an concrete result set object when issuing the query.
Structured compound of Placement instances with lookup capabilities.
PlacementMO & getScope(PlacementMO const &) const
PlacementMO & find(ID) const
PlacementMO::ID const & ID
iterator getReferrers(ID) const
Retrieve all the elements attached to the given entry (scope) Each element (Placement) can act as a s...
on query, an individual result set is prepared to be explored by the invoking client code.
ContentFilter acceptable_
void exploreNext(Result &res)
ExplorerBuilder buildExploartion_
virtual void nextResult(Result &pos)
ResultSet(ExplorerBuilder b, ContentFilter a)
virtual Result prepareResolution()
unique_ptr< Explorer > explore_
Query a scope to discover it's contents or location.
ScopeQueryKind searchDirection() const
PlacementMO::ID const & searchScope() const
Strategy: explore the structure upwards, ascending until reaching the root element.
UpExplorer(Pla &start, PIdx idx)
MObject in the Session to represent a clip on the timeline.
LumieraError< LERR_(INVALID)> Invalid
QueryID whenQueryingFor()
shortcut for a suitable QueryID
bool acceptAllObjects_(Pla)
ContentFilter getContentFilter(QUERY const &query)
use filter predicate provided by the concrete query
Namespace of Session and user visible high-level objects.
@ CONTENTS
discover any contained objects depth-first
@ PARENTS
discover the enclosing scopes
@ CHILDREN
discover the immediate children
@ PATH
discover the path to root
function< bool(Pla const &)> ContentFilter
PlacementIndex::iterator PIter
function< Explorer *()> ExplorerBuilder
Steam-Layer implementation namespace root.
Implementing resolution of "discover contents"-queries based on PlacementIndex.
Core abstraction: placement of a media object into session context.
Specific queries to explore contents of a scope within the high-level model.
PlacementIndex & refIndex_
UseThisIndex(PlacementIndex &idx)
A hierarchy of simple dummy-Media-Objects for easy unit testing.
#define INSTANCEOF(CLASS, EXPR)
shortcut for subclass test, intended for assertions only.