diff --git a/src/proc/mobject/session/scope-query.hpp b/src/proc/mobject/session/scope-query.hpp index d167e6554..f8d7e600a 100644 --- a/src/proc/mobject/session/scope-query.hpp +++ b/src/proc/mobject/session/scope-query.hpp @@ -209,72 +209,6 @@ namespace session { }; - /** - * Exposes an opaque MObject result set - * similar to a DiscoveryQuery, including the - * ability to filter/downcast to a specific - * kind of MObject - */ - template - class CachedQuery - : Query > - { - typedef Placement PMO; - typedef Query _Query; - typedef typename _Query::Result Result; - typedef typename _Query::Cursor Cursor; - - - public: - typedef typename _Query::iterator iterator; - - class Snapshot - : public Resolution - { -//////////////TODO: it would be *nice* if we could build something similar to the scope-query Resolution -//////////////TODO: *requirement* is that it must not pull in anything beyond and iter-adapters.hpp -//////////////TODO: but if that's too expensive to implement, just ditch the ability of subclassing and just yield MObjects, or even just Scopes - - vector results_; - - Result - prepareResolution() - { - UNIMPLEMENTED ("hook up first result"); - } - - void - nextResult(Result& pos) - { - UNIMPLEMENTED ("how to advance embedded pointer"); - } - - public: - template - Snapshot(IT const& iter) - { - for(IT ii(iter); ii; ++ii) - results_.push_back(*ii); - } - }; - - Snapshot resultset_; - - template - CachedQuery (IT const& results) - : resultset_(results) - { } - - iterator - resolve () const - { - PReso resultSet(new Snapshot(resultset_)); - Result first = resultSet->prepareResolution(); - Cursor& start = static_cast (first); // note: type RES must be compatible! - return iterator (resultSet, start); - } - - }; }} // namespace mobject::session