Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
PlacementIndexQueryResolver Class Reference

#include "steam/mobject/session/placement-index-query-resolver.hpp"

Description

Wrapper for the PlacementIndex, allowing to resolve scope contents discovery.

  • handles queries for placements of
  • is able to process
    • ContentsQuery for retrieving full contents of a scope depth-first
    • PathQuery for retrieving all the parent scopes
    • more generally, any ScopeQuery with these properties, in some variations

Definition at line 81 of file placement-index-query-resolver.hpp.

Public Member Functions

 PlacementIndexQueryResolver (PlacementIndex &theIndex)
 
 PlacementIndexQueryResolver (function< IndexLink > const &accessIndex)
 
template<typename MO >
ResolutionresolutionFunction (Goal const &goal)
 an instance of this function is installed for each specifically typed kind of query to be handled.
 
- Public Member Functions inherited from QueryResolver
virtual ~QueryResolver ()
 
PReso issue (Goal const &query) const
 issue a query to retrieve contents The query is handed over internally to a suitable resolver implementation.
 
bool canHandle (Goal const &) const
 

Private Member Functions

virtual bool canHandleQuery (Goal::QueryID const &) const override
 
virtual operator string () const override
 short characterisation of the actual facility
 
ExplorersetupExploration (PlacementIndex::ID startID, ScopeQueryKind direction)
 the builder function used to set up an concrete result set object when issuing the query.
 
void preGenerateInvocationContext ()
 
template<typename MO >
void defineHandling ()
 
template<typename MO >
lumiera::ResolutionresolutionFunction (Goal const &goal)
 

Private Attributes

function< IndexLink_getIndex
 

Additional Inherited Members

- Protected Types inherited from QueryResolver
using ResolutionMechanism = function< Resolution *(Goal const &)>
 
- Protected Member Functions inherited from QueryResolver
void installResolutionCase (Goal::QueryID const &, ResolutionMechanism)
 
 QueryResolver ()
 

Constructor & Destructor Documentation

◆ PlacementIndexQueryResolver() [1/2]

Definition at line 292 of file placement-index-query-resolver.cpp.

References PlacementIndexQueryResolver::preGenerateInvocationContext().

+ Here is the call graph for this function:

◆ PlacementIndexQueryResolver() [2/2]

PlacementIndexQueryResolver ( function< IndexLink > const &  accessIndex)

Definition at line 299 of file placement-index-query-resolver.cpp.

References PlacementIndexQueryResolver::preGenerateInvocationContext().

+ Here is the call graph for this function:

Member Function Documentation

◆ canHandleQuery()

bool canHandleQuery ( Goal::QueryID const &  ) const
overrideprivatevirtual

Implements QueryResolver.

Definition at line 323 of file placement-index-query-resolver.cpp.

References Goal::DISCOVERY.

◆ operator string()

virtual operator string ( ) const
inlineoverrideprivatevirtual

short characterisation of the actual facility

Implements QueryResolver.

Definition at line 90 of file placement-index-query-resolver.hpp.

◆ setupExploration()

Explorer * setupExploration ( PlacementIndex::ID  startID,
ScopeQueryKind  direction 
)
private

the builder function used to set up an concrete result set object when issuing the query.

It is preconfigured by the resolutionFunction. The object returned from this function is taken over and managed by a smart-ptr, which is embedded within the iterator given to the client.

Definition at line 384 of file placement-index-query-resolver.cpp.

References PlacementIndexQueryResolver::_getIndex, steam::mobject::session::CHILDREN, steam::mobject::session::CONTENTS, PlacementIndex::find(), PlacementIndex::getReferrers(), PlacementIndex::getScope(), steam::mobject::session::PARENTS, and steam::mobject::session::PATH.

Referenced by PlacementIndexQueryResolver::resolutionFunction().

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

◆ preGenerateInvocationContext()

void preGenerateInvocationContext ( )
private

Definition at line 307 of file placement-index-query-resolver.cpp.

Referenced by PlacementIndexQueryResolver::PlacementIndexQueryResolver(), and PlacementIndexQueryResolver::PlacementIndexQueryResolver().

+ Here is the caller graph for this function:

◆ defineHandling()

template<typename MO >
void defineHandling ( )
private

Definition at line 342 of file placement-index-query-resolver.cpp.

References QueryResolver::installResolutionCase().

+ Here is the call graph for this function:

◆ resolutionFunction() [1/2]

template<typename MO >
lumiera::Resolution * resolutionFunction ( Goal const &  goal)
private

◆ resolutionFunction() [2/2]

template<typename MO >
Resolution * resolutionFunction ( Goal const &  goal)

an instance of this function is installed for each specifically typed kind of query to be handled.

This allows the client code to retrieve just placements of this special type (e.g. Placement<Clip>) in a typesafe manner. We ensure a suitable ContentFilter will be installed, dropping any other query results (of other type) before the point where they may get casted to the desired result type. The key for picking the right resolutionFunction is getResultTypeID<TYPE>()

Definition at line 361 of file placement-index-query-resolver.cpp.

References Goal::getQID(), INSTANCEOF, ScopeQuery< MO >::searchDirection(), ScopeQuery< MO >::searchScope(), and PlacementIndexQueryResolver::setupExploration().

+ Here is the call graph for this function:

Member Data Documentation

◆ _getIndex

function<IndexLink> _getIndex
private
+ Inheritance diagram for PlacementIndexQueryResolver:
+ Collaboration diagram for PlacementIndexQueryResolver:

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