Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
SpecificContentsQuery< MO > Class Template Reference

#include "steam/mobject/session/specific-contents-query.hpp"

Description

template<class MO>
class steam::mobject::session::SpecificContentsQuery< MO >

from the session, based on a filter predicate.

As the parent type, ContentsQuery, the resolution of this query requires to explore the given scope depth first; but in addition to filter based on type, a client-provided predicate is applied to each result.

Note
this may degenerate on large sessions.
Todo:
develop a system of sub-indices and specialised queries

Definition at line 54 of file specific-contents-query.hpp.

Classes

class  Filter
 Filter functor, built on top of a predicate, which is provided by the client on creation of this SpecivicContentsQuery instance. More...
 

Public Member Functions

 SpecificContentsQuery (PlacementMO const &scope, SpecialPredicate const &specialPred)
 
- Public Member Functions inherited from ContentsQuery< MO >
 ContentsQuery (PlacementMO const &scope)
 
- Public Member Functions inherited from ScopeQuery< MO >
 ScopeQuery (PlacementMO const &scope, ScopeQueryKind direction)
 
PlacementMO::ID const & searchScope () const
 
ScopeQueryKind searchDirection () const
 
- Public Member Functions inherited from DiscoveryQuery< MO >
ContentFilter contentFilter () const
 
- Public Member Functions inherited from Query< RES >
 Query ()
 
 Query (string querySpec)
 
 operator QueryKey () const
 automatic conversion from Query to QueryKey for indexing and ordering.
 
Builder rebuild () const
 
string extractID (Symbol predicate) const
 convenience shortcut to extract a desired name-ID.
 
bool usesPredicate (Symbol predicate) const
 
iterator operator() (QueryResolver const &resolver) const
 notational convenience shortcut, synonymous to Query<RES>::resolveBy()
 
iterator resolveBy (QueryResolver const &resolver) const
 
- Public Member Functions inherited from Goal
virtual ~Goal ()
 this is a marker baseclass
 
QueryID const & getQID () const
 

Private Types

using ContentFilter = ContentsQuery< MO >::ContentFilter
 
using TypedPlacement = Placement< MO > const &
 
using SpecialPredicate = function< bool(TypedPlacement)>
 

Private Member Functions

ContentFilter buildContentFilter () const
 using a specialised version of the filtering, which doesn't only check the concrete type, but also applies a custom filter predicate
 

Private Attributes

Filter specialTest_
 

Additional Inherited Members

- Public Types inherited from ScopeQuery< MO >
using iterator = _Parent::iterator
 
using ContentFilter = _Parent::ContentFilter
 
- Public Types inherited from DiscoveryQuery< MO >
using iterator = _Query::iterator
 
using ContentFilter = function< bool(PlacementMO const &)>
 
- Public Types inherited from Query< RES >
typedef lib::IterAdapter< Cursor, PResoiterator
 
- Public Types inherited from Goal
enum  Kind {
  EMPTY = 0 ,
  GENERIC = 1 ,
  DISCOVERY ,
  PLACEMENT
}
 
- Static Public Member Functions inherited from Query< RES >
static Builder build (Kind queryType=Goal::GENERIC)
 
- Protected Member Functions inherited from DiscoveryQuery< MO >
 DiscoveryQuery ()
 
- Protected Member Functions inherited from Query< RES >
lib::QueryText getQueryDefinition () const
 access the complete syntactical representation of this query.
 
 Query (QueryID typeID, lib::QueryText const &genericQuerySpec)
 
 Query (QueryID typeID, string querySpec)
 
- Protected Member Functions inherited from Goal
 Goal (QueryID qid)
 
- Static Protected Member Functions inherited from Query< RES >
static QueryID defineQueryTypeID (Kind queryType=Goal::GENERIC)
 
- Protected Attributes inherited from Goal
QueryID id_
 

Constructor & Destructor Documentation

◆ SpecificContentsQuery()

template<class MO >
SpecificContentsQuery ( PlacementMO const &  scope,
SpecialPredicate const &  specialPred 
)
inline

Definition at line 104 of file specific-contents-query.hpp.

Member Typedef Documentation

◆ ContentFilter

template<class MO >
using ContentFilter = ContentsQuery<MO>::ContentFilter
private

Definition at line 57 of file specific-contents-query.hpp.

◆ TypedPlacement

template<class MO >
using TypedPlacement = Placement<MO> const&
private

Definition at line 58 of file specific-contents-query.hpp.

◆ SpecialPredicate

template<class MO >
using SpecialPredicate = function<bool(TypedPlacement)>
private

Definition at line 59 of file specific-contents-query.hpp.

Member Function Documentation

◆ buildContentFilter()

template<class MO >
ContentFilter buildContentFilter ( ) const
inlineprivatevirtual

using a specialised version of the filtering, which doesn't only check the concrete type, but also applies a custom filter predicate

Returns
function object, embedding a copy of the Filter functor.

Reimplemented from ScopeQuery< MO >.

Definition at line 96 of file specific-contents-query.hpp.

References SpecificContentsQuery< MO >::specialTest_.

Member Data Documentation

◆ specialTest_

template<class MO >
Filter specialTest_
private
+ Inheritance diagram for SpecificContentsQuery< MO >:
+ Collaboration diagram for SpecificContentsQuery< MO >:

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