diff --git a/src/proc/mobject/session/query-focus.hpp b/src/proc/mobject/session/query-focus.hpp index 05a426277..2ffa30902 100644 --- a/src/proc/mobject/session/query-focus.hpp +++ b/src/proc/mobject/session/query-focus.hpp @@ -25,6 +25,7 @@ #define MOBJECT_SESSION_QUERY_FOCUS_H #include "proc/mobject/session/scope-path.hpp" +#include "proc/mobject/session/scope-query.hpp" #include "proc/mobject/session/scope-locator.hpp" #include diff --git a/src/proc/mobject/session/scope-locator.hpp b/src/proc/mobject/session/scope-locator.hpp index 37884608e..a1520ffca 100644 --- a/src/proc/mobject/session/scope-locator.hpp +++ b/src/proc/mobject/session/scope-locator.hpp @@ -74,8 +74,7 @@ namespace session { typename ScopeQuery::iterator query (Scope); - template - typename ScopeQuery::iterator + ScopeQuery::iterator locate (Scope scope); ScopeQuery::iterator @@ -117,29 +116,6 @@ namespace session { return ScopeQuery (scope.getTop(), CONTENTS).resolveBy (theResolver()); } - - /** navigate the \em current QueryFocus scope location. The resulting - * access path to the new location is chosen such as to be most closely related - * to the original location; this includes picking a timeline or meta-clip - * attachment most similar to the one used in the original path. So effectively - * you'll see things through the same "scoping perspective" as given by the - * original path, if possible to the new location - * given as parameter. use the contents-resolving facility exposed by the session - * @note changes the \em current QueryFocus as a sideeffect - * @param scope the new target location to navigate - * @return an iterator yielding the nested scopes from the new location - * up to root, in a way likely to be similar to the original location - */ - template - inline typename ScopeQuery::iterator - ScopeLocator::locate (Scope scope) - { - UNIMPLEMENTED ("virtual navigation"); - ///////////////////////////////////////////TODO: see scope-query.hpp - ///////////////////////////////////////////TODO: its hard to come up with a generic implementation which yields a compatible iterator - ///////////////////////////////////////////TODO: *alternatively* just expose an Iterator of Scopes? - } - /** use the contents-resolving facility exposed by the session * to discover the path up from the given scope to model root. diff --git a/src/proc/mobject/session/scope.cpp b/src/proc/mobject/session/scope.cpp index 871c386cc..be3e05790 100644 --- a/src/proc/mobject/session/scope.cpp +++ b/src/proc/mobject/session/scope.cpp @@ -122,6 +122,28 @@ namespace session { return focusStack_->push (SessionServiceExploreScope::getScopeRoot()); } + + /** navigate the \em current QueryFocus scope location. The resulting + * access path to the new location is chosen such as to be most closely related + * to the original location; this includes picking a timeline or meta-clip + * attachment most similar to the one used in the original path. So effectively + * you'll see things through the same "scoping perspective" as given by the + * original path, if possible to the new location + * given as parameter. use the contents-resolving facility exposed by the session + * @note changes the \em current QueryFocus as a sideeffect + * @param scope the new target location to navigate + * @return an iterator yielding the nested scopes from the new location + * up to root, in a way likely to be similar to the original location + */ + ScopeQuery::iterator + ScopeLocator::locate (Scope scope) + { + UNIMPLEMENTED ("virtual navigation"); + ///////////////////////////////////////////TODO: see scope-query.hpp + ///////////////////////////////////////////TODO: its hard to come up with a generic implementation which yields a compatible iterator + ///////////////////////////////////////////TODO: *alternatively* just expose an Iterator of Scopes? + } + /** discover the enclosing scope of a given Placement */ @@ -175,17 +197,6 @@ namespace session { } - /** enumerate the path of nested scopes up to root scope. - * @return an iterator which starts with this scope and - * successively yields outer scopes, stopping at root. - */ - Scope::IterType_ - Scope::ascend() const - { - UNIMPLEMENTED ("ascend scope hierarchy up to root"); - } - - diff --git a/src/proc/mobject/session/scope.hpp b/src/proc/mobject/session/scope.hpp index 6dbe72f88..934ee87de 100644 --- a/src/proc/mobject/session/scope.hpp +++ b/src/proc/mobject/session/scope.hpp @@ -28,7 +28,7 @@ #include "proc/mobject/placement.hpp" #include "proc/mobject/placement-ref.hpp" //#include "proc/mobject/session/query-resolver.hpp" ///////////TODO: really? -#include "lib/iter-adapter.hpp" +//#include "lib/iter-adapter.hpp" #include "lib/error.hpp" //#include "lib/singleton.hpp" @@ -44,8 +44,6 @@ namespace mobject { namespace session { - using lib::IterAdapter; - LUMIERA_ERROR_DECLARE (INVALID_SCOPE); ///< Placement scope invalid and not locatable within model @@ -61,8 +59,6 @@ namespace session { { RefPlacement anchor_; - typedef IterAdapter IterType_; - public: Scope (PlacementMO const& constitutingPlacement); Scope (); ///< unlocated NIL scope @@ -78,9 +74,6 @@ namespace session { bool isValid() const; bool isRoot() const; - typedef IterType_ iterator; - iterator ascend() const; - friend bool operator== (Scope const&, Scope const&); friend bool operator!= (Scope const&, Scope const&); };