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) Lumiera.org
5  2009, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 */
22 
23 
56 #ifndef MOBJECT_SESSION_PLACEMENT_INDEX_QUERY_RESOLVER_H
57 #define MOBJECT_SESSION_PLACEMENT_INDEX_QUERY_RESOLVER_H
58 
61 
62 #include "common/query.hpp"
63 
64 #include <functional>
65 
66 
67 namespace steam {
68 namespace mobject {
69 namespace session {
70 
71  using std::function;
72  using lumiera::Goal;
73 
74  typedef PlacementIndex& IndexLink(void);
75 
76  class Explorer;
77 
78 
91  : public lumiera::QueryResolver
92  {
93 
94  function<IndexLink> _getIndex;
95 
96 
97  virtual bool canHandleQuery(Goal::QueryID const&) const override;
98 
99  virtual operator string() const override { return "PlacementIndex"; }
100 
101 
102  Explorer* setupExploration (PlacementIndex::ID startID, ScopeQueryKind direction);
103 
104  void preGenerateInvocationContext();
105 
106  template<typename MO>
107  void defineHandling();
108 
109  template<typename MO>
110  lumiera::Resolution* resolutionFunction (Goal const& goal);
111 
112 
113  public:
115  PlacementIndexQueryResolver (function<IndexLink> const& accessIndex);
116  };
117 
118 
119 }}} // namespace steam::mobject::session
120 #endif
Query ABC: unspecific goal for resolution or retrieval.
Definition: query.hpp:125
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:74
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.