From 9d7ce1e6a4ac3eedacf709a2dae42ccc7f11a541 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Mon, 3 Sep 2018 03:49:23 +0200 Subject: [PATCH] EventLog: now able to use the CursorGear immediately as state core ...since TreeExplorer automatically does the iterator wrapping for us. As added benefit, we have now a direct API to control the search direction --- src/lib/test/event-log.hpp | 14 +++----------- wiki/thinkPad.ichthyo.mm | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/lib/test/event-log.hpp b/src/lib/test/event-log.hpp index 8717fbd0c..c4e9d9686 100644 --- a/src/lib/test/event-log.hpp +++ b/src/lib/test/event-log.hpp @@ -77,8 +77,8 @@ namespace test{ auto buildSearchFilter(Log const& srcSeq) { - using Iter = lib::IterCursor; - return treeExplore(Iter (srcSeq)) + using Cursor = lib::iter::CursorGear; + return treeExplore (Cursor{srcSeq.begin(), srcSeq.end()}) .mutableFilter(); } } @@ -327,15 +327,7 @@ namespace test{ void attachNextSerchStep (COND&& filter, Direction direction) { - switch (direction) - { - case FORWARD: - solution_.switchForwards(); - break; - case BACKWARD: - solution_.switchBackwards(); - break; - } + solution_.reverse (BACKWARD == direction); solution_.setNewFilter (forward (filter)); } diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index ff40029c9..83bc81ce0 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -30715,6 +30715,8 @@ + + @@ -31150,6 +31152,23 @@ + + + + + + +

+ TreeExplorer macht das Wrappen für uns automatisch, +

+

+ und außerdem haben wir nun ein direktes API für die Laufrichtung +

+ + +
+ +