Lumiera  0.pre.03
»edit your freedom«
placement-index-query-resolver.hpp
Go to the documentation of this file.
1 /*
2  PLACEMENT-INDEX-QUERY-RESOLVER.hpp - using PlacementIndex to resolve scope queries
3 
4  Copyright (C)
5  2009, Hermann Vosseler <Ichthyostega@web.de>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 */
13 
14 
47 #ifndef MOBJECT_SESSION_PLACEMENT_INDEX_QUERY_RESOLVER_H
48 #define MOBJECT_SESSION_PLACEMENT_INDEX_QUERY_RESOLVER_H
49 
52 
53 #include "common/query.hpp"
54 
55 #include <functional>
56 
57 
58 namespace steam {
59 namespace mobject {
60 namespace session {
61 
62  using std::function;
63  using lumiera::Goal;
64 
65  typedef PlacementIndex& IndexLink(void);
66 
67  class Explorer;
68 
69 
82  : public lumiera::QueryResolver
83  {
84 
85  function<IndexLink> _getIndex;
86 
87 
88  virtual bool canHandleQuery(Goal::QueryID const&) const override;
89 
90  virtual operator string() const override { return "PlacementIndex"; }
91 
92 
93  Explorer* setupExploration (PlacementIndex::ID startID, ScopeQueryKind direction);
94 
95  void preGenerateInvocationContext();
96 
97  template<typename MO>
98  void defineHandling();
99 
100  template<typename MO>
101  lumiera::Resolution* resolutionFunction (Goal const& goal);
102 
103 
104  public:
106  PlacementIndexQueryResolver (function<IndexLink> const& accessIndex);
107  };
108 
109 
110 }}} // namespace steam::mobject::session
111 #endif
Query ABC: unspecific goal for resolution or retrieval.
Definition: query.hpp:116
Wrapper for the PlacementIndex, allowing to resolve scope contents discovery.
Interface: a facility for resolving (some kind of) queries A concrete subclass has the ability to cre...
Basic and generic representation of an internal query.
ABC representing the result set of an individual query resolution.
Steam-Layer implementation namespace root.
Namespace of Session and user visible high-level objects.
Definition: sequence.hpp:65
Core of the session implementation datastructure.
Structured compound of Placement instances with lookup capabilities.
Specific queries to explore contents of a scope within the high-level model.
Explorer * setupExploration(PlacementIndex::ID startID, ScopeQueryKind direction)
the builder function used to set up an concrete result set object when issuing the query...
Interface: strategy for exploring the structure.